@@ -372,7 +372,7 @@ describe("AutofillInlineMenuList", () => {
372372
373373 firstFillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowDown" } ) ) ;
374374
375- expect ( ( secondFillCipherElement as HTMLElement ) . focus ) . toBeCalled ( ) ;
375+ expect ( ( secondFillCipherElement as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
376376 } ) ;
377377
378378 it ( "directs focus to the first item in the cipher list if no cipher is present after the current one when pressing ArrowDown and no new item button exists" , ( ) => {
@@ -386,7 +386,7 @@ describe("AutofillInlineMenuList", () => {
386386
387387 lastFillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowDown" } ) ) ;
388388
389- expect ( ( firstFillCipherElement as HTMLElement ) . focus ) . toBeCalled ( ) ;
389+ expect ( ( firstFillCipherElement as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
390390 } ) ;
391391
392392 it ( "directs focus to the new item button if no cipher is present after the current one when pressing ArrowDown" , async ( ) => {
@@ -406,7 +406,7 @@ describe("AutofillInlineMenuList", () => {
406406
407407 lastFillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowDown" } ) ) ;
408408
409- expect ( autofillInlineMenuList [ "newItemButtonElement" ] . focus ) . toBeCalled ( ) ;
409+ expect ( autofillInlineMenuList [ "newItemButtonElement" ] . focus ) . toHaveBeenCalled ( ) ;
410410 } ) ;
411411
412412 it ( "allows the user to move keyboard focus to the previous cipher element on ArrowUp" , ( ) => {
@@ -420,7 +420,7 @@ describe("AutofillInlineMenuList", () => {
420420
421421 secondFillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowUp" } ) ) ;
422422
423- expect ( ( firstFillCipherElement as HTMLElement ) . focus ) . toBeCalled ( ) ;
423+ expect ( ( firstFillCipherElement as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
424424 } ) ;
425425
426426 it ( "directs focus to the last item in the cipher list if no cipher is present before the current one when pressing ArrowUp" , ( ) => {
@@ -434,7 +434,7 @@ describe("AutofillInlineMenuList", () => {
434434
435435 firstFillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowUp" } ) ) ;
436436
437- expect ( ( lastFillCipherElement as HTMLElement ) . focus ) . toBeCalled ( ) ;
437+ expect ( ( lastFillCipherElement as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
438438 } ) ;
439439
440440 it ( "directs focus to the new item button if no cipher is present before the current one when pressing ArrowUp" , async ( ) => {
@@ -454,7 +454,7 @@ describe("AutofillInlineMenuList", () => {
454454
455455 firstFillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowUp" } ) ) ;
456456
457- expect ( autofillInlineMenuList [ "newItemButtonElement" ] . focus ) . toBeCalled ( ) ;
457+ expect ( autofillInlineMenuList [ "newItemButtonElement" ] . focus ) . toHaveBeenCalled ( ) ;
458458 } ) ;
459459
460460 it ( "allows the user to move keyboard focus to the view cipher button on ArrowRight" , ( ) => {
@@ -466,7 +466,7 @@ describe("AutofillInlineMenuList", () => {
466466
467467 fillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowRight" } ) ) ;
468468
469- expect ( ( viewCipherButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
469+ expect ( ( viewCipherButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
470470 } ) ;
471471
472472 it ( "ignores keyup events that do not include ArrowUp, ArrowDown, or ArrowRight" , ( ) => {
@@ -476,7 +476,7 @@ describe("AutofillInlineMenuList", () => {
476476
477477 fillCipherElement . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowLeft" } ) ) ;
478478
479- expect ( ( fillCipherElement as HTMLElement ) . focus ) . not . toBeCalled ( ) ;
479+ expect ( ( fillCipherElement as HTMLElement ) . focus ) . not . toHaveBeenCalled ( ) ;
480480 } ) ;
481481 } ) ;
482482
@@ -506,7 +506,7 @@ describe("AutofillInlineMenuList", () => {
506506
507507 viewCipherButton . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowLeft" } ) ) ;
508508
509- expect ( ( fillCipherButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
509+ expect ( ( fillCipherButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
510510 } ) ;
511511
512512 it ( "allows the user to move keyboard to the next cipher element on ArrowDown" , ( ) => {
@@ -519,7 +519,7 @@ describe("AutofillInlineMenuList", () => {
519519
520520 viewCipherButton . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowDown" } ) ) ;
521521
522- expect ( ( secondFillCipherButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
522+ expect ( ( secondFillCipherButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
523523 } ) ;
524524
525525 it ( "allows the user to move keyboard focus to the previous cipher element on ArrowUp" , ( ) => {
@@ -532,7 +532,7 @@ describe("AutofillInlineMenuList", () => {
532532
533533 viewCipherButton . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowUp" } ) ) ;
534534
535- expect ( ( firstFillCipherButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
535+ expect ( ( firstFillCipherButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
536536 } ) ;
537537
538538 it ( "ignores keyup events that do not include ArrowUp, ArrowDown, or ArrowRight" , ( ) => {
@@ -542,7 +542,7 @@ describe("AutofillInlineMenuList", () => {
542542
543543 viewCipherButton . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowRight" } ) ) ;
544544
545- expect ( ( viewCipherButton as HTMLElement ) . focus ) . not . toBeCalled ( ) ;
545+ expect ( ( viewCipherButton as HTMLElement ) . focus ) . not . toHaveBeenCalled ( ) ;
546546 } ) ;
547547 } ) ;
548548
@@ -769,7 +769,7 @@ describe("AutofillInlineMenuList", () => {
769769
770770 viewCipherButton . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowDown" } ) ) ;
771771
772- expect ( ( fillCipherButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
772+ expect ( ( fillCipherButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
773773 } ) ;
774774
775775 it ( "skips the passkeys heading when the user presses ArrowDown to focus the first list item" , ( ) => {
@@ -781,7 +781,7 @@ describe("AutofillInlineMenuList", () => {
781781
782782 viewCipherButton . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowDown" } ) ) ;
783783
784- expect ( ( fillCipherButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
784+ expect ( ( fillCipherButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
785785 } ) ;
786786
787787 it ( "skips the logins heading when the user presses ArrowUp to focus the previous list item" , ( ) => {
@@ -793,7 +793,7 @@ describe("AutofillInlineMenuList", () => {
793793
794794 viewCipherButton . dispatchEvent ( new KeyboardEvent ( "keyup" , { code : "ArrowUp" } ) ) ;
795795
796- expect ( ( fillCipherButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
796+ expect ( ( fillCipherButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
797797 } ) ;
798798 } ) ;
799799 } ) ;
@@ -875,7 +875,7 @@ describe("AutofillInlineMenuList", () => {
875875 new KeyboardEvent ( "keyup" , { code : "ArrowRight" } ) ,
876876 ) ;
877877
878- expect ( ( refreshGeneratedPasswordButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
878+ expect ( ( refreshGeneratedPasswordButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
879879 } ) ;
880880 } ) ;
881881 } ) ;
@@ -945,7 +945,7 @@ describe("AutofillInlineMenuList", () => {
945945 new KeyboardEvent ( "keyup" , { code : "ArrowLeft" } ) ,
946946 ) ;
947947
948- expect ( ( fillGeneratedPasswordButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
948+ expect ( ( fillGeneratedPasswordButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
949949 } ) ;
950950 } ) ;
951951 } ) ;
@@ -1163,7 +1163,7 @@ describe("AutofillInlineMenuList", () => {
11631163
11641164 postWindowMessage ( { command : "focusAutofillInlineMenuList" } ) ;
11651165
1166- expect ( ( unlockButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
1166+ expect ( ( unlockButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
11671167 } ) ;
11681168
11691169 it ( "focuses the new item button element if the cipher list is empty" , async ( ) => {
@@ -1175,7 +1175,7 @@ describe("AutofillInlineMenuList", () => {
11751175
11761176 postWindowMessage ( { command : "focusAutofillInlineMenuList" } ) ;
11771177
1178- expect ( ( newItemButton as HTMLElement ) . focus ) . toBeCalled ( ) ;
1178+ expect ( ( newItemButton as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
11791179 } ) ;
11801180
11811181 it ( "focuses the first cipher button element if the cipher list is populated" , ( ) => {
@@ -1186,7 +1186,7 @@ describe("AutofillInlineMenuList", () => {
11861186
11871187 postWindowMessage ( { command : "focusAutofillInlineMenuList" } ) ;
11881188
1189- expect ( ( firstCipherItem as HTMLElement ) . focus ) . toBeCalled ( ) ;
1189+ expect ( ( firstCipherItem as HTMLElement ) . focus ) . toHaveBeenCalled ( ) ;
11901190 } ) ;
11911191 } ) ;
11921192
0 commit comments