Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

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

## [1.1.20] - Current
## [1.1.21] - Current

### Fixed

- Updated occurrences of `BASE_URL` to `RHDH_BASE_URL`

## [1.1.20]

### Added

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

## [1.1.19]

### Added

- **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`.

## [1.1.18]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@red-hat-developer-hub/e2e-test-utils",
"version": "1.1.20",
"version": "1.1.21",
"description": "Test utilities for RHDH E2E tests",
"license": "Apache-2.0",
"repository": {
Expand Down
12 changes: 6 additions & 6 deletions src/playwright/helpers/api-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export class APIHelper {
* @returns The UID string if found, otherwise undefined.
*/
static async getEntityUidByName(name: string): Promise<string | undefined> {
const baseUrl = process.env.BASE_URL;
const baseUrl = process.env.RHDH_BASE_URL;
const url = `${baseUrl}/api/catalog/entities/by-name/template/default/${name}`;
const context = await request.newContext();
const response = await context.get(url);
Expand All @@ -357,7 +357,7 @@ export class APIHelper {
* @returns The status code of the delete operation.
*/
static async deleteLocationByUid(uid: string): Promise<number> {
const baseUrl = process.env.BASE_URL;
const baseUrl = process.env.RHDH_BASE_URL;
const url = `${baseUrl}/api/catalog/locations/${uid}`;
const context = await request.newContext();
const response = await context.delete(url);
Expand All @@ -375,7 +375,7 @@ export class APIHelper {
name: string,
namespace: string = "default",
): Promise<string | undefined> {
const baseUrl = process.env.BASE_URL;
const baseUrl = process.env.RHDH_BASE_URL;
const url = `${baseUrl}/api/catalog/locations/by-entity/template/${namespace}/${name}`;
const context = await request.newContext();
const response = await context.get(url);
Expand All @@ -396,7 +396,7 @@ export class APIHelper {
* @returns The status code of the delete operation.
*/
static async deleteEntityLocationById(id: string): Promise<number> {
const baseUrl = process.env.BASE_URL;
const baseUrl = process.env.RHDH_BASE_URL;
const url = `${baseUrl}/api/catalog/locations/${id}`;
const context = await request.newContext();
const response = await context.delete(url);
Expand All @@ -410,7 +410,7 @@ export class APIHelper {
* @returns The status code of the registration operation.
*/
static async registerLocation(target: string): Promise<number> {
const baseUrl = process.env.BASE_URL;
const baseUrl = process.env.RHDH_BASE_URL;
const url = `${baseUrl}/api/catalog/locations`;
const context = await request.newContext();
const response = await context.post(url, {
Expand All @@ -434,7 +434,7 @@ export class APIHelper {
static async getLocationIdByTarget(
target: string,
): Promise<string | undefined> {
const baseUrl = process.env.BASE_URL;
const baseUrl = process.env.RHDH_BASE_URL;
const url = `${baseUrl}/api/catalog/locations`;
const context = await request.newContext();
const response = await context.get(url);
Expand Down
2 changes: 1 addition & 1 deletion src/playwright/helpers/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ export class LoginHelper {

await popup.waitForLoadState("domcontentloaded");

if (popup.url().startsWith(process.env.BASE_URL as string)) {
if (popup.url().startsWith(process.env.RHDH_BASE_URL as string)) {
// an active microsoft session is already logged in and the popup will automatically close
return "Already logged in";
} else {
Expand Down
6 changes: 4 additions & 2 deletions src/playwright/pages/catalog.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Locator, Page } from "@playwright/test";
import { UIhelper } from "../helpers/ui-helper.js";

//${BASE_URL}/catalog page
//${RHDH_BASE_URL}/catalog page
export class CatalogPage {
private page: Page;
private uiHelper: UIhelper;
Expand Down Expand Up @@ -36,7 +36,9 @@ export class CatalogPage {
async search(s: string) {
await this.searchField.clear();
const searchResponse = this.page.waitForResponse(
new RegExp(`${process.env.BASE_URL}/api/catalog/entities/by-query/*`),
new RegExp(
`${process.env.RHDH_BASE_URL}/api/catalog/entities/by-query/*`,
),
);
await this.searchField.fill(s);
await searchResponse;
Expand Down
Loading