Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(e2e): account for phone extension changes #1023

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/example.spec.demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ test('proof of concept', async ({ page }) => {
.getByLabel('Phone numberPhone number')
.fill(pointOfContactJson.phone_number);
await page
.getByLabel('Extension (optional)Extension')
.getByLabel('Phone extension (optional)')
.fill(pointOfContactJson.phone_ext);
await page
.getByLabel('Email addressEmail address')
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/testFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export const test = baseTest.extend<{
.getByLabel('Phone numberPhone number')
.fill(pointOfContactJson.phone_number);
await page
.getByLabel('Extension (optional)Extension')
.getByLabel('Phone Extension (optional)')
.fill(pointOfContactJson.phone_ext);
await page
.getByLabel('Email addressEmail address')
Expand Down
6 changes: 5 additions & 1 deletion e2e/pages/filing-app/formAlerts.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from '@playwright/test';
import { test } from '../../fixtures/testFixture';
import pointOfContactJson from '../../test-data/point-of-contact/point-of-contact-data-1.json';
import { ResultUploadMessage, uploadFile } from '../../utils/uploadFile';

test('Form Alerts', async ({
Expand Down Expand Up @@ -247,7 +248,7 @@ test('Form Alerts', async ({
page.locator('.m-notification__error'),
'Error alert is visible',
).toContainText(
'There was a problem updating your point of contact informationEnter the first name of the point of contactEnter the last name of the point of contactEnter the phone number of the point of contactEnter the email address of the point of contactEnter the street address of the point of contactEnter the city of the point of contactSelect the state or territory of the point of contactEnter the ZIP code of the point of contact',
'There was a problem updating your point of contact informationEnter the first name of the point of contactEnter the last name of the point of contactEnter the phone number of the point of contactEnter a valid phone extensionEnter the email address of the point of contactEnter the street address of the point of contactEnter the city of the point of contactSelect the state or territory of the point of contactEnter the ZIP code of the point of contact',
);
});

Expand All @@ -257,6 +258,9 @@ test('Form Alerts', async ({
await page.getByLabel('First name').fill('Playwright');
await page.getByLabel('Last name').fill('Test');
await page.getByLabel('Phone number').fill('555-555-5555');
await page
.getByLabel('Phone extension (optional)')
.fill(pointOfContactJson.phone_ext);
await page.getByLabel('Email address').fill('[email protected]');
await page.getByLabel('Street address line 1').fill('555 Main St.');
await page.getByLabel('City').fill('Utah (U');
Expand Down