Skip to content

Commit

Permalink
test(Project): fix waiting for loading project list
Browse files Browse the repository at this point in the history
  • Loading branch information
asabotovich committed Sep 20, 2024
1 parent 94ac3a8 commit 83bea58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cypress/e2e/projects.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,14 @@ describe('Projects', () => {
});

beforeEach(() => {
cy.intercept('/api/trpc/v2.project.getUserDashboardProjects*').as('dashboardLoad');
cy.get(filtersPanelResetButton.query).should('exist').click();
cy.get(projectListItem.query).should('exist').and('have.length.greaterThan', 1);
cy.get(projectListItemTitle.query).should('contain.text', testProjectTitle);
cy.get(dashboardLoadMore.query).click();

cy.wait('@dashboardLoad');

cy.get(`[href="${routes.project(testProjectKey)}"]`).should('exist');
cy.visit(exactUrl(routes.project(testProjectKey)));
// wait for correct page
Expand Down

0 comments on commit 83bea58

Please sign in to comment.