From 5c4a3595f30fa6db9e39ddd4a81e96dabc24c463 Mon Sep 17 00:00:00 2001 From: Russell Vinegar Date: Wed, 16 Oct 2024 13:59:39 -0700 Subject: [PATCH 1/3] fix tests to handle redirect away from your products --- e2e/cypress/tests/20-gateways/02-dropdown.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/e2e/cypress/tests/20-gateways/02-dropdown.ts b/e2e/cypress/tests/20-gateways/02-dropdown.ts index 8841c581c..886110317 100644 --- a/e2e/cypress/tests/20-gateways/02-dropdown.ts +++ b/e2e/cypress/tests/20-gateways/02-dropdown.ts @@ -37,7 +37,11 @@ describe('Gateway selector dropdown', () => { it('Get current total number of gateways', () => { // Create a new gateway to ensure there is at least one gateway - cy.createGateway(); + cy.createGateway().then((response) => { + const namespace = response.gatewayId + cy.log('New namespace created: ' + namespace) + cy.activateGateway(namespace); + }); cy.visit(ad.yourProductsPath); cy.get('[data-testid="ns-dropdown-btn"]').click(); @@ -81,8 +85,8 @@ describe('Gateway selector dropdown', () => { it('Recently used gateways are shown in the dropdown', () => { cy.visit(ns.listPath) cy.get(`[data-testid="ns-list-activate-link-${gateways["namespace1"].gatewayId + '-' + customId}"]`).click() - cy.get('[data-testid="ns-dropdown-btn"]').click() - cy.get(`[data-testid="ns-dropdown-item-${gateways["namespace2"].gatewayId + '-' + customId}"]`).click() + cy.visit(ns.listPath) + cy.get(`[data-testid="ns-list-activate-link-${gateways["namespace2"].gatewayId + '-' + customId}"]`).click() cy.get('[data-testid="ns-dropdown-btn"]').click() cy.get('[data-testid="ns-dropdown-heading"]').should('contain.text', "Recently viewed") cy.get(`[data-testid="ns-dropdown-item-${gateways["namespace1"].gatewayId + '-' + customId}"]`).should('exist') From a8742ccb1a80c0d4593db04a7c1f965bec52ca2e Mon Sep 17 00:00:00 2001 From: Russell Vinegar Date: Wed, 16 Oct 2024 16:00:40 -0700 Subject: [PATCH 2/3] upload astra scan results to debug --- .github/workflows/aps-cypress-e2e.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/aps-cypress-e2e.yaml b/.github/workflows/aps-cypress-e2e.yaml index 8a8046f89..aaef58651 100644 --- a/.github/workflows/aps-cypress-e2e.yaml +++ b/.github/workflows/aps-cypress-e2e.yaml @@ -76,6 +76,12 @@ jobs: name: code-coverage path: ${{ github.workspace }}/e2e/coverage + - name: Upload Astra scan results + uses: actions/upload-artifact@v4 + with: + name: astra-scan-results + path: ${{ github.workspace }}/e2e/cypress/fixtures/state/scanResult.json + - name: Instrument the code for coverage analysis run: | # Rewrite the paths as the coverage starts with '../app'! From 2bf17b885d7eeb05d78f5e57bc32b6b683192fbc Mon Sep 17 00:00:00 2001 From: Russell Vinegar Date: Wed, 23 Oct 2024 12:33:21 -0700 Subject: [PATCH 3/3] fix legal terms URL --- .github/workflows/scripts/feeder-init/legal.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/feeder-init/legal.yaml b/.github/workflows/scripts/feeder-init/legal.yaml index 257fc7a0d..26a7b2b03 100644 --- a/.github/workflows/scripts/feeder-init/legal.yaml +++ b/.github/workflows/scripts/feeder-init/legal.yaml @@ -2,6 +2,6 @@ entity: Legal record: id: "terms-of-use-for-api-gateway-1" title: "Terms of Use for API Gateway" - link: "https://www2.gov.bc.ca/gov/content/data/open-data/api-terms-of-use-for-ogl-information" + link: "https://www2.gov.bc.ca/gov/content/data/policy-standards/open-data/api-terms-of-use-for-ogl-information" document: terms-of-use version: 1