Skip to content

Commit

Permalink
Cypress Test: via PR comment (#2189)
Browse files Browse the repository at this point in the history
Remove - cypress test change to test through PR comment because it did not report its test status
  • Loading branch information
ifarzana authored Nov 1, 2023
1 parent 1a3dab4 commit 4b49d9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
jobs:
test-suite:
name: Build Containers and Run Tests
if: github.event.issue.pull_request
runs-on: ubuntu-22.04
steps:
- name: Check Comment
Expand Down
20 changes: 12 additions & 8 deletions cypress/e2e/report_proofofplay.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,18 @@ describe('Proof of Play', function() {
// Wait for
cy.wait('@reportData');

// Should have media stats
cy.get('#stats tbody tr').should('have.length', 1);
cy.get('#stats tbody tr:nth-child(1) td:nth-child(1)').contains('media'); // stat type
cy.get('#stats tbody tr:nth-child(1) td:nth-child(3)').contains('POP Display 1'); // display
cy.get('#stats tbody tr:nth-child(1) td:nth-child(6)').contains('POP Layout 1'); // layout
cy.get('#stats tbody tr:nth-child(1) td:nth-child(8)').contains('child_folder_media'); // media
cy.get('#stats tbody tr:nth-child(1) td:nth-child(10)').contains(2); // number of plays
cy.get('#stats tbody tr:nth-child(1) td:nth-child(12)').contains(120); // total duration
cy.get('#stats').within(() => {
// Check if the "No data available in table" message is not present
cy.contains('No data available in table').should('not.exist');
cy.get('tbody tr').should('have.length', 1);
// Should have media stats
cy.get('tbody td').eq(0).should('contain', 'media'); // stat type
cy.get('tbody td').eq(2).contains('POP Display 1'); // display
cy.get('tbody td').eq(5).contains('POP Layout 1'); // layout
cy.get('tbody td').eq(7).contains('child_folder_media'); // media
cy.get('tbody td').eq(9).contains(2); // number of plays
cy.get('tbody td').eq(11).contains(120); // total duration
});

cy.get('#type').select('layout');

Expand Down

0 comments on commit 4b49d9b

Please sign in to comment.