dailykart-testing/tests/bulk-order-form.spec.ts

21 lines
993 B
TypeScript

import { test, expect } from '@playwright/test';
test('#11 Bulk Order Form Submission Fails - Bad Request Bug', async ({ page }) => {
await page.goto('https://uat.dailykart.net/contact',{ timeout: 60000 });
// Fill out all form fields correctly
await page.fill('[placeholder="Company Name"]', 'Opsmonsters.com');
await page.fill('[placeholder="Contact Person"]', 'John');
await page.fill('[placeholder="Designation"]', 'Manager');
await page.fill('[placeholder="Email Address"]', 'john@gmail.com');
await page.fill('[placeholder="Phone Number"]', '1234567890');
await page.fill('[placeholder="Product"]', 'Product X');
await page.fill('[placeholder="Quantity (kg)"]', '100');
await page.fill('[placeholder="Requirements"]', 'Some specific requirements');
// Use getByRole to get the correct submit button by its label "Submit"
const submitBtn = page.getByRole('button', { name: 'Submit' });
await submitBtn.scrollIntoViewIfNeeded();
await submitBtn.click();
});