Skip to content

Commit

Permalink
test(DHIS2-17668): add e2e fixtures for v40 and 41
Browse files Browse the repository at this point in the history
  • Loading branch information
kabaros committed Aug 21, 2024
1 parent 4412128 commit f4be462
Show file tree
Hide file tree
Showing 10 changed files with 7,379 additions and 2 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,70 @@ jobs:
CYPRESS_dhis2ApiVersion: 39
CYPRESS_networkMode: stub

e2e-v40:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"

strategy:
fail-fast: false
matrix:
containers: [1, 2]

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

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

- name: End-to-End tests
uses: cypress-io/github-action@v2
with:
start: yarn d2-app-scripts start
wait-on: 'http://localhost:3000'
wait-on-timeout: 300
record: true
parallel: true
env:
BROWSER: none
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_dhis2BaseUrl: http://localhost:8080
CYPRESS_dhis2ApiVersion: 40
CYPRESS_networkMode: stub
e2e-v41:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"

strategy:
fail-fast: false
matrix:
containers: [1, 2]

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

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

- name: End-to-End tests
uses: cypress-io/github-action@v2
with:
start: yarn d2-app-scripts start
wait-on: 'http://localhost:3000'
wait-on-timeout: 300
record: true
parallel: true
env:
BROWSER: none
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_dhis2BaseUrl: http://localhost:8080
CYPRESS_dhis2ApiVersion: 41
CYPRESS_networkMode: stub
release:
runs-on: ubuntu-latest
needs: [build, lint, test, e2e-v38]
Expand Down
315 changes: 315 additions & 0 deletions cypress/fixtures/network/40/static_resources.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions cypress/fixtures/network/40/summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"count": 349,
"totalResponseSize": 115877,
"duplicates": 241,
"nonDeterministicResponses": 19,
"apiVersion": 40,
"fixtureFiles": [
"static_resources.json",
"users_can_approve,_accept,_unapprove,_and_unaccept_data.json",
"users_can_view_data_set_reports_for_data_sets_connected_to_a_workflow.json"
]
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

314 changes: 314 additions & 0 deletions cypress/fixtures/network/41/static_resources.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions cypress/fixtures/network/41/summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"count": 348,
"totalResponseSize": 116177,
"duplicates": 240,
"nonDeterministicResponses": 26,
"apiVersion": 41,
"fixtureFiles": [
"static_resources.json",
"users_can_approve,_accept,_unapprove,_and_unaccept_data.json",
"users_can_view_data_set_reports_for_data_sets_connected_to_a_workflow.json"
]
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
"cypress:capture-v38": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=38,dhis2BaseUrl=http://localhost:8081,networkMode=capture'",
"cypress:stub-v38": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=38,dhis2BaseUrl=http://localhost:8081,networkMode=stub'",
"cypress:live": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress open --env networkMode=live'",
"cypress:capture": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=39,networkMode=capture'",
"cypress:stub": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=39,networkMode=stub'"
"cypress:capture-v39": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=39,networkMode=capture'",
"cypress:stub-v39": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=39,networkMode=stub'",
"cypress:capture-v40": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=40,networkMode=capture'",
"cypress:stub-v40": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=40,networkMode=stub'",
"cypress:capture": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=41,networkMode=capture'",
"cypress:stub": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --env dhis2ApiVersion=41,networkMode=stub'"
},
"devDependencies": {
"@dhis2/cli-app-scripts": "^8.1.0",
Expand Down

0 comments on commit f4be462

Please sign in to comment.