File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,10 +22,9 @@ enum Col {
2222 Delete = 5 ,
2323}
2424
25- const hasClient =
26- ( name : string , row : number ) : ( ( ) => Promise < void > ) =>
25+ const waitForClient = ( name : string , row : number ) : ( ( ) => Promise < void > ) =>
2726 async ( ) => {
28- expect ( await innerText ( page , $table . cell ( row , Col . Name ) ) ) . toBe ( name ) ;
27+ await waitForExists ( page , $table . cell ( row , Col . Name ) , name ) ;
2928 } ;
3029
3130const updateClient =
@@ -79,7 +78,7 @@ describe('Client', () => {
7978 expect ( await innerText ( page , $table . cell ( 3 , Col . Name ) ) ) . toBe ( 'desktop app' ) ;
8079 } ) ;
8180 it ( 'updates client' , updateClient ( 1 , { name : 'firefox' } ) ) ;
82- it ( 'has updated client name' , hasClient ( 'firefox' , 1 ) ) ;
81+ it ( 'has updated client name' , waitForClient ( 'firefox' , 1 ) ) ;
8382 it ( 'shows token' , async ( ) => {
8483 await page . click ( $table . cell ( 3 , Col . Token , '.toggle-visibility' ) ) ;
8584 expect ( ( await innerText ( page , $table . cell ( 3 , Col . Token ) ) ) . startsWith ( 'C' ) ) . toBeTruthy ( ) ;
You can’t perform that action at this time.
0 commit comments