diff --git a/.changeset/lucky-pants-switch.md b/.changeset/lucky-pants-switch.md new file mode 100644 index 00000000..e69de29b diff --git a/web/corps/app/components/Form/Correction/Step1.vue b/web/corps/app/components/Form/Correction/Step1.vue index 2967ca3e..b889beb7 100644 --- a/web/corps/app/components/Form/Correction/Step1.vue +++ b/web/corps/app/components/Form/Correction/Step1.vue @@ -16,6 +16,7 @@ const correctionLabelOverrides = getCorrectionLabelOverrides() > - -
-
-

- {{ $t('label.nameTranslations') }} -

-

{{ $t('text.nameTranslationsDescription') }}

-
- - -
-
diff --git a/web/corps/tests/e2e/specs/correction/page-init.spec.ts b/web/corps/tests/e2e/specs/correction/page-init.spec.ts index 86b9b22e..dc559692 100644 --- a/web/corps/tests/e2e/specs/correction/page-init.spec.ts +++ b/web/corps/tests/e2e/specs/correction/page-init.spec.ts @@ -5,18 +5,6 @@ import { CRCTN, CRCTN_NO_FEE } from '~~/tests/mocks' const identifier = 'BC1234567' const filingId = '999001' -const nameTranslationsMock = { - aliases: [ - { id: '1001', type: 'TRANSLATION', name: 'Nom Entreprise' }, - { id: '1002', type: 'TRANSLATION', name: 'Raison Sociale' } - ] -} - -async function mockNameTranslations(page: Page, businessIdentifier: string, aliasesJSON = nameTranslationsMock) { - await page.route(`**/api/v2/businesses/${businessIdentifier}/aliases`, async (route) => { - await route.fulfill({ json: aliasesJSON }) - }) -} /** Edit a director's address inline and wait for the form to close (CI-resilient). */ async function makeDirectorEdit(page: Page, fillValue: string) { @@ -58,8 +46,6 @@ async function assertCommonElements(page: Page) { } async function assertStep1Sections(page: Page) { - // has name translations section - await expect(page.getByTestId('name-translations-section')).toBeVisible() // has office addresses section await expect(page.getByTestId('office-addresses-section')).toBeVisible() // has directors section @@ -220,25 +206,6 @@ test.describe('Correction - Page init', () => { }) }) - test.describe('Name translations', () => { - test('should load and display name translations from aliases API', async ({ page }) => { - await setupCorrectionPage(page, identifier, filingId, CRCTN_NO_FEE, 'STAFF', 'STAFF') - await mockNameTranslations(page, identifier) - await navigateToCorrectionPage(page, identifier, filingId) - await page.waitForLoadState('networkidle') - - await expect(page.getByText(/loading/i)).not.toBeVisible({ timeout: 15000 }) - - const section = page.getByTestId('name-translations-section') - const tbody = section.locator('tbody') - - await expect(section).toBeVisible() - await expect(tbody).toContainText('Nom Entreprise') - await expect(tbody).toContainText('Raison Sociale') - await expect(tbody.locator('tr')).toHaveCount(2) - }) - }) - test.describe('Action labels', () => { test('should display "Correct" instead of "Change" for action buttons', async ({ page }) => { await setupCorrectionPage(page, identifier, filingId, CRCTN_NO_FEE, 'STAFF', 'STAFF') diff --git a/web/corps/tests/e2e/specs/correction/submit.spec.ts b/web/corps/tests/e2e/specs/correction/submit.spec.ts index 61861120..6db6b8b2 100644 --- a/web/corps/tests/e2e/specs/correction/submit.spec.ts +++ b/web/corps/tests/e2e/specs/correction/submit.spec.ts @@ -6,18 +6,6 @@ import { CRCTN, CRCTN_NO_FEE } from '~~/tests/mocks' const identifier = 'BC1234567' const filingId = '999001' -const aliasesNameTranslationsMock = { - aliases: [ - { id: '10001', type: 'TRANSLATION', name: 'Nom Entreprise' } - ] -} - -async function mockNameTranslations(page: Page, businessIdentifier: string, aliasesJSON = aliasesNameTranslationsMock) { - await page.route(`**/api/v2/businesses/${businessIdentifier}/aliases**`, async (route) => { - await route.fulfill({ json: aliasesJSON }) - }) -} - async function makeDirectorChange(page: Page) { const directors = page.getByTestId('current-directors-section').locator('tbody') const rowToEdit = directors.locator('tr').filter({ hasText: 'TESTER TESTING' }) @@ -117,48 +105,6 @@ test.describe('Correction - Filing Submit', () => { ) expect(page.url()).toContain(`${process.env.NUXT_PUBLIC_BUSINESS_DASHBOARD_URL}${identifier}`) }) - - test('should display name translations and submit when unchanged', async ({ page }) => { - await mockNameTranslations(page, identifier) - - const aliasesRequest = page.waitForResponse( - response => - response.url().includes(`/api/v2/businesses/${identifier}/aliases`) - && response.request().method() === 'GET', - { timeout: 10000 } - ) - - await setupCorrectionPage(page, identifier, filingId, CRCTN_NO_FEE, 'STAFF', 'STAFF') - await navigateToCorrectionPage(page, identifier, filingId) - await aliasesRequest - await page.waitForLoadState('networkidle') - await expect(page.getByText(/loading/i)).not.toBeVisible({ timeout: 15000 }) - - const nameTranslationSection = page.getByTestId('name-translations-section') - await expect(nameTranslationSection).toBeVisible() - await expect(nameTranslationSection.locator('tbody')).toContainText('Nom Entreprise') - - // Make a different correction so submission can proceed. - await makeDirectorChange(page) - - await goToReview(page) - await fillCorrectionComment(page, 'Correcting existing name translation') - await fillCompletingParty(page) - await page.getByRole('radio', { name: 'No Fee' }).click() - - const submitRequest = page.waitForRequest( - req => req.url().includes(`/businesses/${identifier}/filings`) && req.method() === 'PUT', - { timeout: 10000 } - ) - - await page.getByRole('button', { name: 'Submit' }).click() - const request = await submitRequest - const requestBody = request.postDataJSON() - const correction = requestBody.filing.correction - - // Name translations are unchanged, so no translation delta should be sent. - expect(correction.nameTranslations).toEqual([]) - }) }) test.describe('Save and resume', () => {