feat: convert Sass test to Playwright test (#54618)

This commit is contained in:
Sem Bauke
2024-05-07 08:01:18 +02:00
committed by GitHub
parent 3791f734f5
commit 6016c181d4
2 changed files with 20 additions and 28 deletions
+20
View File
@@ -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();
});
});