@@ -200,14 +200,21 @@ describe('Popup', function () {
200200
201201 await browser . url ( popupUrl ( ) ) ;
202202 await waitForPopupLoaded ( ) ;
203- // Ensure the seeded bookmark is rendered before testing import duplicate detection
204203 await $ ( '.issue-item' ) . waitForDisplayed ( { timeout : 10000 } ) ;
205204
206205 const importBtn = await $ ( '#import-btn' ) ;
207206 await importBtn . click ( ) ;
208207
208+ // Set value directly and dispatch a single input event, rather than using
209+ // setValue which types character-by-character. Each keystroke triggers async
210+ // validation — on slow runners, a validation for partial text can resolve
211+ // after the final one, producing "1 invalid" instead of "1 duplicate".
209212 const textarea = await $ ( '#import-textarea' ) ;
210- await textarea . setValue ( `- ${ issueUrl ( TEST_ISSUES [ 0 ] ) } ` ) ;
213+ const pasteText = `- ${ issueUrl ( TEST_ISSUES [ 0 ] ) } ` ;
214+ await browser . execute ( function ( el , text ) {
215+ el . value = text ;
216+ el . dispatchEvent ( new Event ( 'input' , { bubbles : true } ) ) ;
217+ } , textarea , pasteText ) ;
211218 await browser . pause ( 500 ) ;
212219
213220 const validation = await $ ( '#import-validation' ) ;
@@ -401,6 +408,7 @@ describe('Options', function () {
401408
402409describe ( 'Navigation' , function ( ) {
403410 this . timeout ( 30000 ) ;
411+ this . retries ( 2 ) ;
404412
405413 const bookmarkSelector = '[data-extension-bookmark]' ;
406414 const headerActionsSelector = '[data-component="PH_Actions"]' ;
@@ -430,9 +438,9 @@ describe('Navigation', function () {
430438 await issueLink . waitForDisplayed ( { timeout : 10000 } ) ;
431439 await issueLink . click ( ) ;
432440
433- // Wait for issue page header actions
441+ // Wait for issue page header actions (30s: GitHub SPA can be slow on CI)
434442 const headerActions = await $ ( headerActionsSelector ) ;
435- await headerActions . waitForDisplayed ( { timeout : 15000 } ) ;
443+ await headerActions . waitForDisplayed ( { timeout : 30000 } ) ;
436444
437445 const bookmarkButton = await $ ( `${ headerActionsSelector } ${ bookmarkSelector } ` ) ;
438446 await bookmarkButton . waitForDisplayed ( { timeout : 10000 } ) ;
@@ -454,9 +462,9 @@ describe('Navigation', function () {
454462 await issueLink . waitForDisplayed ( { timeout : 10000 } ) ;
455463 await issueLink . click ( ) ;
456464
457- // Wait for issue page header actions
465+ // Wait for issue page header actions (30s: GitHub SPA can be slow on CI)
458466 const headerActions = await $ ( headerActionsSelector ) ;
459- await headerActions . waitForDisplayed ( { timeout : 15000 } ) ;
467+ await headerActions . waitForDisplayed ( { timeout : 30000 } ) ;
460468
461469 const bookmarkButton = await $ ( `${ headerActionsSelector } ${ bookmarkSelector } ` ) ;
462470 await bookmarkButton . waitForDisplayed ( { timeout : 10000 } ) ;
0 commit comments