mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 20:32:11 +00:00
[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
|
@ -67,7 +67,7 @@ test('Issue: Labels', async ({browser}, workerInfo) => {
|
|||
await expect(response?.status()).toBe(200);
|
||||
// preconditions
|
||||
await expect(labelList.filter({hasText: 'label1'})).toBeVisible();
|
||||
await expect(labelList.filter({hasText: 'label2'})).not.toBeVisible();
|
||||
await expect(labelList.filter({hasText: 'label2'})).toBeHidden();
|
||||
// add label2
|
||||
await page.locator('.select-label').click();
|
||||
// label search could be tested this way:
|
||||
|
@ -81,7 +81,7 @@ test('Issue: Labels', async ({browser}, workerInfo) => {
|
|||
await page.locator('.select-label .item').filter({hasText: 'label2'}).click();
|
||||
await page.locator('.select-label').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
await expect(labelList.filter({hasText: 'label2'})).not.toBeVisible();
|
||||
await expect(labelList.filter({hasText: 'label2'})).toBeHidden();
|
||||
await expect(labelList.filter({hasText: 'label1'})).toBeVisible();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue