File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export class ToastsService extends FtrService {
7373
7474 public async assertToastCount ( expectedCount : number ) {
7575 await this . retry . tryForTime ( 5 * 1000 , async ( ) => {
76- const toastCount = await this . getToastCount ( 1000 ) ;
76+ const toastCount = await this . getToastCount ( { timeout : 1000 } ) ;
7777 expect ( toastCount ) . to . eql (
7878 expectedCount ,
7979 `Toast count should be ${ expectedCount } (got ${ toastCount } )`
@@ -96,13 +96,13 @@ export class ToastsService extends FtrService {
9696 return await list . findAllByCssSelector ( `.euiToast` ) ;
9797 }
9898
99- private async getGlobalToastList ( timeout ?: number ) {
100- return await this . testSubjects . find ( 'globalToastList' , timeout ) ;
99+ private async getGlobalToastList ( options ?: { timeout ?: number } ) {
100+ return await this . testSubjects . find ( 'globalToastList' , options ?. timeout ) ;
101101 }
102102
103- public async getToastCount ( timeout ?: number ) {
104- const list = await this . getGlobalToastList ( timeout ) ;
105- const toasts = await list . findAllByCssSelector ( `.euiToast` , timeout ) ;
103+ public async getToastCount ( options ?: { timeout ?: number } ) {
104+ const list = await this . getGlobalToastList ( options ) ;
105+ const toasts = await list . findAllByCssSelector ( `.euiToast` , options ?. timeout ) ;
106106 return toasts . length ;
107107 }
108108}
You can’t perform that action at this time.
0 commit comments