mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
24 lines
754 B
TypeScript
24 lines
754 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto(
|
|
'/learn/foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/trophy-write-your-first-code-using-c-sharp'
|
|
);
|
|
});
|
|
|
|
test.afterEach(async ({ page }) => {
|
|
await page.close();
|
|
});
|
|
|
|
test.describe('Challenge Description Component Tests', () => {
|
|
test('should be visible', async ({ page }) => {
|
|
const challengeDescription = page.getByTestId('challenge-description');
|
|
await expect(challengeDescription).toBeVisible();
|
|
});
|
|
|
|
test('should contain text', async ({ page }) => {
|
|
const challengeDescription = page.getByTestId('challenge-description');
|
|
await expect(challengeDescription).toHaveText(/ */);
|
|
});
|
|
});
|