diff --git a/CHANGELOG.md b/CHANGELOG.md index c0dd931..8011edf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [UNRELEASED] + ## [1.3.1] - 2026-10-06 ### Added diff --git a/tests/e2e/specs/reservation_question.spec.ts b/tests/e2e/specs/reservation_question.spec.ts index 945e935..d748977 100644 --- a/tests/e2e/specs/reservation_question.spec.ts +++ b/tests/e2e/specs/reservation_question.spec.ts @@ -106,9 +106,9 @@ test.describe('Advanced forms - Material reservation question', () => { await expect(reservation.getAvailabilityMessage(widget)).toHaveText('This slot is available'); await page.getByRole('button', { name: 'Submit' }).click(); - // Scoped to the success alert, since the same link also appears - // permanently in the ticket's "Items" tab. - await expect(form.getAlert(form_name).getByRole('link', { name: form_name })).toBeVisible(); + // A single created ticket triggers a redirection to it, confirming the submission succeeded. + await expect(page).toHaveURL(/\/front\/ticket\.form\.php\?id=\d+/); + await expect(page.getByRole('heading')).toContainText(form_name); }); }); diff --git a/tests/e2e/specs/table_question.spec.ts b/tests/e2e/specs/table_question.spec.ts index f2cc764..d3107c7 100644 --- a/tests/e2e/specs/table_question.spec.ts +++ b/tests/e2e/specs/table_question.spec.ts @@ -106,10 +106,9 @@ test.describe('Advanced forms - Table question', () => { await page.getByRole('button', { name: 'Submit' }).click(); - // A link to the created answer/item confirms the submission succeeded. - // Scoped to the success alert, since the same link also appears - // permanently in the ticket's "Items" tab. - await expect(form.getAlert(form_name).getByRole('link', { name: form_name })).toBeVisible(); + // A single created ticket triggers a redirection to it, confirming the submission succeeded. + await expect(page).toHaveURL(/\/front\/ticket\.form\.php\?id=\d+/); + await expect(page.getByRole('heading')).toContainText(form_name); }); }); @@ -180,9 +179,9 @@ test.describe('Advanced forms - Table question', () => { await expect(table.getEndUserCell(eu_table, 0, 0)).not.toHaveClass(/is-invalid/); await page.getByRole('button', { name: 'Submit' }).click(); - // Scoped to the success alert, since the same link also appears - // permanently in the ticket's "Items" tab. - await expect(form.getAlert(form_name).getByRole('link', { name: form_name })).toBeVisible(); + // A single created ticket triggers a redirection to it, confirming the submission succeeded. + await expect(page).toHaveURL(/\/front\/ticket\.form\.php\?id=\d+/); + await expect(page.getByRole('heading')).toContainText(form_name); }); }); @@ -226,9 +225,9 @@ test.describe('Advanced forms - Table question', () => { await page.getByRole('button', { name: 'Submit' }).click(); - // Scoped to the success alert, since the same link also appears - // permanently in the ticket's "Items" tab. - await expect(form.getAlert(form_name).getByRole('link', { name: form_name })).toBeVisible(); + // A single created ticket triggers a redirection to it, confirming the submission succeeded. + await expect(page).toHaveURL(/\/front\/ticket\.form\.php\?id=\d+/); + await expect(page.getByRole('heading')).toContainText(form_name); }); });