Skip to content

Commit 8aaf22f

Browse files
Update BASE_URL to RHDH_BASE_URL (#63)
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> Co-authored-by: Subhash Khileri <skhileri@redhat.com>
1 parent 8ae4ce7 commit 8aaf22f

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

docs/changelog.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [1.1.20] - Current
5+
## [1.1.21] - Current
6+
7+
### Fixed
8+
9+
- Updated occurrences of `BASE_URL` to `RHDH_BASE_URL`
10+
11+
## [1.1.20]
612

713
### Added
814

@@ -13,6 +19,8 @@ All notable changes to this project will be documented in this file.
1319

1420
## [1.1.19]
1521

22+
### Added
23+
1624
- **installOrchestrator(namespace?: string)**: Runs the orchestrator install script via a TypeScript wrapper; creates or reuses the given namespace (default `"orchestrator"`). Exported from `@red-hat-developer-hub/e2e-test-utils/orchestrator`.
1725

1826
## [1.1.18]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@red-hat-developer-hub/e2e-test-utils",
3-
"version": "1.1.20",
3+
"version": "1.1.21",
44
"description": "Test utilities for RHDH E2E tests",
55
"license": "Apache-2.0",
66
"repository": {

src/playwright/helpers/api-helper.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export class APIHelper {
339339
* @returns The UID string if found, otherwise undefined.
340340
*/
341341
static async getEntityUidByName(name: string): Promise<string | undefined> {
342-
const baseUrl = process.env.BASE_URL;
342+
const baseUrl = process.env.RHDH_BASE_URL;
343343
const url = `${baseUrl}/api/catalog/entities/by-name/template/default/${name}`;
344344
const context = await request.newContext();
345345
const response = await context.get(url);
@@ -357,7 +357,7 @@ export class APIHelper {
357357
* @returns The status code of the delete operation.
358358
*/
359359
static async deleteLocationByUid(uid: string): Promise<number> {
360-
const baseUrl = process.env.BASE_URL;
360+
const baseUrl = process.env.RHDH_BASE_URL;
361361
const url = `${baseUrl}/api/catalog/locations/${uid}`;
362362
const context = await request.newContext();
363363
const response = await context.delete(url);
@@ -375,7 +375,7 @@ export class APIHelper {
375375
name: string,
376376
namespace: string = "default",
377377
): Promise<string | undefined> {
378-
const baseUrl = process.env.BASE_URL;
378+
const baseUrl = process.env.RHDH_BASE_URL;
379379
const url = `${baseUrl}/api/catalog/locations/by-entity/template/${namespace}/${name}`;
380380
const context = await request.newContext();
381381
const response = await context.get(url);
@@ -396,7 +396,7 @@ export class APIHelper {
396396
* @returns The status code of the delete operation.
397397
*/
398398
static async deleteEntityLocationById(id: string): Promise<number> {
399-
const baseUrl = process.env.BASE_URL;
399+
const baseUrl = process.env.RHDH_BASE_URL;
400400
const url = `${baseUrl}/api/catalog/locations/${id}`;
401401
const context = await request.newContext();
402402
const response = await context.delete(url);
@@ -410,7 +410,7 @@ export class APIHelper {
410410
* @returns The status code of the registration operation.
411411
*/
412412
static async registerLocation(target: string): Promise<number> {
413-
const baseUrl = process.env.BASE_URL;
413+
const baseUrl = process.env.RHDH_BASE_URL;
414414
const url = `${baseUrl}/api/catalog/locations`;
415415
const context = await request.newContext();
416416
const response = await context.post(url, {
@@ -434,7 +434,7 @@ export class APIHelper {
434434
static async getLocationIdByTarget(
435435
target: string,
436436
): Promise<string | undefined> {
437-
const baseUrl = process.env.BASE_URL;
437+
const baseUrl = process.env.RHDH_BASE_URL;
438438
const url = `${baseUrl}/api/catalog/locations`;
439439
const context = await request.newContext();
440440
const response = await context.get(url);

src/playwright/helpers/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export class LoginHelper {
360360

361361
await popup.waitForLoadState("domcontentloaded");
362362

363-
if (popup.url().startsWith(process.env.BASE_URL as string)) {
363+
if (popup.url().startsWith(process.env.RHDH_BASE_URL as string)) {
364364
// an active microsoft session is already logged in and the popup will automatically close
365365
return "Already logged in";
366366
} else {

src/playwright/pages/catalog.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Locator, Page } from "@playwright/test";
22
import { UIhelper } from "../helpers/ui-helper.js";
33

4-
//${BASE_URL}/catalog page
4+
//${RHDH_BASE_URL}/catalog page
55
export class CatalogPage {
66
private page: Page;
77
private uiHelper: UIhelper;
@@ -36,7 +36,9 @@ export class CatalogPage {
3636
async search(s: string) {
3737
await this.searchField.clear();
3838
const searchResponse = this.page.waitForResponse(
39-
new RegExp(`${process.env.BASE_URL}/api/catalog/entities/by-query/*`),
39+
new RegExp(
40+
`${process.env.RHDH_BASE_URL}/api/catalog/entities/by-query/*`,
41+
),
4042
);
4143
await this.searchField.fill(s);
4244
await searchResponse;

0 commit comments

Comments
 (0)