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

Function alertToBeVisible

e2e/utils/alerts.ts:3–4  ·  view source on GitHub ↗
(page: Page, text: string)

Source from the content-addressed store, hash-verified

1import { expect, type Page } from '@playwright/test';
2
3export const alertToBeVisible = async (page: Page, text: string) =>
4 await expect(page.getByRole('alert').filter({ hasText: text })).toBeVisible();

Calls

no outgoing calls

Tested by 1

testInvalidCertificationFunction · 0.72