Skip to content

Commit

Permalink
Merge pull request #338 from dhis2/fix/DHIS2-17668
Browse files Browse the repository at this point in the history
fix(DHIS2-17668): sanitise HTML in table instead of showing it as encoded text
  • Loading branch information
kabaros authored Aug 21, 2024
2 parents 714d490 + f4be462 commit 9c3d5c6
Show file tree
Hide file tree
Showing 25 changed files with 8,553 additions and 1,178 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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
{
"path": "/api/37/dataApprovalWorkflows?paging=false&fields=id,displayName,dataApprovalLevels,periodType,dataSets%5Bid%2CdisplayName%2CperiodType%5D",
"path": "/api/37/dataApprovalWorkflows?paging=false&fields=id,displayName,dataApprovalLevels,periodType,dataSets%5Bid%2CdisplayName%2CperiodType%2CformType%5D",
"featureName": "Users can approve, accept, unapprove, and unaccept data",
"static": false,
"count": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
{
"path": "/api/37/dataApprovalWorkflows?paging=false&fields=id,displayName,dataApprovalLevels,periodType,dataSets%5Bid%2CdisplayName%2CperiodType%5D",
"path": "/api/37/dataApprovalWorkflows?paging=false&fields=id,displayName,dataApprovalLevels,periodType,dataSets%5Bid%2CdisplayName%2CperiodType%2CformType%5D",
"featureName": "Users can view data set reports for data sets connected to a workflow",
"static": false,
"count": 4,
Expand Down
65 changes: 28 additions & 37 deletions cypress/fixtures/network/38/static_resources.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions cypress/fixtures/network/38/summary.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"count": 349,
"totalResponseSize": 114244,
"duplicates": 241,
"nonDeterministicResponses": 19,
"count": 345,
"totalResponseSize": 114982,
"duplicates": 237,
"nonDeterministicResponses": 23,
"apiVersion": 38,
"fixtureFiles": [
"static_resources.json",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

79 changes: 35 additions & 44 deletions cypress/fixtures/network/39/static_resources.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions cypress/fixtures/network/39/summary.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"count": 347,
"totalResponseSize": 114519,
"duplicates": 239,
"nonDeterministicResponses": 25,
"count": 349,
"totalResponseSize": 114984,
"duplicates": 241,
"nonDeterministicResponses": 19,
"apiVersion": 39,
"fixtureFiles": [
"static_resources.json",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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"
]
}
Loading

0 comments on commit 9c3d5c6

Please sign in to comment.