Skip to content

Commit

Permalink
Updates to support different base urls.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouder committed Oct 7, 2023
1 parent dd111b8 commit 69dcce7
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
APP_BASE_URL=/
API_BASE_URL=/api
2 changes: 2 additions & 0 deletions .github/workflows/run-e2e-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ jobs:

- name: Run Tests
run: npm run e2e:ci
env:
APP_BASE_URL: /comet-starter/
2 changes: 1 addition & 1 deletion cypress/e2e/dashboard-and-details.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('dashboard spec', () => {

it('verifies access to dashboard after signing in', () => {
// Navigate to Homepage
cy.visit('/');
cy.visit(Cypress.config('baseUrl'));

// Setup Accessibility Testing
cy.injectAxe();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('home spec', () => {

it('navigates to home', () => {
// Navigate to Homepage
cy.visit('/');
cy.visit(Cypress.config('baseUrl'));

// Setup Accessibility Testing
cy.injectAxe();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/sign-in.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('signin spec', () => {

it('navigates to home and signs in', () => {
// Navigate to Homepage
cy.visit('/');
cy.visit(Cypress.config('baseUrl'));

// Setup Accessibility Testing
cy.injectAxe();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test": "jest",
"coverage": "jest --coverage",
"e2e": "npx cypress open",
"e2e:ci": "npm run e2e:ci:run || true && npm run e2e:ci:report",
"e2e:ci": "npm run e2e:ci:run",
"e2e:ci:run": "rm cypress/reports/* || true && npx cypress run --reporter mochawesome",
"e2e:ci:report": "mochawesome-merge cypress/reports/*.json > cypress/reports/report.json && marge --reportDir cypress/reports cypress/reports/report.json",
"e2e:format": "npx prettier cypress --write",
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import keycloak from './utils/keycloak.ts';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<BrowserRouter>
<BrowserRouter basename={process.env.APP_BASE_URL}>
<AuthProvider {...keycloak}>
<RecoilRoot>
<App />
Expand Down

0 comments on commit 69dcce7

Please sign in to comment.