Skip to content

Commit

Permalink
Add tests to demonstrate #329
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Jan 26, 2024
1 parent 1b38c8b commit cc79f8f
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion support/P5.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3843,7 +3843,7 @@
"});",
"pm.test('Sitemap is present', () => {",
" const body = pm.response.text();",
" const exp = /Sitemap: http.?:\\/\\/edrn\\.nci\\.nih\\.gov\\/.*\\/sitemap\\.xml/;",
" const exp = /Sitemap: .*sitemap\\.xml/;",
" pm.expect(body).to.match(exp);",
"});",
""
Expand All @@ -3867,6 +3867,53 @@
},
"response": []
},
{
"name": "Login form",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('HTTP status is OK', () => {",
" pm.response.to.have.status(200);",
"});",
"pm.test('Content-type is \"text/html\"', () => {",
" const contentType = pm.response.headers.get(\"Content-Type\");",
" pm.expect(contentType).to.contain('text/html');",
"});",
"pm.test('Autocomplete off for username field', () => {",
" const body = pm.response.text();",
" const exp = /<input.*username.*autocomplete=.off./;",
" pm.expect(body).to.match(exp);",
"});",
"pm.test('Autocomplete off for password field', () => {",
" const body = pm.response.text();",
" const exp = /<input.*password.*autocomplete=.off./;",
" pm.expect(body).to.match(exp);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/_util/login/",
"host": [
"{{base_url}}"
],
"path": [
"_util",
"login",
""
]
}
},
"response": []
},
{
"name": "Favicon",
"event": [
Expand Down

0 comments on commit cc79f8f

Please sign in to comment.