Skip to content

Commit

Permalink
fix: Update "renders every Experiment name into the table" test to no…
Browse files Browse the repository at this point in the history
…t check order

Signed-off-by: Xinmin Du <[email protected]>
  • Loading branch information
Doris-xm committed Jan 21, 2025
1 parent c15f594 commit 5fef940
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/ui/v1beta1/frontend/cypress/e2e/index-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ describe('Index page', () => {
cy.visit('/');
cy.wait(['@mockNamespacesRequest', '@mockExperimentsRequest']);

let i = 0;
const experiments = this.experimentsRequest;
// Table is sorted by Name in ascending order by default
// and experiment objects are also sorted alphabetically by name
cy.get(`[data-cy-resource-table-row="Name"]`).each(element => {
expect(element).to.contain(experiments[i].name);
i++;
// Table is sorted by CreatedTime in descending order by default
// Experiment objects are sorted alphabetically by name
// We don't check the order of experiments in this test
cy.get(`[data-cy-resource-table-row="Name"]`).each((element, index) => {
expect(element).to.contain(experiments[index].name);
});
});

Expand Down

0 comments on commit 5fef940

Please sign in to comment.