diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 4c725b8c7..d3caa2e78 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -92,3 +92,19 @@ jobs: --set-json frontend.containers[0].resources='{"limits": {"cpu": "75m", "memory": "150Mi"}, "requests": {"cpu": "25m", "memory": "50Mi"}}' \ --set-json tps-migration.containers[0].resources='{"limits": {"cpu": "75m", "memory": "150Mi"}, "requests": {"cpu": "25m", "memory": "50Mi"}}' \ --set-json vehicles.containers[0].resources='{"limits": {"cpu": "300m", "memory": "500Mi"}, "requests": {"cpu": "200m", "memory": "400Mi"}}' \ + + tests: + name: Tests + if: needs.deploys.triggered == 'true' + needs: [deploys] + uses: ./.github/workflows/.tests.yml + with: + target: ${{ github.event.number }} + + results: + name: PR Results + if: always() && !failure() + needs: [tests] + runs-on: ubuntu-22.04 + steps: + - run: echo "Workflow completed successfully!" diff --git a/frontend/cypress.config.ts b/frontend/cypress.config.ts index 5478979bf..b8d8686b9 100644 --- a/frontend/cypress.config.ts +++ b/frontend/cypress.config.ts @@ -2,11 +2,11 @@ import { defineConfig } from "cypress"; export default defineConfig({ e2e: { + baseUrl: 'https://onroutebc-test-frontend.apps.silver.devops.gov.bc.ca/', setupNodeEvents(on, config) { // implement node event listeners here }, + experimentalStudio: true, + experimentalWebKitSupport: true, }, - env: { - CYPRESS_baseUrl: 'http://localhost:3000', - } }); diff --git a/frontend/cypress/e2e/hom-page.cy.ts b/frontend/cypress/e2e/hom-page.cy.ts deleted file mode 100644 index bee12684b..000000000 --- a/frontend/cypress/e2e/hom-page.cy.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// - -describe('Default Page Test', () => { - it('Visits the default page and checks for "onRouteBC"', () => { - const baseUrl = Cypress.env('CYPRESS_baseUrl'); - if (!baseUrl) { - throw new Error('Base URL is not defined in environment variables'); - } - const path = '/'; - const url = baseUrl + path; - cy.visit(url); - cy.contains('onRouteBC').should('exist'); - cy.contains('Log in with BCeID').should('exist'); - cy.contains('Log in with IDIR').should('exist'); - }); - }); - - describe('Log in with BCeID button', () => { - it('Redirects to another page when "Log in with BCeID" button is clicked', () => { - const baseUrl = Cypress.env('CYPRESS_baseUrl'); - cy.visit(baseUrl); - cy.contains('Log in with BCeID').click(); - cy.url().then((url) => { - cy.log('Current URL:', url); - expect(url).to.include(baseUrl); - }); - }); - }); - - \ No newline at end of file diff --git a/frontend/cypress/screenshots/hom-page.cy.ts/Default Page Test -- Visits the default page and checks for onRouteBC (failed).png b/frontend/cypress/screenshots/hom-page.cy.ts/Default Page Test -- Visits the default page and checks for onRouteBC (failed).png deleted file mode 100644 index 9f3eb9695..000000000 Binary files a/frontend/cypress/screenshots/hom-page.cy.ts/Default Page Test -- Visits the default page and checks for onRouteBC (failed).png and /dev/null differ