Skip to content

Commit

Permalink
feat: convert Sass test to Playwright test (#54618)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sembauke committed May 7, 2024
1 parent 3791f73 commit 6016c18
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 28 deletions.
28 changes: 0 additions & 28 deletions cypress/e2e/default/learn/challenges/sass.ts

This file was deleted.

20 changes: 20 additions & 0 deletions e2e/sass.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { test, expect } from '@playwright/test';

test.describe('Sass Challenge', () => {
test.beforeEach(async ({ page }) => {
await page.goto(
'/learn/front-end-development-libraries/sass/use-for-to-create-a-sass-loop'
);
});

test('should render the sass preview', async ({ page }) => {
const frame = page.frameLocator('.challenge-preview iframe');
expect(frame).not.toBeNull();

await expect(frame.locator('.text-1')).toBeVisible();
await expect(frame.locator('.text-2')).toBeVisible();
await expect(frame.locator('.text-3')).toBeVisible();
await expect(frame.locator('.text-4')).toBeVisible();
await expect(frame.locator('.text-5')).toBeVisible();
});
});

0 comments on commit 6016c18

Please sign in to comment.