MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / checkFlashMessageVisibility

Function checkFlashMessageVisibility

e2e/flash.spec.ts:4–10  ·  view source on GitHub ↗
(page: Page, translation: string)

Source from the content-addressed store, hash-verified

2import translations from '../client/i18n/locales/english/translations.json';
3
4const 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
12test.describe('Flash Message component E2E test', () => {
13 test('Flash Message Visibility for Night Mode Toggle', async ({ page }) => {

Callers 1

flash.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected