Migrate playwright to typescript

This commit is contained in:
Anbraten 2024-11-08 09:55:54 +01:00
parent 30f795d925
commit 3a3416c069
No known key found for this signature in database
GPG key ID: B1222603899C6B25
25 changed files with 42 additions and 79 deletions

View file

@ -0,0 +1,17 @@
// @watch start
// web_src/css/markup/**
// @watch end
import {expect} from '@playwright/test';
import {test} from './utils_e2e.ts';
test('markup with #xyz-mode-only', async ({page}) => {
const response = await page.goto('/user2/repo1/issues/1');
expect(response?.status()).toBe(200);
await page.waitForLoadState('networkidle');
const comment = page.locator('.comment-body>.markup', {hasText: 'test markup light/dark-mode-only'});
await expect(comment).toBeVisible();
await expect(comment.locator('[src$="#gh-light-mode-only"]')).toBeVisible();
await expect(comment.locator('[src$="#gh-dark-mode-only"]')).toBeHidden();
});