| 2 | import translations from '../client/i18n/locales/english/translations.json'; |
| 3 | |
| 4 | const checkFlashMessageVisibility = async (page: Page, translation: string) => { |
| 5 | const flashMessage = page.getByText(translation); |
| 6 | await expect(flashMessage).toBeVisible(); |
| 7 | const closeButton = page.getByRole('button', { name: 'close' }); |
| 8 | await closeButton.click(); |
| 9 | await expect(flashMessage).not.toBeVisible(); |
| 10 | }; |
| 11 | |
| 12 | test.describe('Flash Message component E2E test', () => { |
| 13 | test('Flash Message Visibility for Night Mode Toggle', async ({ page }) => { |