From e74a4cea144ecbb69f8dae2647c881433c9b5460 Mon Sep 17 00:00:00 2001 From: rstens Date: Tue, 27 Feb 2024 10:04:24 -0800 Subject: [PATCH 1/8] feat--ssoteam-1369-sso-tests --- .gitignore | 1 + testing/cypress.config.ts | 6 +- .../e2e/sso-010-createIntegration.cy.ts | 39 +++ testing/cypress/fixtures/sso-requests.json | 224 ++++++++++++++++++ testing/sample.cypress.env.json | 17 +- 5 files changed, 281 insertions(+), 6 deletions(-) create mode 100644 testing/cypress/e2e/sso-010-createIntegration.cy.ts create mode 100644 testing/cypress/fixtures/sso-requests.json diff --git a/.gitignore b/.gitignore index 73ef7ce..6778616 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,7 @@ dist **/cypress/fixtures/requests-rolesafter.json **/cypress/fixtures/rolesusersafter.json **/cypress/fixtures/createdrequest.json +**/cypress/fixtures/ssorequestsafter.json **/client.json **/token.json **/local-dev/** diff --git a/testing/cypress.config.ts b/testing/cypress.config.ts index 35cd6a6..3050596 100644 --- a/testing/cypress.config.ts +++ b/testing/cypress.config.ts @@ -3,12 +3,12 @@ import fs from 'fs'; export default defineConfig({ chromeWebSecurity: false, - defaultCommandTimeout: 4000, + defaultCommandTimeout: 40000, includeShadowDom: true, - responseTimeout: 4000, + responseTimeout: 40000, redirectionLimit: 100, experimentalStudio: true, - experimentalMemoryManagement: true, + experimentalMemoryManagement: false, viewportHeight: 1080, viewportWidth: 1920, reporter: 'mochawesome', diff --git a/testing/cypress/e2e/sso-010-createIntegration.cy.ts b/testing/cypress/e2e/sso-010-createIntegration.cy.ts new file mode 100644 index 0000000..a1e5754 --- /dev/null +++ b/testing/cypress/e2e/sso-010-createIntegration.cy.ts @@ -0,0 +1,39 @@ +// Creation of Integration request variants + +import data from '../fixtures/sso-requests.json'; // The data file will drive the tests +import Request from '../appActions/Request'; +import Utilities from '../appActions/Utilities'; +let testData = data; +let tempData = data; +let util = new Utilities(); + +describe('Create SSO Integration Requests', () => { + beforeEach(() => { + cy.setid(null).then(() => { + cy.login(null, null, null, null); + }); + }); + + afterEach(() => { + cy.logout(null); + }); + + after(() => { + cy.writeFile('cypress/fixtures/ssorequestsafter.json', tempData); + }); + + // Iterate through the JSON file and create a team for each entry + // The set up below allows for reporting on each test case + testData.forEach((data, index) => { + if (util.runOk(data)) { + it(`Create ${data.create.projectname} (Test ID: ${data.create.test_id}) - ${data.create.description}`, () => { + let req = new Request(); + req.showCreateContent(data); + req.populateCreateContent(data); + cy.wrap(req.createRequest()).then(() => { + tempData[index].id = Cypress.env('test'); + }); + }); + } + }); +}); diff --git a/testing/cypress/fixtures/sso-requests.json b/testing/cypress/fixtures/sso-requests.json new file mode 100644 index 0000000..a73d24e --- /dev/null +++ b/testing/cypress/fixtures/sso-requests.json @@ -0,0 +1,224 @@ +[ + { + "id": "", + "create": { + "test_id": "STS-001", + "projectname": "STS-001", + "team": true, + "teamname": "Roland and Training Account", + "newteam": false, + "projectlead": false, + "protocol": "oidc", + "authtype": "browser-login", + "publicaccess": true, + "identityprovider": ["IDIR"], + "additionalroleattribute": "tbd", + "environments": ["dev", "", ""], + "displayheader": false, + "displayheadertest": false, + "displayheaderprod": null, + "ssoheaderdev": "SSO Header Dev", + "ssoheadertest": "", + "ssoheaderprod": "", + "redirecturi": ["https://bcgov.github.io/keycloak-example-apps/*"], + "redirecturitest": [], + "redirecturiprod": [], + "agreeWithTermstrue": true, + "submit": true, + "confirm": true, + "description": "" + }, + "update": {}, + "devroles": {}, + "testroles": {}, + "prodroles": {}, + "delete": true, + "smoketest": true, + "localtest": false + }, + { + "id": "", + "create": { + "test_id": "STS-002", + "projectname": "STS-002", + "team": true, + "teamname": "Roland and Training Account", + "newteam": false, + "projectlead": false, + "protocol": "oidc", + "authtype": "browser-login", + "publicaccess": true, + "identityprovider": ["Basic BCeID"], + "additionalroleattribute": "tbd", + "environments": ["dev", "", ""], + "displayheader": false, + "displayheadertest": false, + "displayheaderprod": null, + "ssoheaderdev": "SSO Header Dev", + "ssoheadertest": "", + "ssoheaderprod": "", + "redirecturi": ["https://bcgov.github.io/keycloak-example-apps/*"], + "redirecturitest": [], + "redirecturiprod": [], + "agreeWithTermstrue": true, + "submit": true, + "confirm": true, + "description": "" + }, + "update": {}, + "devroles": {}, + "testroles": {}, + "prodroles": {}, + "delete": true, + "smoketest": true, + "localtest": false + }, + { + "id": "", + "create": { + "test_id": "STS-003", + "projectname": "STS-003", + "team": true, + "teamname": "Roland and Training Account", + "newteam": false, + "projectlead": false, + "protocol": "oidc", + "authtype": "browser-login", + "publicaccess": true, + "identityprovider": ["GitHub BC Gov"], + "additionalroleattribute": "tbd", + "environments": ["dev", "", ""], + "displayheader": false, + "displayheadertest": false, + "displayheaderprod": null, + "ssoheaderdev": "SSO Header Dev", + "ssoheadertest": "", + "ssoheaderprod": "", + "redirecturi": ["https://bcgov.github.io/keycloak-example-apps/*"], + "redirecturitest": [], + "redirecturiprod": [], + "agreeWithTermstrue": true, + "submit": true, + "confirm": true, + "description": "" + }, + "update": {}, + "devroles": {}, + "testroles": {}, + "prodroles": {}, + "delete": true, + "smoketest": true, + "localtest": false + }, + { + "id": "", + "create": { + "test_id": "STS-004", + "projectname": "STS-004", + "team": true, + "teamname": "Roland and Training Account", + "newteam": false, + "projectlead": false, + "protocol": "oidc", + "authtype": "browser-login", + "publicaccess": true, + "identityprovider": ["IDIR - MFA"], + "additionalroleattribute": "tbd", + "environments": ["dev", "", ""], + "displayheader": false, + "displayheadertest": false, + "displayheaderprod": null, + "ssoheaderdev": "SSO Header Dev", + "ssoheadertest": "", + "ssoheaderprod": "", + "redirecturi": ["https://bcgov.github.io/keycloak-example-apps/*"], + "redirecturitest": [], + "redirecturiprod": [], + "agreeWithTermstrue": true, + "submit": true, + "confirm": true, + "description": "" + }, + "update": {}, + "devroles": {}, + "testroles": {}, + "prodroles": {}, + "delete": true, + "smoketest": true, + "localtest": false + }, + { + "id": "", + "create": { + "test_id": "STS-005", + "projectname": "STS-005", + "team": true, + "teamname": "Roland and Training Account", + "newteam": false, + "projectlead": false, + "protocol": "oidc", + "authtype": "browser-login", + "publicaccess": true, + "identityprovider": ["Basic or Business BCeID", "GitHub BC Gov"], + "additionalroleattribute": "tbd", + "environments": ["dev", "", ""], + "displayheader": false, + "displayheadertest": false, + "displayheaderprod": null, + "ssoheaderdev": "SSO Header Dev", + "ssoheadertest": "", + "ssoheaderprod": "", + "redirecturi": ["https://bcgov.github.io/keycloak-example-apps/*"], + "redirecturitest": [], + "redirecturiprod": [], + "agreeWithTermstrue": true, + "submit": true, + "confirm": true, + "description": "" + }, + "update": {}, + "devroles": {}, + "testroles": {}, + "prodroles": {}, + "delete": true, + "smoketest": true, + "localtest": false + }, + { + "id": "", + "create": { + "test_id": "STS-006", + "projectname": "STS-006", + "team": true, + "teamname": "Roland and Training Account", + "newteam": false, + "projectlead": false, + "protocol": "oidc", + "authtype": "browser-login", + "publicaccess": true, + "identityprovider": ["IDIR", "IDIR - MFA", "Basic or Business BCeID", "GitHub BC Gov"], + "additionalroleattribute": "tbd", + "environments": ["dev", "", ""], + "displayheader": false, + "displayheadertest": false, + "displayheaderprod": null, + "ssoheaderdev": "SSO Header Dev", + "ssoheadertest": "", + "ssoheaderprod": "", + "redirecturi": ["https://bcgov.github.io/keycloak-example-apps/*"], + "redirecturitest": [], + "redirecturiprod": [], + "agreeWithTermstrue": true, + "submit": true, + "confirm": true, + "description": "" + }, + "update": {}, + "devroles": {}, + "testroles": {}, + "prodroles": {}, + "delete": true, + "smoketest": true, + "localtest": false + } +] diff --git a/testing/sample.cypress.env.json b/testing/sample.cypress.env.json index f78e779..d97b363 100644 --- a/testing/sample.cypress.env.json +++ b/testing/sample.cypress.env.json @@ -3,17 +3,21 @@ { "type": "default", "username": "PFDRSSOT", - "password": "" + "password": "", + "email": "Pathfinder.SSOTraining@gov.bc.ca" }, { "type": "idir", "username": "PFDRSSOT", - "password": "" + "password": "", + "email": "Pathfinder.SSOTraining@gov.bc.ca" }, { "type": "azureidir", "username": "PFDRSSOT", - "password": "" + "password": "", + "email": "Pathfinder.SSOTraining@gov.bc.ca", + "otpsecret": "" }, { "type": "bceidbasic", @@ -40,6 +44,13 @@ { "type": "admin", "username": "PFSSOT2", + "password": "", + "email": "Pathfinder.SSOTraining2@gov.bc.ca", + "otpsecret": "" + }, + { + "type": "gmail", + "username": "pathfinderssotester@gmail.com", "password": "" } ], From 475bd79fcce755fad183fd4dc2e239a2080f7d9a Mon Sep 17 00:00:00 2001 From: rstens Date: Tue, 27 Feb 2024 16:08:36 -0800 Subject: [PATCH 2/8] fix: eleminate errors in request --- docs/Assess impact on TA.md | 55 ++++++++++++++++++++++++++ testing/cypress/appActions/Request.ts | 8 +++- testing/cypress/fixtures/requests.json | 38 +++++++++--------- 3 files changed, 80 insertions(+), 21 deletions(-) create mode 100644 docs/Assess impact on TA.md diff --git a/docs/Assess impact on TA.md b/docs/Assess impact on TA.md new file mode 100644 index 0000000..2ea82ad --- /dev/null +++ b/docs/Assess impact on TA.md @@ -0,0 +1,55 @@ +## Checklist for Assessing Impact on Automated End-to-End Tests in Cypress + +### 1. **UI Changes** + +- [ ] **Visual Changes:** Have any visual elements (e.g., buttons, links, layouts) been modified, added, or removed? +- [ ] **CSS Changes:** Are there updates to styles that could affect element visibility or position? +- [ ] **Responsive Design Adjustments:** Have there been changes to how the application looks or behaves at different screen sizes? + +### 2. **Functionality Updates** + +- [ ] **New Features:** Are there any new functionalities that require additional tests? +- [ ] **Modified Features:** Have existing features been altered in a way that changes their workflow or output? +- [ ] **Deprecated Features:** Have any features or functionalities been removed from the application? + +### 3. **Navigation Changes** + +- [ ] **URL Changes:** Have there been updates to the URLs of any pages (e.g., changes in routing)? +- [ ] **Navigation Flow:** Is there a change in how users navigate through the application (e.g., new menu items, changes in page hierarchy)? + +### 4. **Backend Changes** + +- [ ] **API Modifications:** Are there changes to the APIs (endpoints, request/response structure) that the frontend interacts with? +- [ ] **Database Changes:** Have there been modifications to the database schema or the data that might affect the frontend? + +### 5. **Performance Optimizations** + +- [ ] **Loading Times:** Have there been changes that significantly alter the loading times of pages or resources? +- [ ] **Asynchronous Operations:** Are there updates to how asynchronous operations (e.g., AJAX calls) are handled? + +### 6. **Security Updates** + +- [ ] **Authentication/Authorization Changes:** Have there been updates to the login/logout flow, session management, or access controls? +- [ ] **Input Validation/Sanitization:** Are there changes in how user input is validated or sanitized? + +### 7. **Third-party Integrations** + +- [ ] **New Integrations:** Have new third-party services or libraries been integrated? +- [ ] **Updated Integrations:** Have existing integrations been updated or modified? + +### 8. **Testing Environment** + +- [ ] **Configuration Changes:** Are there changes to the Cypress configuration, test data, or environment variables? +- [ ] **Cypress Version Update:** Has the version of Cypress or any plugins been updated? + +### 9. **Code Refactoring** + +- [ ] **Refactored Code:** Has there been significant refactoring of the codebase that could affect the selectors or logic used in tests? +- [ ] **Selector Changes:** Have the selectors (e.g., IDs, classes, attributes) used to target elements in tests been changed? + +### Communication Tips + +- **Detail Specific Changes:** When communicating changes, be specific about what has been altered, added, or removed. +- **Prioritize Impact:** Highlight changes that are likely to have a high impact on existing tests. +- **Collaborate Early:** Engage with test automation specialists early in the development cycle to discuss potential impacts. +- **Share Documentation:** Provide access to updated documentation, API schemas, and design mockups to help in adjusting tests accordingly. diff --git a/testing/cypress/appActions/Request.ts b/testing/cypress/appActions/Request.ts index 4dad4c9..602a79a 100644 --- a/testing/cypress/appActions/Request.ts +++ b/testing/cypress/appActions/Request.ts @@ -147,7 +147,9 @@ class Request { } this.reqPage.setEnvironment(this.environments); - this.reqPage.setadditionalRoleAttribute(this.additionalRoleAttribute); + if (this.protocol === 'oidc') { + this.reqPage.setadditionalRoleAttribute(this.additionalRoleAttribute); + } cy.get('p').contains('Last saved at').wait(2000); this.reqPage.pageNext(); @@ -396,7 +398,9 @@ class Request { } if (this.additionalRoleAttribute) { - this.reqPage.setadditionalRoleAttribute(this.additionalRoleAttribute); + if (this.protocol === 'oidc') { + this.reqPage.setadditionalRoleAttribute(this.additionalRoleAttribute); + } } cy.wait(2000); this.reqPage.pageNext(); diff --git a/testing/cypress/fixtures/requests.json b/testing/cypress/fixtures/requests.json index 7626a07..acd5c71 100644 --- a/testing/cypress/fixtures/requests.json +++ b/testing/cypress/fixtures/requests.json @@ -32,14 +32,14 @@ "test_id": "Update Request v1 OIDC ", "projectname": "Update OIDC 1 Team", "team": true, - "teamname": "New Team creation", - "newteam": true, + "teamname": "Roland and Training Account", + "newteam": false, "projectlead": null, "protocol": "oidc", "authtype": "browser-login", "publicaccess": false, "identityprovider": ["", "", "", ""], - "additionalroleattribute": "TBD", + "additionalroleattribute": "", "displayheader": true, "displayheadertest": true, "displayheaderprod": null, @@ -91,14 +91,14 @@ "test_id": "Update Request v1 OIDC Confidential", "projectname": "Update OIDC 1 Public Team Confidential", "team": true, - "teamname": "test-team", + "teamname": "Roland and Training Account", "newteam": false, "projectlead": null, "protocol": "", "authtype": "", "publicaccess": true, "identityprovider": ["", "", "", ""], - "additionalroleattribute": "TBD", + "additionalroleattribute": "", "displayheader": true, "displayheadertest": true, "displayheaderprod": null, @@ -150,14 +150,14 @@ "test_id": "Update Request v2 OIDC ", "projectname": "Update OIDC 2 Team", "team": true, - "teamname": "test-team", + "teamname": "Roland and Training Account", "newteam": false, "projectlead": null, "protocol": "", "authtype": "", "publicaccess": null, "identityprovider": ["", "", "", ""], - "additionalroleattribute": "TBD", + "additionalroleattribute": "", "displayheader": false, "displayheadertest": false, "displayheaderprod": null, @@ -209,7 +209,7 @@ "test_id": "Update Request v3 OIDC ", "projectname": "Update OIDC 3 Team", "team": true, - "teamname": "test-team", + "teamname": "Roland and Training Account", "newteam": false, "projectlead": null, "protocol": "", @@ -268,14 +268,14 @@ "test_id": "Update Request v1 SAML ", "projectname": "", "team": true, - "teamname": "New Team creation", - "newteam": true, + "teamname": "Roland and Training Account", + "newteam": false, "projectlead": null, "protocol": "", "authtype": "", "publicaccess": null, "identityprovider": ["Basic BCeID", "", "", ""], - "additionalroleattribute": "TBD", + "additionalroleattribute": "", "displayheader": false, "displayheadertest": false, "displayheaderprod": null, @@ -327,14 +327,14 @@ "test_id": "Update Request v2 SAML ", "projectname": "", "team": true, - "teamname": "test-team", + "teamname": "Roland and Training Account", "newteam": false, "projectlead": null, "protocol": "", "authtype": "", "publicaccess": null, "identityprovider": ["IDIR", "", "", ""], - "additionalroleattribute": "TBD", + "additionalroleattribute": "", "displayheader": true, "displayheadertest": true, "displayheaderprod": null, @@ -386,14 +386,14 @@ "test_id": "Update Request v1 OIDC no Team ", "projectname": "Update OIDC 1 No Team to Team", "team": true, - "teamname": "New Team creation", - "newteam": true, + "teamname": "Roland and Training Account", + "newteam": false, "projectlead": false, "protocol": "oidc", "authtype": "browser-login", "publicaccess": false, "identityprovider": ["", "", "", ""], - "additionalroleattribute": "TBD", + "additionalroleattribute": "", "displayheader": true, "displayheadertest": true, "displayheaderprod": null, @@ -445,14 +445,14 @@ "test_id": "Update Request SAML no Team to Team ", "projectname": "", "team": true, - "teamname": "New Team creation", - "newteam": true, + "teamname": "Roland and Training Account", + "newteam": false, "projectlead": null, "protocol": "", "authtype": "", "publicaccess": null, "identityprovider": ["Basic BCeID", "", "", ""], - "additionalroleattribute": "TBD", + "additionalroleattribute": "", "displayheader": false, "displayheadertest": false, "displayheaderprod": null, From 73cb4ff68aa164c10b80d24ecd41637d8ac13cb6 Mon Sep 17 00:00:00 2001 From: rstens Date: Tue, 27 Feb 2024 16:18:16 -0800 Subject: [PATCH 3/8] fix: remove team tests --- .github/workflows/main-e2e.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/main-e2e.yml b/.github/workflows/main-e2e.yml index 13b272b..cadf498 100644 --- a/.github/workflows/main-e2e.yml +++ b/.github/workflows/main-e2e.yml @@ -175,23 +175,6 @@ jobs: # project: ./e2e ci-build-id: ${{ github.event.number }} - - name: Team Tests - uses: cypress-io/github-action@v6 - id: teams - continue-on-error: false - with: - summary-title: 'Teams Tests' - wait-on: ${{ secrets.CYPRESS_HOST }} - wait-on-timeout: 120 - record: true - install-command: npm ci - working-directory: testing - spec: | - cypress/e2e/**/team-*-*.cy.ts - browser: chrome - # project: ./e2e - ci-build-id: ${{ github.event.number }} - - name: Run the reports run: | cd testing From b9e780a6bc5e5e9e67476817392e988427045388 Mon Sep 17 00:00:00 2001 From: rstens Date: Tue, 27 Feb 2024 17:08:14 -0800 Subject: [PATCH 4/8] fix: update validate function --- testing/cypress/appActions/Request.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/cypress/appActions/Request.ts b/testing/cypress/appActions/Request.ts index 602a79a..66022d0 100644 --- a/testing/cypress/appActions/Request.ts +++ b/testing/cypress/appActions/Request.ts @@ -273,7 +273,9 @@ class Request { // Check the Additional Role Attribute if (this.additionalRoleAttribute) { - cy.get(this.reqPage.prev_AddRoleAttribute).contains(this.additionalRoleAttribute); + if (this.protocol === 'oidc') { + cy.get(this.reqPage.prev_AddRoleAttribute).contains(this.additionalRoleAttribute); + } } // Check the identity providers From 323bb487b9fee8620b74c96280e43329b13fd05e Mon Sep 17 00:00:00 2001 From: rstens Date: Wed, 28 Feb 2024 09:26:37 -0800 Subject: [PATCH 5/8] fix: change memory parameters --- testing/cypress.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/cypress.config.ts b/testing/cypress.config.ts index 3050596..919d1c6 100644 --- a/testing/cypress.config.ts +++ b/testing/cypress.config.ts @@ -8,7 +8,8 @@ export default defineConfig({ responseTimeout: 40000, redirectionLimit: 100, experimentalStudio: true, - experimentalMemoryManagement: false, + experimentalMemoryManagement: true, + numTestsKeptInMemory: 10, viewportHeight: 1080, viewportWidth: 1920, reporter: 'mochawesome', From b43ac11446001b27686cec136c53a8408c6b7c61 Mon Sep 17 00:00:00 2001 From: rstens Date: Wed, 28 Feb 2024 10:28:25 -0800 Subject: [PATCH 6/8] fix: change delete all integration --- .../e2e/integration-990-deleteAllIntegrations.cy.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/testing/cypress/e2e/integration-990-deleteAllIntegrations.cy.ts b/testing/cypress/e2e/integration-990-deleteAllIntegrations.cy.ts index 1c73988..b9cd90e 100644 --- a/testing/cypress/e2e/integration-990-deleteAllIntegrations.cy.ts +++ b/testing/cypress/e2e/integration-990-deleteAllIntegrations.cy.ts @@ -1,22 +1,12 @@ import Request from '../appActions/Request'; describe('Delete All Integrations', () => { - let req = new Request(); - it('Delete All Requests as admin', function () { - cy.setid('admin').then(() => { - cy.login(null, null, null, null); - }); - req.deleteAllRequests(); - cy.logout(null); - cy.clearAllSessionStorage(); - }); - it('Delete All Requests as default user', function () { cy.setid(null).then(() => { cy.login(null, null, null, null); }); + let req = new Request(); req.deleteAllRequests(); cy.logout(null); - cy.clearAllSessionStorage(); }); }); From 4fd23406263a8014ae793ba45df8cfb19acc3c8b Mon Sep 17 00:00:00 2001 From: rstens Date: Wed, 28 Feb 2024 11:47:09 -0800 Subject: [PATCH 7/8] fix: memory options --- .github/workflows/main-e2e.yml | 1 + testing/cypress.config.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-e2e.yml b/.github/workflows/main-e2e.yml index cadf498..6eeaf43 100644 --- a/.github/workflows/main-e2e.yml +++ b/.github/workflows/main-e2e.yml @@ -37,6 +37,7 @@ jobs: CYPRESS_smoketest: ${{inputs.smoketest}} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_OPTIONS: --max-old-space-size=4096 strategy: fail-fast: false # https://github.com/cypress-io/github-action/issues/48 steps: diff --git a/testing/cypress.config.ts b/testing/cypress.config.ts index 919d1c6..aaaaa56 100644 --- a/testing/cypress.config.ts +++ b/testing/cypress.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ redirectionLimit: 100, experimentalStudio: true, experimentalMemoryManagement: true, - numTestsKeptInMemory: 10, + numTestsKeptInMemory: 0, viewportHeight: 1080, viewportWidth: 1920, reporter: 'mochawesome', From 284b51fa92c5b8250dab7edb0949959936f1cafa Mon Sep 17 00:00:00 2001 From: rstens Date: Wed, 28 Feb 2024 11:53:44 -0800 Subject: [PATCH 8/8] fix: memory settings --- .github/workflows/main-e2e.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main-e2e.yml b/.github/workflows/main-e2e.yml index 6eeaf43..6ee570d 100644 --- a/.github/workflows/main-e2e.yml +++ b/.github/workflows/main-e2e.yml @@ -37,7 +37,6 @@ jobs: CYPRESS_smoketest: ${{inputs.smoketest}} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_OPTIONS: --max-old-space-size=4096 strategy: fail-fast: false # https://github.com/cypress-io/github-action/issues/48 steps: @@ -118,6 +117,8 @@ jobs: browser: chrome # project: ./e2e ci-build-id: ${{ github.event.number }} + env: + NODE_OPTIONS: '--max-old-space-size=4096' - name: Roles tests uses: cypress-io/github-action@v6 @@ -139,6 +140,8 @@ jobs: browser: chrome # project: ./e2e ci-build-id: ${{ github.event.number }} + env: + NODE_OPTIONS: '--max-old-space-size=4096' - name: Delete All Integrations uses: cypress-io/github-action@v6 @@ -154,9 +157,11 @@ jobs: spec: | cypress/e2e/**/integration-990-deleteAllIntegrations.cy.ts # cypress/e2e/**/integration-900-*.cy.ts - browser: chrome + browser: electron # project: ./e2e ci-build-id: ${{ github.event.number }} + env: + NODE_OPTIONS: '--max-old-space-size=4096' - name: Search Users uses: cypress-io/github-action@v6 @@ -175,6 +180,8 @@ jobs: browser: chrome # project: ./e2e ci-build-id: ${{ github.event.number }} + env: + NODE_OPTIONS: '--max-old-space-size=4096' - name: Run the reports run: | @@ -192,8 +199,7 @@ jobs: if: always() && github.ref == 'refs/heads/main' with: type: ${{ job.status }} - job_name: '*Full End-To-End Test*' - mention: 'all' + job_name: '*End-To-End Test*' mention_if: 'failure' channel: '#sso-ops' url: ${{ secrets.ROCKETCHAT_WEBHOOK }}