feat: convert intro page test to playwright (#54620)

This commit is contained in:
Sem Bauke
2024-05-03 11:00:29 +02:00
committed by GitHub
parent c17587f656
commit 5ad1bfcc2b
2 changed files with 13 additions and 10 deletions

View File

@@ -1,10 +0,0 @@
describe('Certification intro page', () => {
it('Should render', () => {
cy.visit('/learn/coding-interview-prep');
cy.contains(
"If you're looking for free coding exercises to prepare for your next job interview, we've got you covered."
).should('be.visible');
cy.title().should('eq', 'Coding Interview Prep | freeCodeCamp.org');
});
});

13
e2e/intro-page.spec.ts Normal file
View File

@@ -0,0 +1,13 @@
import { test, expect } from '@playwright/test';
test.describe('Certification intro page', () => {
test('Should render', async ({ page }) => {
await page.goto('/learn/coding-interview-prep');
await expect(
page.getByText(
"If you're looking for free coding exercises to prepare for your next job interview, we've got you covered."
)
).toBeVisible();
await expect(page).toHaveTitle('Coding Interview Prep | freeCodeCamp.org');
});
});