Skip to content

Commit

Permalink
move refresh-endpoint e2e tests to development runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Aparicio committed Jun 29, 2020
1 parent 732e2aa commit 65684fb
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 335 deletions.
17 changes: 0 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,6 @@ aliases:
- notify-status:
condition: << parameters.nightly >>

e2e_tests_development_refresh_endpoint_alias:
&e2e_tests_development_refresh_endpoint_alias
<<: *e2e-executor
parameters:
nightly:
type: boolean
default: false
steps:
- e2e-test:
test_path: e2e-tests/development-refresh-endpoint
skip_file_change_test: << parameters.nightly >>
- notify-status:
condition: << parameters.nightly >>

e2e_tests_gatsby-image_alias: &e2e_tests_gatsby-image_alias
<<: *e2e-executor
parameters:
Expand Down Expand Up @@ -335,9 +321,6 @@ jobs:
e2e_tests_gatsby-image_with_next_react:
<<: *e2e_tests_gatsby-image_alias

e2e_tests_development_refresh_endpoint:
<<: *e2e_tests_development_refresh_endpoint_alias

e2e_tests_development_runtime:
<<: *e2e_tests_development_runtime_alias

Expand Down
76 changes: 0 additions & 76 deletions e2e-tests/development-refresh-endpoint/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions e2e-tests/development-refresh-endpoint/LICENSE

This file was deleted.

97 changes: 0 additions & 97 deletions e2e-tests/development-refresh-endpoint/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions e2e-tests/development-refresh-endpoint/cypress.json

This file was deleted.

17 changes: 0 additions & 17 deletions e2e-tests/development-refresh-endpoint/cypress/plugins/index.js

This file was deleted.

This file was deleted.

This file was deleted.

31 changes: 0 additions & 31 deletions e2e-tests/development-refresh-endpoint/gatsby-config.js

This file was deleted.

10 changes: 0 additions & 10 deletions e2e-tests/development-refresh-endpoint/gatsby-node.js

This file was deleted.

47 changes: 0 additions & 47 deletions e2e-tests/development-refresh-endpoint/package.json

This file was deleted.

Binary file not shown.
10 changes: 0 additions & 10 deletions e2e-tests/development-refresh-endpoint/src/pages/page.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
describe(`When the refresh endpoint is hit multiple times`, () => {

afterEach(() => {
waitUntilServerRespondsSucessfully()
});
it(`should put new requests with unique body in a queue`, () => {
cy.request(`POST`, `/__refresh`).then(response => {
expect(response.body).to.be.equal(``)
Expand All @@ -20,3 +22,11 @@ describe(`When the refresh endpoint is hit multiple times`, () => {

})

function waitUntilServerRespondsSucessfully() {
cy.waitUntil(() => cy.request("/").then((response) => {
return response.status == 200
}), {
timeout: 20000,
interval: 1000
})
}
1 change: 1 addition & 0 deletions e2e-tests/development-runtime/cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "@testing-library/cypress/add-commands"
import 'cypress-wait-until';

Cypress.Commands.add(`lifecycleCallCount`, action =>
cy
Expand Down
1 change: 1 addition & 0 deletions e2e-tests/development-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@testing-library/cypress": "^4.0.4",
"cross-env": "^5.2.0",
"cypress": "3.4.1",
"cypress-wait-until": "1.7.1",
"fs-extra": "^7.0.1",
"gatsby-cypress": "^0.1.7",
"is-ci": "^2.0.0",
Expand Down

0 comments on commit 65684fb

Please sign in to comment.