@@ -22,8 +22,8 @@ describe('Keyboard and accessibility workflows', () => {
2222 cy . press ( Cypress . Keyboard . Keys . TAB ) ;
2323 cy . focused ( ) . should ( 'contain.text' , 'Active' ) ;
2424
25- cy . contains ( 'label' , 'New Task ' ) . find ( 'input' ) . focus ( ) . type ( 'Keyboard task' ) ;
26- cy . contains ( 'button' , 'Add Task ' ) . focus ( ) ;
25+ cy . contains ( 'label' , 'New task ' ) . find ( 'input' ) . focus ( ) . type ( 'Keyboard task' ) ;
26+ cy . contains ( 'button' , 'Add task ' ) . focus ( ) ;
2727 cy . focused ( ) . type ( '{enter}' ) ;
2828 cy . getByTestId ( 'kanban-column-ideas' ) . should ( 'contain.text' , 'Keyboard task' ) ;
2929
@@ -35,7 +35,7 @@ describe('Keyboard and accessibility workflows', () => {
3535
3636 cy . getByTestId ( 'start-button' ) . focus ( ) ;
3737 cy . focused ( ) . type ( '{enter}' ) ;
38- cy . getByTestId ( 'timer-status' ) . should ( 'contain.text' , 'running ' ) ;
38+ cy . getByTestId ( 'timer-status' ) . should ( 'contain.text' , 'Running ' ) ;
3939 } ) ;
4040
4141 it ( 'restores focus after settings, quick-add, and task edit cancellation' , ( ) => {
@@ -50,10 +50,10 @@ describe('Keyboard and accessibility workflows', () => {
5050 cy . focused ( ) . should ( 'have.attr' , 'data-testid' , 'settings-button' ) ;
5151
5252 cy . getByTestId ( 'kanban-column-todo' ) . within ( ( ) => {
53- cy . contains ( 'button' , '+ Add task ' ) . click ( ) ;
53+ cy . contains ( 'button' , '+ Task ' ) . click ( ) ;
5454 cy . get ( 'input[name="quickAddTitle"]' ) . should ( 'be.focused' ) . type ( 'Canceled task' ) ;
5555 cy . focused ( ) . type ( '{esc}' ) ;
56- cy . focused ( ) . should ( 'contain.text' , '+ Add task ' ) ;
56+ cy . focused ( ) . should ( 'contain.text' , '+ Task ' ) ;
5757 } ) ;
5858
5959 cy . contains ( '[data-testid="task-card"]' , 'Keyboard audit task' ) . within ( ( ) => {
@@ -68,11 +68,11 @@ describe('Keyboard and accessibility workflows', () => {
6868 cy . visit ( '/' ) ;
6969
7070 cy . getByTestId ( 'settings-button' ) . click ( ) ;
71- cy . get ( '[aria-label="Edit shortcut for Search"] ') . click ( ) ;
72- cy . get ( '[aria-label="Edit shortcut for Search"] ') . should ( 'contain.text' , 'Press keys' ) ;
71+ shortcutButton ( ' Search') . click ( ) ;
72+ shortcutButton ( ' Search') . should ( 'contain.text' , 'Press keys' ) ;
7373
7474 cy . focused ( ) . type ( '{esc}' ) ;
75- cy . get ( '[aria-label="Edit shortcut for Search"] ') . should ( 'not.contain.text' , 'Press keys' ) ;
75+ shortcutButton ( ' Search') . should ( 'not.contain.text' , 'Press keys' ) ;
7676 cy . get ( '.settings-panel' ) . should ( 'be.visible' ) ;
7777
7878 cy . get ( 'body' ) . type ( '{esc}' ) ;
@@ -86,10 +86,10 @@ describe('Keyboard and accessibility workflows', () => {
8686 cy . getByTestId ( 'settings-button' ) . click ( ) ;
8787 cy . focused ( ) . should ( 'contain.text' , 'Close' ) ;
8888
89- cy . focused ( ) . type ( '{shift+tab}' ) ;
89+ cy . focused ( ) . trigger ( 'keydown' , { key : 'Tab' , shiftKey : true } ) ;
9090 cy . focused ( ) . should ( 'contain.text' , 'Apply' ) ;
9191
92- cy . focused ( ) . type ( '{tab}' ) ;
92+ cy . focused ( ) . trigger ( 'keydown' , { key : 'Tab' } ) ;
9393 cy . focused ( ) . should ( 'contain.text' , 'Close' ) ;
9494
9595 cy . get ( 'body' ) . type ( '{esc}' ) ;
@@ -106,8 +106,8 @@ describe('Keyboard and accessibility workflows', () => {
106106 } ,
107107 } ) ;
108108
109- cy . contains ( 'label' , 'New Task ' ) . find ( 'input' ) . type ( 'Reduced motion task' ) ;
110- cy . contains ( 'button' , 'Add Task ' ) . click ( ) ;
109+ cy . contains ( 'label' , 'New task ' ) . find ( 'input' ) . type ( 'Reduced motion task' ) ;
110+ cy . contains ( 'button' , 'Add task ' ) . click ( ) ;
111111 cy . getByTestId ( 'kanban-column-ideas' ) . should ( 'contain.text' , 'Reduced motion task' ) ;
112112
113113 cy . get ( '.kanban-density' ) . contains ( 'button' , 'Compact' ) . click ( ) ;
@@ -117,10 +117,14 @@ describe('Keyboard and accessibility workflows', () => {
117117
118118 cy . getByTestId ( 'start-button' ) . click ( ) ;
119119 cy . tick ( 1_000 ) ;
120- cy . getByTestId ( 'timer-status' ) . should ( 'contain.text' , 'running ' ) ;
120+ cy . getByTestId ( 'timer-status' ) . should ( 'contain.text' , 'Running ' ) ;
121121 } ) ;
122122} ) ;
123123
124+ function shortcutButton ( label : string ) : Cypress . Chainable < JQuery < HTMLButtonElement > > {
125+ return cy . contains ( '.shortcut-row' , label ) . find ( 'button.shortcut-key' ) ;
126+ }
127+
124128function createTask ( ) {
125129 return {
126130 id : 'task-keyboard-e2e' ,
0 commit comments