forked from kevadesu/forgejo
[CHORE] Add playwright eslint plugin
- Add https://github.com/playwright-community/eslint-plugin-playwright as a linter for the playwright tests. - `no-networkidle` and `no-conditional-in-test` are disabled as fixing those doesn't seem to really improve testing quality for our use case. - Some non-recommended linters are enabled to ensure consistency (the prefer rules).
This commit is contained in:
parent
d405143919
commit
40baa96fc3
11 changed files with 66 additions and 20 deletions
|
@ -1,7 +1,7 @@
|
|||
// @ts-check
|
||||
import {test, expect} from '@playwright/test';
|
||||
|
||||
test('Test markup with #xyz-mode-only', async ({page}) => {
|
||||
test('markup with #xyz-mode-only', async ({page}) => {
|
||||
const response = await page.goto('/user2/repo1/issues/1');
|
||||
await expect(response?.status()).toBe(200);
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
@ -9,5 +9,5 @@ test('Test markup with #xyz-mode-only', async ({page}) => {
|
|||
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"]')).not.toBeVisible();
|
||||
await expect(comment.locator('[src$="#gh-dark-mode-only"]')).toBeHidden();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue