Skip to content

Commit

Permalink
chore: electron
Browse files Browse the repository at this point in the history
use a real browser for testing
  • Loading branch information
jlangy committed May 10, 2024
1 parent 150d6f8 commit 1f20e2d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
spec: |
cypress/e2e/**/integration-990-deleteAllIntegrations.cy.ts
cypress/e2e/**/team-900-*.cy.ts
browser: chrome
browser: electron
# project: ./e2e
ci-build-id: ${{ github.event.number }}

Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
# working-directory: testing
# spec: |
# cypress/e2e/smoke/smoke-*-*.cy.ts
# browser: chrome
# browser: electron
# # project: ./e2e
# ci-build-id: ${{ github.event.number }}

Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
working-directory: testing
spec: |
cypress/e2e/**/integration-010-*.cy.ts
browser: chrome
browser: electron
# project: ./e2e
ci-build-id: ${{ github.event.number }}

Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
working-directory: testing
spec: |
cypress/e2e/**/integration-040-*.cy.ts
browser: chrome
browser: electron
# project: ./e2e
ci-build-id: ${{ github.event.number }}

Expand All @@ -235,7 +235,7 @@ jobs:
working-directory: testing
spec: |
cypress/e2e/**/integration-910-deleteIntegrationRoles.cy.ts
browser: chrome
browser: electron
# project: ./e2e
ci-build-id: ${{ github.event.number }}

Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
# cypress/e2e/**/search-000-prereq.cy.ts
# cypress/e2e/**/search-010-rolesUsers.cy.ts
# cypress/e2e/**/search-020-IDIM.cy.ts
# browser: chrome
# browser: electron
# # project: ./e2e
# ci-build-id: ${{ github.event.number }}

Expand Down Expand Up @@ -327,7 +327,7 @@ jobs:
working-directory: testing
spec: |
cypress/e2e/**/team-001-**.cy.ts
browser: chrome
browser: electron
# project: ./e2e
ci-build-id: ${{ github.event.number }}

Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
# working-directory: testing
# spec: |
# cypress/e2e/**/idpstopper-**-**.cy.ts
# browser: chrome
# browser: electron
# # project: ./e2e
# ci-build-id: ${{ github.event.number }}

Expand Down Expand Up @@ -418,7 +418,7 @@ jobs:
spec: |
cypress/e2e/**/integration-990-deleteAllIntegrations.cy.ts
cypress/e2e/**/team-900-*.cy.ts
browser: chrome
browser: electron
# project: ./e2e
ci-build-id: ${{ github.event.number }}

Expand Down
2 changes: 1 addition & 1 deletion testing/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
redirectionLimit: 100,
experimentalStudio: true,
experimentalMemoryManagement: true,
numTestsKeptInMemory: 2,
numTestsKeptInMemory: 0,
viewportHeight: 1080,
viewportWidth: 1920,
video: true,
Expand Down
24 changes: 12 additions & 12 deletions testing/cypress/appActions/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ class Request {
let n = 0;
while (n < addRole.length) {
this.addRole(this.id, addRole[n].role, env);
cy.wait(5000);
cy.wait(2000);
n++;
}
}
Expand All @@ -562,7 +562,7 @@ class Request {
let n = 0;
while (n < addRole.length) {
this.addRole(this.id, addRole[n].role, env);
cy.wait(5000);
cy.wait(2000);
n++;
}
}
Expand All @@ -572,7 +572,7 @@ class Request {
let n = 0;
while (n < addRole.length) {
this.addRole(this.id, addRole[n].role, env);
cy.wait(5000);
cy.wait(2000);
n++;
}
}
Expand All @@ -583,7 +583,7 @@ class Request {
if (roles?.addusertorole) {
roles.addusertorole.forEach((role: any) => {
this.addUsertoRole(this.id, role.role, environment, role.user);
cy.wait(5000); // Consider alternative approaches to avoid blocking operation
cy.wait(2000); // Consider alternative approaches to avoid blocking operation
});
}
}
Expand Down Expand Up @@ -674,12 +674,12 @@ class Request {
});
//cy.get('[id*="-tab-Composite"]').click();
cy.findByRole('tab', { name: 'Composite Roles' }).click();
cy.wait(3000);
cy.wait(2000);
cy.get('input[id^="react-select-"][role ="combobox"]')
.eq(0)
.type(role_second + '{enter}');
//cy.findByRole('combobox').type(role_second + "{enter}" );
cy.wait(3000);
cy.wait(2000);
});

return true;
Expand All @@ -689,7 +689,7 @@ class Request {
if (roles?.composite) {
roles.composite.forEach((role: any) => {
this.createCompositeRole(this.id, role.role_main, role.role_second, environment);
cy.wait(3000); // Consider alternative approaches to avoid blocking operation
cy.wait(2000); // Consider alternative approaches to avoid blocking operation
});
}
}
Expand All @@ -704,7 +704,7 @@ class Request {
if (roles?.remove) {
roles.remove.forEach((role: any) => {
this.removeRole(this.id, role.role, environment);
cy.wait(3000); // Consider alternative approaches to avoid blocking operation
cy.wait(2000); // Consider alternative approaches to avoid blocking operation
});
}
}
Expand All @@ -731,11 +731,11 @@ class Request {
.parent()
.within(($el) => {
cy.wrap($el).click();
cy.wait(3000);
cy.wait(2000);
cy.get('svg').click();
});
cy.get(this.reqPage.confirmDeleteRole).scrollIntoView().click({ force: true });
cy.wait(3000);
cy.wait(2000);
});

return true;
Expand All @@ -747,13 +747,13 @@ class Request {
cy.contains('td', id, { timeout: 10000 }).parent().click().scrollIntoView();

cy.get(this.reqPage.tabUserRoleManagement).click();
cy.wait(2000);
cy.wait(1000);
cy.get(this.reqPage.tabUserRoleManagement).then(() => {
this.reqPage.setRoleEnvironment(environment);
this.reqPage.setRoleIdp(idp);
this.reqPage.setRoleCriterion(criterion);
this.reqPage.setRoleSearch(search_value);
cy.wait(3000);
cy.wait(2000);
if (error) {
cy.contains('div', 'The user you searched for does not exist.').should('be.visible');
} else {
Expand Down

0 comments on commit 1f20e2d

Please sign in to comment.