Skip to content

Commit

Permalink
Add delay for integration tests (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinejaussoin authored Apr 16, 2022
1 parent d547284 commit ece7b2b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Alpha Build'

on:
push:
branches: [v4140/x]
branches: [v4150/integ]

jobs:
build:
Expand Down
5 changes: 4 additions & 1 deletion integration/cypress.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"baseUrl": "http://localhost:3000"
"baseUrl": "http://localhost:3000",
"env": {
"backend_delay": 0
}
}
3 changes: 3 additions & 0 deletions integration/cypress/integration/test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function get(name, rest) {
describe('Post workflow', () => {
it('Should login and write a post', () => {
cy.visit('/');

// We need to wait until the backend is ready
cy.wait(+Cypress.env('backend_delay'));

get('login-button').click();
get('anon-tab').click();
Expand Down
1 change: 1 addition & 0 deletions integration/docker-compose.ci.alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- frontend
environment:
- CYPRESS_baseUrl=http://frontend
- CYPRESS_backend_delay=30000
working_dir: /e2e
volumes:
- ./:/e2e
Expand Down
1 change: 1 addition & 0 deletions integration/docker-compose.ci.canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- frontend
environment:
- CYPRESS_baseUrl=http://frontend
- CYPRESS_backend_delay=30000
working_dir: /e2e
volumes:
- ./:/e2e
Expand Down
1 change: 1 addition & 0 deletions integration/docker-compose.ci.master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- frontend
environment:
- CYPRESS_baseUrl=http://frontend
- CYPRESS_backend_delay=30000
working_dir: /e2e
volumes:
- ./:/e2e
Expand Down

0 comments on commit ece7b2b

Please sign in to comment.