mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 12:49:52 +01:00
Merge pull request 'tests(e2e): long search result overflow' (#5326) from fnetx/e2e-wiki-overflow into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5326 Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
This commit is contained in:
commit
1ca29a7db8
1 changed files with 16 additions and 0 deletions
16
tests/e2e/repo-wiki.test.e2e.js
Normal file
16
tests/e2e/repo-wiki.test.e2e.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
// @ts-check
|
||||
import {expect} from '@playwright/test';
|
||||
import {test} from './utils_e2e.js';
|
||||
|
||||
test(`Search for long titles and test for no overflow`, async ({page}, workerInfo) => {
|
||||
test.skip(workerInfo.project.name === 'Mobile Safari', 'Fails as always, see https://codeberg.org/forgejo/forgejo/pulls/5326#issuecomment-2313275');
|
||||
await page.goto('/user2/repo1/wiki');
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.getByPlaceholder('Search wiki').fill('spaces');
|
||||
await page.getByPlaceholder('Search wiki').click();
|
||||
// workaround: HTMX listens on keyup events, playwright's fill only triggers the input event
|
||||
// so we manually "type" the last letter
|
||||
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});
|
||||
});
|
Loading…
Reference in a new issue