Skip to content

Commit

Permalink
tests: rejig waits on certain tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Jan 30, 2025
1 parent 16ffe28 commit 0a43067
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/rbac/organizations/orgAdmin.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ orgAdmin.forEach(admin => {
});

it('Navigates to a project, adds a group and notifications', () => {
cy.waitForNetworkIdle('@idle', 1000);
cy.visit(
`${Cypress.env('url')}/organizations/lagoon-demo-organization/projects/${
testData.organizations.project.projectName
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/rbac/organizations/orgViewer.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe(`Organizations ORGVIEWER journey`, () => {
project.doFailedaddProject(testData.organizations.project);
});

it('Navigates to notifications and fails to create any - no permission for ORVIEWER', () => {
it('Navigates to notifications and fails to create any - no permission for ORGVIEWER', () => {
cy.intercept('POST', Cypress.env('api'), req => {
aliasMutation(req, 'addNotificationSlack');
aliasMutation(req, 'UpdateNotificationSlack');
Expand Down Expand Up @@ -91,8 +91,8 @@ describe(`Organizations ORGVIEWER journey`, () => {
});

it('Navigates to a project, fails to add a group or notifications - no permission for ORGVIEWER', () => {
cy.visit(`${Cypress.env('url')}/organizations/lagoon-demo-organization/projects/lagoon-demo-org`);
cy.waitForNetworkIdle('@idle', 1000);
cy.visit(`${Cypress.env('url')}/organizations/lagoon-demo-organization/projects/lagoon-demo-org`);

cy.getBySel('addGroupToProject').click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ orgownerAndPlatformOwner.forEach(owner => {
});

it('Navigates to a project, adds a group and notifications', () => {
cy.waitForNetworkIdle('@idle', 1000);
cy.visit(
`${Cypress.env('url')}/organizations/lagoon-demo-organization/projects/${
testData.organizations.project.projectName
}`
);
cy.waitForNetworkIdle('@idle', 1000);

cy.getBySel('addGroupToProject').click();

Expand Down
1 change: 1 addition & 0 deletions cypress/support/actions/organizations/GroupsAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default class GroupAction {
doAddGroup(newGroup1: string, newGroup2: string) {
groupRepo.getAddGroupBtn('addNewGroup').click();
groupRepo.getGroupNameInput().type(newGroup1);
cy.waitForNetworkIdle('@idle', 1000);
groupRepo.getAddGroupSubmitBtn().click();

cy.wait(['@gqladdGroupToOrganizationMutation', '@gqlgetOrganizationQuery']);
Expand Down

0 comments on commit 0a43067

Please sign in to comment.