Skip to content

Commit

Permalink
Fix export test
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo committed May 31, 2024
1 parent 70a74c7 commit e15b45f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cypress/utils/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,26 @@ export const itHasNoActiveFilter = () => {
};

export const itExportsDataToFile = (jsonData, filenamePrefix) => {
it.skip('exports data to JSON and CSV files', () => {
it('exports data to JSON and CSV files', () => {
cy.clock(Date.now());

cy.get('.pf-v5-c-toolbar__content-section > :nth-child(2) > .pf-v5-c-menu-toggle').click();
cy.get('[data-ouia-component-id=Export] .pf-v5-c-dropdown__menu-item').should(
// the toggle of the export dropdown has aria-label of "Export"
// the actual dropdown has ouiaId of "Export"

cy.get('[aria-label=Export]').click();

cy.get('[data-ouia-component-id=Export] .pf-v5-c-menu__item').should(
'have.length',
3
);
cy.get('[data-ouia-component-id=Export] .pf-v5-c-dropdown__menu-item')

cy.get('[data-ouia-component-id=Export] .pf-v5-c-menu__item')
.contains('Export to JSON')
.click();

cy.get('[data-ouia-component-id=Export] button').click();
cy.get('[aria-label=Export]').click();

cy.get('[data-ouia-component-id=Export] .pf-v5-c-dropdown__menu-item')
cy.get('[data-ouia-component-id=Export] .pf-v5-c-menu__item')
.contains('Export to CSV')
.click();

Expand Down

0 comments on commit e15b45f

Please sign in to comment.