Check two locations for config.json, as it's in a different location in CI

This commit is contained in:
Tim Donohue
2022-03-04 17:02:42 -06:00
parent a0e2ac3d12
commit bc705df144
2 changed files with 24 additions and 5 deletions

View File

@@ -34,9 +34,9 @@ function login(email: string, password: string): void {
// So, it's not possible to inject or load the AppConfig or environment of the Angular UI.
// Instead, we'll read our running application's config.json, which contains the configs &
// is regenerated at runtime each time the Angular UI application starts up.
cy.readFile('./src/assets/config.json').then((str) => {
// Parse JSON file into a JSON object
const config = JSON.parse(JSON.stringify(str));
cy.task('readUIConfig').then((str: string) => {
// Parse config into a JSON object
const config = JSON.parse(str);
// Find the URL of our REST API. Have a fallback ready, just in case 'rest.baseUrl' cannot be found.
let baseRestUrl = FALLBACK_TEST_REST_BASE_URL;