Skip to content

Commit

Permalink
- Fixed a graph overview test.
Browse files Browse the repository at this point in the history
  • Loading branch information
boyan-tonchev committed Aug 9, 2023
1 parent d7b960b commit f2d8257
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test-cypress/integration/explore/graphs.overview.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {YasrSteps} from "../../steps/yasgui/yasr-steps";

const EXPORT_GRAPHS_TABLE_ID = '#export-graphs';
const ROWS_PER_PAGE_20 = '1';
const ROWS_PER_PAGE_ALL = '2';
Expand Down Expand Up @@ -118,7 +120,7 @@ describe('Graphs overview screen validation', () => {
// open default graph through the link and verify that the table view is rendered
cy.contains('The default graph').click();
cy.url().should('contain', Cypress.config('baseUrl') + '/resource');
cy.get('.resultsTable').should('be.visible')
.find('thead th').should('have.length', 5);
YasrSteps.getResultTableHeader().should('be.visible');
YasrSteps.getResultTableHeaderColumns().should('have.length', 5);
});
});
8 changes: 8 additions & 0 deletions test-cypress/steps/yasgui/yasr-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ export class YasrSteps {
return cy.get('.yasr_results tbody').find('tr');
}

static getResultTableHeader() {
return cy.get('.yasr_results thead');
}

static getResultTableHeaderColumns() {
return YasrSteps.getResultTableHeader().find('th');
}

static getResultFilter() {
return cy.get('.tableFilter');
}
Expand Down

0 comments on commit f2d8257

Please sign in to comment.