Skip to content

Commit 1b19d02

Browse files
committed
test: verify that fast typers will still get the search results
We just fixed a bug where the search results URL wasn't yet generated, and as a result the `https://git-scm.com/undefined` URL was used when a user typed a search term really fast and hit Enter. Let's make sure that this bug never regresses. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent cf8a9d0 commit 1b19d02

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/git-scm.spec.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,17 @@ test.describe('Linux', () => {
105105
test('search', async ({ page }) => {
106106
await page.goto(url)
107107

108-
// Search for "commit"
108+
// Full search for "commit"
109109
const searchBox = page.getByPlaceholder('Type / to search entire site…')
110110
await searchBox.fill('commit')
111+
await searchBox.press('Enter')
112+
113+
await expect(page).toHaveURL(/\/search\/results\?search=commit/)
114+
115+
await page.goto(url)
116+
117+
// Search for "commit"
118+
await searchBox.fill('commit')
111119
await searchBox.press('Shift')
112120

113121
// Expect the div to show up

0 commit comments

Comments
 (0)