mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
[v10.0/forgejo] tests(e2e): Various fixes to visual testing (#6587)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/6569 Co-authored-by: Otto Richter <git@otto.splvs.net> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6587 Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
parent
05056b8aa2
commit
26b7c6b86a
13 changed files with 34 additions and 20 deletions
|
@ -4,7 +4,7 @@
|
|||
// @watch end
|
||||
|
||||
import {expect} from '@playwright/test';
|
||||
import {test} from './utils_e2e.ts';
|
||||
import {save_visual, test} from './utils_e2e.ts';
|
||||
|
||||
for (const searchTerm of ['space', 'consectetur']) {
|
||||
for (const width of [null, 2560, 4000]) {
|
||||
|
@ -23,6 +23,7 @@ for (const searchTerm of ['space', 'consectetur']) {
|
|||
await page.getByPlaceholder('Search wiki').dispatchEvent('keyup');
|
||||
// timeout is necessary because HTMX search could be slow
|
||||
await expect(page.locator('#wiki-search a[href]')).toBeInViewport({ratio: 1});
|
||||
await save_visual(page);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -36,4 +37,5 @@ test(`Search results show titles (and not file names)`, async ({page}, workerInf
|
|||
// so we manually "type" the last letter
|
||||
await page.getByPlaceholder('Search wiki').dispatchEvent('keyup');
|
||||
await expect(page.locator('#wiki-search a[href] b')).toHaveText('Page With Spaced Name');
|
||||
await save_visual(page);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue