Skip to content

Commit

Permalink
fix: enable cypress tests against live instance
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Jun 1, 2021
1 parent a49f336 commit 92fe334
Show file tree
Hide file tree
Showing 24 changed files with 2,024 additions and 2,463 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier", "plugin:cypress/recommended"],
"env": {
"browser": true,
"node": true,
Expand All @@ -13,7 +13,7 @@
"jsx": true
}
},
"plugins": ["prettier"],
"plugins": ["prettier", "cypress"],
"rules": {
"prettier/prettier": "error"
},
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,55 @@ jobs:
- name: Test
run: yarn test

e2e:
runs-on: ubuntu-latest
needs: install
if: "!contains(github.event.head_commit.message, '[skip ci]')"

strategy:
matrix:
containers: [1, 2]

steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install Cypress binary
run: yarn cypress install

- name: End-to-End tests
uses: cypress-io/github-action@v2
with:
record: true
parallel: true
start: ${{ env.SERVER_START_CMD }}
wait-on: ${{ env.SERVER_URL }}
wait-on-timeout: 300
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
group: 'e2e'
tag: ${{ github.event_name }}
env:
CI: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
SERVER_START_CMD: 'yarn cypress:start'
SERVER_URL: 'http://localhost:8082'
DHIS2_BASE_URL: 'https://debug.dhis2.org/dboard-dev-e2e'
cypress_dhis2_base_url: 'https://debug.dhis2.org/dboard-dev-e2e'
cypress_dhis2_username: 'admin'
cypress_dhis2_password: 'district'


publish:
runs-on: ubuntu-latest
needs: [build, lint, test]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ coverage
src/locales/
.netlify
cypress/videos/
cypress/screenshots/
cypress/screenshots/
cypress.env.json
8 changes: 5 additions & 3 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"baseUrl": "http://localhost:8082",
"projectId": "r5jduj"
}
"baseUrl": "http://localhost:8082",
"projectId": "r5jduj",
"testFiles": "**/*.cy.js",
"video": true
}
242 changes: 0 additions & 242 deletions cypress/fixtures/boundarylayer.json

This file was deleted.

284 changes: 0 additions & 284 deletions cypress/fixtures/eventlayer.json

This file was deleted.

256 changes: 0 additions & 256 deletions cypress/fixtures/facilitylayer.json

This file was deleted.

13 changes: 0 additions & 13 deletions cypress/fixtures/plugin-smoke.json

This file was deleted.

221 changes: 0 additions & 221 deletions cypress/fixtures/smoke.json

This file was deleted.

270 changes: 0 additions & 270 deletions cypress/fixtures/thematiclayer.json

This file was deleted.

58 changes: 0 additions & 58 deletions cypress/integration/common/smoke.spec.js

This file was deleted.

87 changes: 0 additions & 87 deletions cypress/integration/layers/boundarylayer.spec.js

This file was deleted.

89 changes: 0 additions & 89 deletions cypress/integration/layers/eventlayer.spec.js

This file was deleted.

Loading

0 comments on commit 92fe334

Please sign in to comment.