Skip to content

Commit

Permalink
card vat number field
Browse files Browse the repository at this point in the history
  • Loading branch information
novikov82 committed Nov 17, 2023
1 parent 358f1a9 commit ff25e9b
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion playwright/payment.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
import { test, expect } from '@playwright/test';

const url = "https://surveyjstest.azurewebsites.net";
// const url = "http://localhost:62946";

test('Cart: vat number field', async ({ page }) => {
await page.goto(`${url}/pricing`);
await page.locator('a').filter({ hasText: 'Accept All' }).click();
await page.locator('div:nth-child(4) > .v2-class---pricing-header__content > div:nth-child(2) > .v2-class---button').first().click();

await expect(page.locator("[data-name=companyVATNumber]")).toBeVisible();
await expect(page.locator("[data-name=companyVATNumber] .v2-class---text-edit__title-required")).toBeHidden();
await page.getByPlaceholder('Country').click();
await page.getByPlaceholder('Country').type("A");
await page.getByText('Austria').click();

await expect(page.locator("[data-name=companyVATNumber]")).toBeVisible();
await expect(page.locator("[data-name=companyVATNumber] .v2-class---text-edit__title-required")).toBeHidden();

await page.getByPlaceholder('Company Name').click();
await page.getByPlaceholder('Company Name').fill("Comp inc.");

await page.getByPlaceholder('VAT Number').click();

await expect(page.locator("[data-name=companyVATNumber]")).toBeVisible();
await expect(page.locator("[data-name=companyVATNumber] .v2-class---text-edit__title-required")).toBeVisible();
});


test('PayPal: failed test payment', async ({ page }) => {
test.setTimeout(480000);

await page.goto('https://surveyjstest.azurewebsites.net/pricing');
await page.goto(`${url}/pricing`);
await page.locator('a').filter({ hasText: 'Accept All' }).click();
await page.locator('div:nth-child(4) > .v2-class---pricing-header__content > div:nth-child(2) > .v2-class---button').first().click();
await page.getByRole('combobox', { name: 'Qty' }).click();
Expand Down

0 comments on commit ff25e9b

Please sign in to comment.