From a5ec68c6527ba40365461f1ca09843fabf22ed7b Mon Sep 17 00:00:00 2001 From: Ricky Mettler Date: Wed, 30 Oct 2024 03:48:16 +0000 Subject: [PATCH] test fixes --- playwright/tests/my/mymove/onboarding.spec.js | 10 +++++----- .../BackupAddressForm/BackupAddressForm.test.jsx | 4 ++-- .../ResidentialAddressForm.test.jsx | 6 +++--- src/pages/MyMove/Profile/BackupAddress.test.jsx | 2 +- src/setupTests.js | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/playwright/tests/my/mymove/onboarding.spec.js b/playwright/tests/my/mymove/onboarding.spec.js index 8ad21eb1ae7..fbc1a495e30 100644 --- a/playwright/tests/my/mymove/onboarding.spec.js +++ b/playwright/tests/my/mymove/onboarding.spec.js @@ -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.'); @@ -97,8 +97,8 @@ 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(); @@ -106,8 +106,8 @@ test.describe('(MultiMove) Onboarding', () => { 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(); diff --git a/src/components/Customer/BackupAddressForm/BackupAddressForm.test.jsx b/src/components/Customer/BackupAddressForm/BackupAddressForm.test.jsx index 74b99e5186a..252fd609da3 100644 --- a/src/components/Customer/BackupAddressForm/BackupAddressForm.test.jsx +++ b/src/components/Customer/BackupAddressForm/BackupAddressForm.test.jsx @@ -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); }); diff --git a/src/components/Customer/ResidentialAddressForm/ResidentialAddressForm.test.jsx b/src/components/Customer/ResidentialAddressForm/ResidentialAddressForm.test.jsx index 4aa433a4210..717938f6cfd 100644 --- a/src/components/Customer/ResidentialAddressForm/ResidentialAddressForm.test.jsx +++ b/src/components/Customer/ResidentialAddressForm/ResidentialAddressForm.test.jsx @@ -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(); }); diff --git a/src/pages/MyMove/Profile/BackupAddress.test.jsx b/src/pages/MyMove/Profile/BackupAddress.test.jsx index a4c1c0826b3..fb3890bd840 100644 --- a/src/pages/MyMove/Profile/BackupAddress.test.jsx +++ b/src/pages/MyMove/Profile/BackupAddress.test.jsx @@ -104,7 +104,7 @@ describe('BackupAddress page', () => { patchServiceMember.mockImplementation(() => Promise.resolve(expectedServiceMemberPayload)); - const { getByRole, getByLabelText } = render( + const { getByRole } = render( , diff --git a/src/setupTests.js b/src/setupTests.js index afb5ce6e471..e42087c5daa 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -19,5 +19,5 @@ global.performance = { }; jestPreviewConfigure({ - autoPreview: true, + autoPreview: false, });