From dd136858f1ea40ad3c94191d647487fa4f31926c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.0. Signed-off-by: Daniel Baumann --- tests/e2e/repo-wiki.test.e2e.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/e2e/repo-wiki.test.e2e.js (limited to 'tests/e2e/repo-wiki.test.e2e.js') diff --git a/tests/e2e/repo-wiki.test.e2e.js b/tests/e2e/repo-wiki.test.e2e.js new file mode 100644 index 0000000..4599fbd --- /dev/null +++ b/tests/e2e/repo-wiki.test.e2e.js @@ -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}); +}); -- cgit v1.2.3