Skip to content

Commit

Permalink
fix: get the new projects order each time
Browse files Browse the repository at this point in the history
  • Loading branch information
aziolek committed Jan 13, 2025
1 parent 7ce4b4c commit 3ae2f74
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/cypress/e2e/_17projects.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ Object.values(viewports).forEach(

/**
* This could be done in before hook, but CY wipes the state after each test
* (could be disabled, but creates other problems)
* (could be disabled, but creates other problems).
*
* Needs to be done for each test, because each has different default "random" order for projects.
*/
if (projectNames.length === 0) {
projectNames = getNamesOfProjects();
}
projectNames = getNamesOfProjects();
});

it('header is visible', () => {
Expand All @@ -202,7 +202,6 @@ Object.values(viewports).forEach(
for (let i = 0; i < projectNames.length; i++) {
cy.get('[data-test^=ProjectsView__ProjectsListItem]').eq(i).scrollIntoView();
checkProjectItemElements(i, projectNames[i]);
cy.wait(500);
}
});

Expand Down

0 comments on commit 3ae2f74

Please sign in to comment.