mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge pull request #2603 from tdonohue/testing_e2e_fix
Fix e2e tests by running in production mode & using a user-agent for statistics
This commit is contained in:
@@ -177,6 +177,8 @@ function generateViewEvent(uuid: string, dsoType: string): void {
|
|||||||
[XSRF_REQUEST_HEADER] : csrfToken,
|
[XSRF_REQUEST_HEADER] : csrfToken,
|
||||||
// use a known public IP address to avoid being seen as a "bot"
|
// use a known public IP address to avoid being seen as a "bot"
|
||||||
'X-Forwarded-For': '1.1.1.1',
|
'X-Forwarded-For': '1.1.1.1',
|
||||||
|
// Use a user-agent of a Firefox browser on Windows. This again avoids being seen as a "bot"
|
||||||
|
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0',
|
||||||
},
|
},
|
||||||
//form: true, // indicates the body should be form urlencoded
|
//form: true, // indicates the body should be form urlencoded
|
||||||
body: { targetId: uuid, targetType: dsoType },
|
body: { targetId: uuid, targetType: dsoType },
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
"test:headless": "ng test --source-map=true --watch=false --configuration test --browsers=ChromeHeadless --code-coverage",
|
"test:headless": "ng test --source-map=true --watch=false --configuration test --browsers=ChromeHeadless --code-coverage",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"lint-fix": "ng lint --fix=true",
|
"lint-fix": "ng lint --fix=true",
|
||||||
"e2e": "ng e2e",
|
"e2e": "cross-env NODE_ENV=production ng e2e",
|
||||||
"clean:dev:config": "rimraf src/assets/config.json",
|
"clean:dev:config": "rimraf src/assets/config.json",
|
||||||
"clean:coverage": "rimraf coverage",
|
"clean:coverage": "rimraf coverage",
|
||||||
"clean:dist": "rimraf dist",
|
"clean:dist": "rimraf dist",
|
||||||
|
Reference in New Issue
Block a user