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 de976b9
Show file tree
Hide file tree
Showing 5 changed files with 2,167 additions and 19 deletions.
15 changes: 14 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 All @@ -23,3 +22,17 @@ jobs:
curl -O https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
chmod +x wait-for-it.sh
./wait-for-it.sh -t 20 localhost:8080
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 de976b9

Please sign in to comment.