@@ -14,6 +14,7 @@ describe('e2e: todomvc', () => {
1414 classList,
1515 enterValue,
1616 clearValue,
17+ timeout,
1718 } = setupPuppeteer ( )
1819
1920 async function removeItemAt ( n : number ) {
@@ -101,6 +102,7 @@ describe('e2e: todomvc', () => {
101102
102103 // active filter
103104 await click ( '.filters li:nth-child(2) a' )
105+ await timeout ( 1 )
104106 expect ( await count ( '.todo' ) ) . toBe ( 1 )
105107 expect ( await count ( '.todo.completed' ) ) . toBe ( 0 )
106108 // add item with filter active
@@ -109,6 +111,7 @@ describe('e2e: todomvc', () => {
109111
110112 // completed filter
111113 await click ( '.filters li:nth-child(3) a' )
114+ await timeout ( 1 )
112115 expect ( await count ( '.todo' ) ) . toBe ( 2 )
113116 expect ( await count ( '.todo.completed' ) ) . toBe ( 2 )
114117
@@ -128,13 +131,15 @@ describe('e2e: todomvc', () => {
128131 await click ( '.todo .toggle' )
129132 expect ( await count ( '.todo' ) ) . toBe ( 1 )
130133 await click ( '.filters li:nth-child(2) a' )
134+ await timeout ( 1 )
131135 expect ( await count ( '.todo' ) ) . toBe ( 3 )
132136 await click ( '.todo .toggle' )
133137 expect ( await count ( '.todo' ) ) . toBe ( 2 )
134138
135139 // editing triggered by blur
136140 await click ( '.filters li:nth-child(1) a' )
137- await click ( '.todo:nth-child(1) label' , { clickCount : 2 } )
141+ await timeout ( 1 )
142+ await click ( '.todo:nth-child(1) label' , { count : 2 } )
138143 expect ( await count ( '.todo.editing' ) ) . toBe ( 1 )
139144 expect ( await isFocused ( '.todo:nth-child(1) .edit' ) ) . toBe ( true )
140145 await clearValue ( '.todo:nth-child(1) .edit' )
@@ -144,21 +149,21 @@ describe('e2e: todomvc', () => {
144149 expect ( await text ( '.todo:nth-child(1) label' ) ) . toBe ( 'edited!' )
145150
146151 // editing triggered by enter
147- await click ( '.todo label' , { clickCount : 2 } )
152+ await click ( '.todo label' , { count : 2 } )
148153 await enterValue ( '.todo:nth-child(1) .edit' , 'edited again!' )
149154 expect ( await count ( '.todo.editing' ) ) . toBe ( 0 )
150155 expect ( await text ( '.todo:nth-child(1) label' ) ) . toBe ( 'edited again!' )
151156
152157 // cancel
153- await click ( '.todo label' , { clickCount : 2 } )
158+ await click ( '.todo label' , { count : 2 } )
154159 await clearValue ( '.todo:nth-child(1) .edit' )
155160 await page ( ) . type ( '.todo:nth-child(1) .edit' , 'edited!' )
156161 await page ( ) . keyboard . press ( 'Escape' )
157162 expect ( await count ( '.todo.editing' ) ) . toBe ( 0 )
158163 expect ( await text ( '.todo:nth-child(1) label' ) ) . toBe ( 'edited again!' )
159164
160165 // empty value should remove
161- await click ( '.todo label' , { clickCount : 2 } )
166+ await click ( '.todo label' , { count : 2 } )
162167 await enterValue ( '.todo:nth-child(1) .edit' , ' ' )
163168 expect ( await count ( '.todo' ) ) . toBe ( 3 )
164169
0 commit comments