don't pollute history
This commit is contained in:
Родитель
2f5746adf8
Коммит
8337dfb9bc
|
@ -60,7 +60,7 @@ export const HeaderView: React.FC<React.PropsWithChildren<{
|
||||||
<input type='search' spellCheck={false} className='form-control subnav-search-input input-contrast width-full' value={filterText} onChange={e => {
|
<input type='search' spellCheck={false} className='form-control subnav-search-input input-contrast width-full' value={filterText} onChange={e => {
|
||||||
const filterText = e.target.value;
|
const filterText = e.target.value;
|
||||||
if (filterText)
|
if (filterText)
|
||||||
navigate(`#?` + new URLSearchParams({ q: filterText }));
|
setFilterText(filterText);
|
||||||
else
|
else
|
||||||
navigate('#');
|
navigate('#');
|
||||||
}}></input>
|
}}></input>
|
||||||
|
|
|
@ -2381,6 +2381,7 @@ for (const useIntermediateMergeReport of [true, false] as const) {
|
||||||
await showReport();
|
await showReport();
|
||||||
const searchInput = page.locator('.subnav-search-input');
|
const searchInput = page.locator('.subnav-search-input');
|
||||||
await searchInput.fill('a.test.js:3:11');
|
await searchInput.fill('a.test.js:3:11');
|
||||||
|
await searchInput.press('Enter');
|
||||||
await page.waitForURL(url => new URLSearchParams(url.hash.slice(1)).get('q') === 'a.test.js:3:11');
|
await page.waitForURL(url => new URLSearchParams(url.hash.slice(1)).get('q') === 'a.test.js:3:11');
|
||||||
await searchInput.clear();
|
await searchInput.clear();
|
||||||
await page.waitForURL(url => !new URLSearchParams(url.hash.slice(1)).has('q'));
|
await page.waitForURL(url => !new URLSearchParams(url.hash.slice(1)).has('q'));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче