-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(network-shim): handle 304s from different scenarios within a feature
- Loading branch information
1 parent
850518f
commit 33ef97b
Showing
11 changed files
with
246 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
examples/platform-app/cypress/fixtures/network/37/handles_304s_in_a_single_feature.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
[ | ||
{ | ||
"path": "/api/37/systemSettings/helpPageLink", | ||
"testName": "Handles 304s in a single feature -- The app displays user groups from the database", | ||
"static": false, | ||
"count": 1, | ||
"nonDeterministic": false, | ||
"method": "GET", | ||
"requestBody": "", | ||
"requestHeaders": { | ||
"host": "localhost:8080", | ||
"proxy-connection": "keep-alive", | ||
"accept": "application/json", | ||
"origin": "http://localhost:3000", | ||
"sec-fetch-site": "same-site", | ||
"sec-fetch-mode": "cors" | ||
}, | ||
"statusCode": 200, | ||
"responseBody": "{\"helpPageLink\":\"https://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en.html\"}", | ||
"responseSize": 99, | ||
"responseHeaders": { | ||
"server": "nginx/1.21.1", | ||
"content-type": "application/json;charset=UTF-8", | ||
"transfer-encoding": "chunked", | ||
"connection": "keep-alive", | ||
"access-control-allow-credentials": "true", | ||
"access-control-allow-origin": "http://localhost:3000", | ||
"vary": "Origin", | ||
"access-control-expose-headers": "ETag, Location", | ||
"cache-control": "no-cache, private", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"x-frame-options": "SAMEORIGIN" | ||
} | ||
}, | ||
{ | ||
"path": "/api/37/userGroups", | ||
"testName": "Handles 304s in a single feature -- The app displays user groups from the database", | ||
"static": false, | ||
"count": 1, | ||
"nonDeterministic": false, | ||
"method": "GET", | ||
"requestBody": "", | ||
"requestHeaders": { | ||
"host": "localhost:8080", | ||
"proxy-connection": "keep-alive", | ||
"accept": "application/json", | ||
"origin": "http://localhost:3000", | ||
"sec-fetch-site": "same-site", | ||
"sec-fetch-mode": "cors" | ||
}, | ||
"statusCode": 200, | ||
"responseBody": "{\"pager\":{\"page\":1,\"pageCount\":1,\"total\":31,\"pageSize\":50},\"userGroups\":[{\"id\":\"wl5cDMuUhmF\",\"displayName\":\"Administrators\"},{\"id\":\"vAvEltyXGbD\",\"displayName\":\"Africare HQ\"},{\"id\":\"ZoHNWQajIoe\",\"displayName\":\"Bo District M&E officers\"},{\"id\":\"th4S6ovwcr8\",\"displayName\":\"Bonthe District M&E Officers\"},{\"id\":\"wAAA1agEHin\",\"displayName\":\"Cape Town University Research Group\"},{\"id\":\"qlEhuAA77gc\",\"displayName\":\"EPI Stock Completeness Notification Recipients\"},{\"id\":\"ZrsVF7IJ93y\",\"displayName\":\"Family Health Partner\"},{\"id\":\"sZRhXMPbcWc\",\"displayName\":\"Family Planning Program Coordinators\"},{\"id\":\"QYrzIjSfI8z\",\"displayName\":\"Feedback Message Recipients\"},{\"id\":\"Rg8wusV7QYi\",\"displayName\":\"HIV Program Coordinators\"},{\"id\":\"YCPJDwzbe8T\",\"displayName\":\"Kenya staff\"},{\"id\":\"jvrEwEJ2yZn\",\"displayName\":\"Malaria program\"},{\"id\":\"k3xzluFKVyw\",\"displayName\":\"Nairobi University Research Group\"},{\"id\":\"GZSvMCVowAx\",\"displayName\":\"Partner for Health International\"},{\"id\":\"lFHP5lLkzVr\",\"displayName\":\"System administrators\"},{\"id\":\"hj0nnsVsPLU\",\"displayName\":\"TB Program Coordinators\"},{\"id\":\"L4XTzgbdza3\",\"displayName\":\"Wakiki\"},{\"id\":\"Iqfwd3j2qe5\",\"displayName\":\"World Health Program\"},{\"id\":\"GogLpGmkL0g\",\"displayName\":\"_DATASET_Child Health Program Manager\"},{\"id\":\"tH0GcNZZ1vW\",\"displayName\":\"_DATASET_Data entry clerk\"},{\"id\":\"w900PX10L7O\",\"displayName\":\"_DATASET_M and E Officer\"},{\"id\":\"B6JNeAQ6akX\",\"displayName\":\"_DATASET_Superuser\"},{\"id\":\"zz6XckBrLlj\",\"displayName\":\"_DATASET_System administrator (ALL)\"},{\"id\":\"M1Qre0247G3\",\"displayName\":\"_PROGRAM_Antenatal care program\"},{\"id\":\"H9XnHoWRKCg\",\"displayName\":\"_PROGRAM_Child Health Tracker\"},{\"id\":\"NTC8GjJ7p8P\",\"displayName\":\"_PROGRAM_Inpatient program\"},{\"id\":\"vRoAruMnNpB\",\"displayName\":\"_PROGRAM_MNCH / PNC (Adult Woman) program\"},{\"id\":\"gXpmQO6eEOo\",\"displayName\":\"_PROGRAM_Superuser\"},{\"id\":\"pBnkuih0c1K\",\"displayName\":\"_PROGRAM_System administrator (ALL)\"},{\"id\":\"Kk12LkEWtXp\",\"displayName\":\"_PROGRAM_TB program\"},{\"id\":\"z1gNAf2zUxZ\",\"displayName\":\"_PROGRAM_WHO MCH program\"}]}", | ||
"responseSize": 2041, | ||
"responseHeaders": { | ||
"server": "nginx/1.21.1", | ||
"content-type": "application/json;charset=UTF-8", | ||
"transfer-encoding": "chunked", | ||
"connection": "keep-alive", | ||
"access-control-allow-credentials": "true", | ||
"access-control-allow-origin": "http://localhost:3000", | ||
"vary": "Origin", | ||
"access-control-expose-headers": "ETag, Location", | ||
"cache-control": "no-cache, private", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"x-frame-options": "SAMEORIGIN" | ||
} | ||
}, | ||
{ | ||
"path": "/api/37/systemSettings/helpPageLink", | ||
"testName": "Handles 304s in a single feature -- The app displays user groups from the database AGAIN", | ||
"static": false, | ||
"count": 1, | ||
"nonDeterministic": false, | ||
"method": "GET", | ||
"requestBody": "", | ||
"requestHeaders": { | ||
"host": "localhost:8080", | ||
"proxy-connection": "keep-alive", | ||
"accept": "application/json", | ||
"origin": "http://localhost:3000", | ||
"sec-fetch-site": "same-site", | ||
"sec-fetch-mode": "cors" | ||
}, | ||
"statusCode": 304, | ||
"responseBody": "\"\"", | ||
"responseSize": 2, | ||
"responseHeaders": { | ||
"server": "nginx/1.21.1", | ||
"connection": "keep-alive", | ||
"access-control-allow-credentials": "true", | ||
"access-control-allow-origin": "http://localhost:3000", | ||
"vary": "Origin", | ||
"access-control-expose-headers": "ETag, Location", | ||
"cache-control": "no-cache, private", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"x-frame-options": "SAMEORIGIN" | ||
} | ||
}, | ||
{ | ||
"path": "/api/37/userGroups", | ||
"testName": "Handles 304s in a single feature -- The app displays user groups from the database AGAIN", | ||
"static": false, | ||
"count": 1, | ||
"nonDeterministic": false, | ||
"method": "GET", | ||
"requestBody": "", | ||
"requestHeaders": { | ||
"host": "localhost:8080", | ||
"proxy-connection": "keep-alive", | ||
"accept": "application/json", | ||
"origin": "http://localhost:3000", | ||
"sec-fetch-site": "same-site", | ||
"sec-fetch-mode": "cors" | ||
}, | ||
"statusCode": 304, | ||
"responseBody": "\"\"", | ||
"responseSize": 2, | ||
"responseHeaders": { | ||
"server": "nginx/1.21.1", | ||
"connection": "keep-alive", | ||
"access-control-allow-credentials": "true", | ||
"access-control-allow-origin": "http://localhost:3000", | ||
"vary": "Origin", | ||
"access-control-expose-headers": "ETag, Location", | ||
"cache-control": "no-cache, private", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block", | ||
"x-frame-options": "SAMEORIGIN" | ||
} | ||
} | ||
] |
Oops, something went wrong.