Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
r-mettler committed Oct 30, 2024
1 parent 653dc3e commit a5ec68c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions playwright/tests/my/mymove/onboarding.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { test, expect } from '../../utils/my/customerTest';

const multiMoveEnabled = process.env.FEATURE_FLAG_MULTI_MOVE;
const zipCityLookup = 'ATCO, NJ 08004 (CAMDEN)';
const LocationLookup = 'ATCO, NJ 08004 (CAMDEN)';

test.describe('Onboarding', () => {
test.skip(multiMoveEnabled === 'true', 'Skip if MultiMove workflow is enabled.');
Expand Down Expand Up @@ -97,17 +97,17 @@ test.describe('(MultiMove) Onboarding', () => {
await customerPage.waitForPage.onboardingCurrentAddress();
await page.getByLabel('Address 1').fill('7 Q St');
await page.getByLabel('Address 1').blur();
await page.getByLabel('Zip/City Lookup').fill('08004');
await expect(page.getByText(zipCityLookup, { exact: true })).toBeVisible();
await page.getByLabel('Location Lookup').fill('08004');
await expect(page.getByText(LocationLookup, { exact: true })).toBeVisible();
await page.keyboard.press('Enter');
await customerPage.navigateForward();

// Backup mailing address section
await customerPage.waitForPage.onboardingBackupAddress();
await page.getByLabel('Address 1').fill('7 Q St');
await page.getByLabel('Address 1').blur();
await page.getByLabel('Zip/City Lookup').fill('08004');
await expect(page.getByText(zipCityLookup, { exact: true })).toBeVisible();
await page.getByLabel('Location Lookup').fill('08004');
await expect(page.getByText(LocationLookup, { exact: true })).toBeVisible();
await page.keyboard.press('Enter');
await customerPage.navigateForward();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ describe('BackupAddressForm component', () => {

expect(getByLabelText(/Address 2/)).toBeInstanceOf(HTMLInputElement);

expect(getByLabelText('City')).toBeInstanceOf(HTMLInputElement);
expect(getByLabelText(/City/)).toBeInstanceOf(HTMLInputElement);

expect(getByLabelText('State')).toBeInstanceOf(HTMLInputElement);
expect(getByLabelText(/State/)).toBeInstanceOf(HTMLInputElement);

expect(getByLabelText(/ZIP/)).toBeInstanceOf(HTMLInputElement);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ describe('ResidentialAddressForm component', () => {

expect(getByLabelText(/Address 2/)).toBeInstanceOf(HTMLInputElement);

expect(getByLabelText('City')).toBeInstanceOf(HTMLInputElement);
expect(getByLabelText(/City/)).toBeInstanceOf(HTMLInputElement);

expect(getByLabelText('State')).toBeInstanceOf(HTMLInputElement);
expect(getByLabelText(/State/)).toBeInstanceOf(HTMLInputElement);

expect(getByLabelText('ZIP')).toBeInstanceOf(HTMLInputElement);
expect(getByLabelText(/ZIP/)).toBeInstanceOf(HTMLInputElement);

expect(getByText('Must be a physical address.')).toBeInTheDocument();
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyMove/Profile/BackupAddress.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('BackupAddress page', () => {

patchServiceMember.mockImplementation(() => Promise.resolve(expectedServiceMemberPayload));

const { getByRole, getByLabelText } = render(
const { getByRole } = render(
<Provider store={mockStore.store}>
<BackupAddress {...testProps} />
</Provider>,
Expand Down
2 changes: 1 addition & 1 deletion src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ global.performance = {
};

jestPreviewConfigure({
autoPreview: true,
autoPreview: false,
});

0 comments on commit a5ec68c

Please sign in to comment.