mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Address feedback
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
"config:test": "ts-node --project ./tsconfig.ts-node.json scripts/set-mock-env.ts",
|
"config:test": "ts-node --project ./tsconfig.ts-node.json scripts/set-mock-env.ts",
|
||||||
"config:test:watch": "nodemon --config mock-nodemon.json",
|
"config:test:watch": "nodemon --config mock-nodemon.json",
|
||||||
"config:dev:watch": "nodemon",
|
"config:dev:watch": "nodemon",
|
||||||
|
"config:check:rest": "yarn run config:prod && ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts",
|
||||||
"prestart:dev": "yarn run config:dev",
|
"prestart:dev": "yarn run config:dev",
|
||||||
"prebuild": "yarn run config:dev",
|
"prebuild": "yarn run config:dev",
|
||||||
"pretest": "yarn run config:test",
|
"pretest": "yarn run config:test",
|
||||||
@@ -29,7 +30,6 @@
|
|||||||
"test:watch": "npm-run-all --parallel config:test:watch test",
|
"test:watch": "npm-run-all --parallel config:test:watch test",
|
||||||
"test": "ng test --sourceMap=true --watch=true",
|
"test": "ng test --sourceMap=true --watch=true",
|
||||||
"test:headless": "ng test --watch=false --sourceMap=true --browsers=ChromeHeadless --code-coverage",
|
"test:headless": "ng test --watch=false --sourceMap=true --browsers=ChromeHeadless --code-coverage",
|
||||||
"test:rest-api": "yarn run config:prod && ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts",
|
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"lint-fix": "ng lint --fix=true",
|
"lint-fix": "ng lint --fix=true",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e",
|
||||||
|
@@ -56,7 +56,9 @@ function checkJSONResponse(responseData: any): any {
|
|||||||
console.log(`\t"dspaceUI" = ${parsedData.dspaceUI}`);
|
console.log(`\t"dspaceUI" = ${parsedData.dspaceUI}`);
|
||||||
console.log(`\t"dspaceServer" = ${parsedData.dspaceServer}`);
|
console.log(`\t"dspaceServer" = ${parsedData.dspaceServer}`);
|
||||||
console.log(`\t"dspaceServer" property matches UI's "rest" config? ${(parsedData.dspaceServer === environment.rest.baseUrl)}`);
|
console.log(`\t"dspaceServer" property matches UI's "rest" config? ${(parsedData.dspaceServer === environment.rest.baseUrl)}`);
|
||||||
console.log(`\tDoes "_links" section have values? ${!parsedData._links.length}`);
|
// Check for "authn" and "sites" in "_links" section as they should always exist (even if no data)!
|
||||||
|
const linksFound: string[] = Object.keys(parsedData._links);
|
||||||
|
console.log(`\tDoes "/api" endpoint have HAL links ("_links" section)? ${linksFound.includes('authn') && linksFound.includes('sites')}`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('ERROR: INVALID DSPACE REST API! Response is not valid JSON!');
|
console.error('ERROR: INVALID DSPACE REST API! Response is not valid JSON!');
|
||||||
console.error(`Response returned:\n${responseData}`);
|
console.error(`Response returned:\n${responseData}`);
|
||||||
|
Reference in New Issue
Block a user