fix(e2e): dropdown autocomplete reste ferme apres une recherche (flag) + reset panes attend le rendu
CI / lint (push) Successful in 28s
CI / security (push) Successful in 21s
CI / test (push) Successful in 33s
CI / build (push) Successful in 13s
CI / e2e (push) Failing after 6m12s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Successful in 28s
CI / security (push) Successful in 21s
CI / test (push) Successful in 33s
CI / build (push) Successful in 13s
CI / e2e (push) Failing after 6m12s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
- search.js : suppression par flag (jusqu a la prochaine frappe) au lieu d un timeout 500ms qui expirait avant le clic sur le bouton Forge - split-view.spec.js : le test reset panes attend l apparition de la liste de commandes (debounce 150ms du palette) avant Entree
This commit is contained in:
@@ -179,9 +179,10 @@ export const AutocompleteDropdown = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
// Après un hide() récent (ex: recherche lancée), on ignore le re-show
|
// Après un hide() (ex: recherche lancée), on ignore le re-show du fetch
|
||||||
// du fetch de suggestions en attente — sinon le dropdown recouvre l'UI.
|
// de suggestions en attente — sinon le dropdown recouvre l'UI. Le flag
|
||||||
if (this._suppressShowUntil && Date.now() < this._suppressShowUntil) return;
|
// est réarmé par la prochaine frappe (populate) ou le focus.
|
||||||
|
if (this._suppressShow) return;
|
||||||
if (this._dropdown) this._dropdown.hidden = false;
|
if (this._dropdown) this._dropdown.hidden = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -189,7 +190,7 @@ export const AutocompleteDropdown = {
|
|||||||
if (this._dropdown) this._dropdown.hidden = true;
|
if (this._dropdown) this._dropdown.hidden = true;
|
||||||
state.dropdownActiveIndex = -1;
|
state.dropdownActiveIndex = -1;
|
||||||
state.dropdownItems = [];
|
state.dropdownItems = [];
|
||||||
this._suppressShowUntil = Date.now() + 500;
|
this._suppressShow = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
isVisible() {
|
isVisible() {
|
||||||
@@ -199,6 +200,8 @@ export const AutocompleteDropdown = {
|
|||||||
/** Populate and show the dropdown with history, title suggestions, and tag suggestions */
|
/** Populate and show the dropdown with history, title suggestions, and tag suggestions */
|
||||||
async populate(inputValue, cursorPos) {
|
async populate(inputValue, cursorPos) {
|
||||||
if (this._suppressNext) { this._suppressNext = false; return; }
|
if (this._suppressNext) { this._suppressNext = false; return; }
|
||||||
|
// Nouvelle frappe (ou focus) : réautorise l'affichage du dropdown
|
||||||
|
this._suppressShow = false;
|
||||||
// Cancel previous suggestion request
|
// Cancel previous suggestion request
|
||||||
if (state.suggestAbortController) {
|
if (state.suggestAbortController) {
|
||||||
state.suggestAbortController.abort();
|
state.suggestAbortController.abort();
|
||||||
|
|||||||
@@ -302,7 +302,8 @@ test.describe('Split View — Persistence', () => {
|
|||||||
const input = page.locator('#cp-input');
|
const input = page.locator('#cp-input');
|
||||||
if (await input.isVisible()) {
|
if (await input.isVisible()) {
|
||||||
await input.fill('>réinitialiser');
|
await input.fill('>réinitialiser');
|
||||||
await page.waitForTimeout(200);
|
// Attendre le rendu de la liste filtrée (debounce 150ms du palette)
|
||||||
|
await page.waitForSelector('.cp-item', { timeout: 3000 });
|
||||||
await page.keyboard.press('Enter');
|
await page.keyboard.press('Enter');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user