@@ -12,7 +12,7 @@ describe('FilterComponent E2E Tests', () => {
1212 beforeEach ( ( ) => {
1313 login ( ) ;
1414 cy . waitUntilDashboardIsLoaded ( ) ;
15- cy . wait ( 500 ) ;
15+ cy . wait ( 1000 ) ;
1616 cy . get ( '[id="stack"]' ) . click ( ) ; // Replace with your custom wait command
1717 } ) ;
1818
@@ -33,17 +33,20 @@ describe('FilterComponent E2E Tests', () => {
3333 } ) ;
3434
3535 it ( 'should work with valid value' , ( ) => {
36- search ( 'asd2' ) ;
36+ const emptyText = 'We are sorry' ;
37+ search ( 'asd2' , emptyText ) ;
3738 } ) ;
3839
3940 it ( 'should apply filters where string' , ( ) => {
4041 const columnList = [ 'ID' , 'Name' ] ;
42+ const emptyText = 'We are sorry' ;
4143 columnList . forEach ( ( col ) => {
42- filterByString ( col ) ;
44+ filterByString ( col , emptyText ) ;
4345 } ) ;
44- filterByBoolean ( ) ;
46+ filterByBoolean ( emptyText ) ;
4547 } ) ;
4648 it ( 'should navigate through pagination' , ( ) => {
49+ cy . waitForLoaderToDisappear ( ) ;
4750 // Assuming you have a button or link for next and previous pagination
4851 // You can click these buttons to navigate through pages
4952 pagination ( ) ; // Click the "Previous" button
@@ -52,6 +55,7 @@ describe('FilterComponent E2E Tests', () => {
5255
5356 it ( 'should display stackDetails' , ( ) => {
5457 // cy.wait(5000);
58+ cy . waitForLoaderToDisappear ( ) ;
5559 cy . get ( 'table' ) . should ( 'exist' ) ;
5660
5761 // Select the first row within the table (modify the selector as needed)
@@ -61,6 +65,7 @@ describe('FilterComponent E2E Tests', () => {
6165 cy . get ( 'table tbody tr:eq(4)' ) . click ( { force : true } ) ;
6266
6367 cy . get ( '[data-testid="run_tab"]' ) . click ( ) ;
68+ cy . waitForLoaderToDisappear ( ) ;
6469 cy . get ( 'table' ) . should ( 'exist' ) ;
6570 cy . wait ( 5000 ) ;
6671 // Select the first row within the table (modify the selector as needed)
@@ -74,13 +79,14 @@ describe('FilterComponent E2E Tests', () => {
7479 it ( "should display Stacks's runs" , ( ) => {
7580 // cy.wait(5000);
7681 cy . waitForLoaderToDisappear ( ) ;
77- cy . get ( 'table' ) . should ( 'exist ') ;
82+ cy . checkTableAndH4Visibility ( 'Nothing to see here ') ;
7883
7984 // Select the first row within the table (modify the selector as needed)
8085 cy . get ( 'table tbody tr:eq(4)' ) . click ( { force : true } ) ;
81-
8286 cy . get ( '[data-testid="run_tab"]' ) . click ( ) ;
83- cy . get ( 'table' ) . should ( 'exist' ) ;
87+ cy . waitForLoaderToDisappear ( ) ;
88+ cy . checkTableAndH4Visibility ( 'No runs' ) ;
89+
8490 cy . waitForLoaderToDisappear ( ) ;
8591 const columnList = [ 'Run ID' , 'Run Name' ] ;
8692 const emptyText = 'No runs' ;
0 commit comments