Skip to content

Commit

Permalink
Add first e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt committed Oct 19, 2023
1 parent 66c245e commit 3fc4037
Show file tree
Hide file tree
Showing 6 changed files with 2,173 additions and 19 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- 'main'

jobs:

Build:
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: E2E

on:
pull_request:

jobs:
Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: |
docker compose up -d
docker compose logs -f > logs &
- uses: actions/setup-node@v3
with:
node-version: '18.x'

- run: npm run cy
12 changes: 12 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'cypress'

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:18080',
supportFile: false
},
env: {
consumerUrl: 'http//localhost:18080',
providerUrl: 'http//localhost:28080',
},
})
10 changes: 10 additions & 0 deletions cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
describe('end-to-end', () => {
it('should be accessible', () => {
const consumerUrl = Cypress.env('consumerUrl')
const providerUrl = Cypress.env('providerUrl')

cy.visit(consumerUrl);

cy.visit(providerUrl);
})
})
Loading

0 comments on commit 3fc4037

Please sign in to comment.