mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 00:10:15 +00:00
Migrate playwright to typescript
This commit is contained in:
parent
30f795d925
commit
3a3416c069
25 changed files with 42 additions and 79 deletions
17
tests/e2e/markup.test.e2e.ts
Normal file
17
tests/e2e/markup.test.e2e.ts
Normal 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();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue