From 2aa285d7f44d388c70a4945ccbd0e9f2c766daa4 Mon Sep 17 00:00:00 2001 From: "David J. Yu" <87633683+ddjnw1yu@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:28:22 +1200 Subject: [PATCH 1/2] Update userstories.cy.js --- tests/cypress/e2e/userstories.cy.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/cypress/e2e/userstories.cy.js b/tests/cypress/e2e/userstories.cy.js index a1165d3d..52259cc7 100644 --- a/tests/cypress/e2e/userstories.cy.js +++ b/tests/cypress/e2e/userstories.cy.js @@ -6,7 +6,7 @@ const categories = ['stomach', 'lung'] describe('User stories', function () { describe('Should find segmentation in the gallery', { testIsolation: false }, function () { - before('Loading Datasets', function () { + beforeEach('Loading Datasets', function () { cy.intercept('**/query?**').as('query'); cy.visit(''); @@ -14,14 +14,14 @@ describe('User stories', function () { // Navigate to 'Data&Models' page cy.get('.mobile-navigation > :nth-child(1) > :nth-child(1) > a').click(); + + cy.waitForLoadingMask() + }) segmentationDatasetIds.forEach((id) => { it(`Access dataset ${id}`, function () { - - cy.waitForLoadingMask() - // Search for segmentation related dataset cy.get('.el-input__wrapper > .el-input__inner').clear(); cy.get('.search-text').click(); @@ -43,14 +43,12 @@ describe('User stories', function () { cy.findGalleryCard('Segmentation', 'prev'); cy.get('.el-card > .el-card__body > :nth-child(1) > .details > :nth-child(1) > b').should('contain', 'Segmentation'); cy.get('.el-card > .el-card__body > :nth-child(1) > .details > .el-button > span').should('contain', ' View Segmentation'); - - cy.visit(`${Cypress.config().baseUrl}/data?type=dataset`); }) }) }) describe('Should open scaffold through the gallery', { testIsolation: false }, function () { - before('Loading Anatomical Models', function () { + beforeEach('Loading Anatomical Models', function () { cy.intercept('**/query?**').as('query'); cy.visit(''); @@ -62,14 +60,14 @@ describe('User stories', function () { // Go to 'Anatomical Models' cy.get(':nth-child(2) > .search-tabs__button').click(); cy.get(':nth-child(2) > .search-tabs__button').should('have.class', 'active'); + + cy.waitForLoadingMask() + }) scaffoldDatasetCategories.forEach((category) => { it(`Access scaffold ${category}`, function () { - - cy.waitForLoadingMask() - // Search for scaffold related dataset cy.get('.el-input__wrapper > .el-input__inner').clear(); cy.get('.search-text').click(); @@ -142,7 +140,6 @@ describe('User stories', function () { cy.visit(`/datasets/${datasetId}?type=dataset`); }) }) - cy.visit(`${Cypress.config().baseUrl}/data?type=model&search=${category}`); }) }) }) @@ -154,6 +151,7 @@ describe('User stories', function () { // Wait for 'href' ready for click cy.wait(5000) + cy.waitForLoadingMask() }) From 4a28836cb0a67334ee667b03cbc27990b9e88671 Mon Sep 17 00:00:00 2001 From: "David J. Yu" <87633683+ddjnw1yu@users.noreply.github.com> Date: Tue, 11 Jun 2024 21:09:02 +1200 Subject: [PATCH 2/2] remove parallelization run --- .github/workflows/quality_control_cypress.yml | 7 ------- .github/workflows/scheduled_production_cypress.yml | 6 ------ .github/workflows/scheduled_staging_cypress.yml | 6 ------ 3 files changed, 19 deletions(-) diff --git a/.github/workflows/quality_control_cypress.yml b/.github/workflows/quality_control_cypress.yml index 9b0577d1..c86fb997 100644 --- a/.github/workflows/quality_control_cypress.yml +++ b/.github/workflows/quality_control_cypress.yml @@ -105,11 +105,6 @@ jobs: if: github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - containers: [1, 2] - steps: - name: Cleanup pre-installed tools run: | @@ -135,7 +130,6 @@ jobs: with: wait-on: ${{ env.ROOT_URL }} record: true - parallel: true spec: tests/cypress/e2e/databrowser.cy.js,tests/cypress/e2e/datasets.cy.js,tests/cypress/e2e/mapsviewer.cy.js tag: QC-${{github.event.inputs.PORTAL_TARGET}} @@ -148,6 +142,5 @@ jobs: with: wait-on: ${{ env.ROOT_URL }} record: true - parallel: true spec: tests/cypress/e2e/databrowser.cy.js,tests/cypress/e2e/datasets.cy.js,tests/cypress/e2e/mapsviewer.cy.js tag: QC-${{github.event.inputs.PORTAL_TARGET}} diff --git a/.github/workflows/scheduled_production_cypress.yml b/.github/workflows/scheduled_production_cypress.yml index 2008001a..34825104 100644 --- a/.github/workflows/scheduled_production_cypress.yml +++ b/.github/workflows/scheduled_production_cypress.yml @@ -54,11 +54,6 @@ jobs: if: github.event_name == 'schedule' runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - containers: [1, 2, 3, 4] - steps: - name: Cleanup pre-installed tools run: | @@ -83,5 +78,4 @@ jobs: with: wait-on: ${{ env.ROOT_URL }} record: true - parallel: true tag: Scheduled-Production diff --git a/.github/workflows/scheduled_staging_cypress.yml b/.github/workflows/scheduled_staging_cypress.yml index d1fcdf4a..5a4441aa 100644 --- a/.github/workflows/scheduled_staging_cypress.yml +++ b/.github/workflows/scheduled_staging_cypress.yml @@ -54,11 +54,6 @@ jobs: if: github.event_name == 'schedule' runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - containers: [1, 2, 3, 4] - steps: - name: Cleanup pre-installed tools run: | @@ -83,5 +78,4 @@ jobs: with: wait-on: ${{ env.ROOT_URL }} record: true - parallel: true tag: Scheduled-Staging