Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress Test: via PR comment #2189

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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