@red-hat-developer-hub/e2e-test-utils 1.1.20 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -185,7 +185,7 @@ export class APIHelper {
|
|
|
185
185
|
* @returns The UID string if found, otherwise undefined.
|
|
186
186
|
*/
|
|
187
187
|
static async getEntityUidByName(name) {
|
|
188
|
-
const baseUrl = process.env.
|
|
188
|
+
const baseUrl = process.env.RHDH_BASE_URL;
|
|
189
189
|
const url = `${baseUrl}/api/catalog/entities/by-name/template/default/${name}`;
|
|
190
190
|
const context = await request.newContext();
|
|
191
191
|
const response = await context.get(url);
|
|
@@ -202,7 +202,7 @@ export class APIHelper {
|
|
|
202
202
|
* @returns The status code of the delete operation.
|
|
203
203
|
*/
|
|
204
204
|
static async deleteLocationByUid(uid) {
|
|
205
|
-
const baseUrl = process.env.
|
|
205
|
+
const baseUrl = process.env.RHDH_BASE_URL;
|
|
206
206
|
const url = `${baseUrl}/api/catalog/locations/${uid}`;
|
|
207
207
|
const context = await request.newContext();
|
|
208
208
|
const response = await context.delete(url);
|
|
@@ -216,7 +216,7 @@ export class APIHelper {
|
|
|
216
216
|
* @returns The UID string if found, otherwise undefined.
|
|
217
217
|
*/
|
|
218
218
|
static async getTemplateEntityUidByName(name, namespace = "default") {
|
|
219
|
-
const baseUrl = process.env.
|
|
219
|
+
const baseUrl = process.env.RHDH_BASE_URL;
|
|
220
220
|
const url = `${baseUrl}/api/catalog/locations/by-entity/template/${namespace}/${name}`;
|
|
221
221
|
const context = await request.newContext();
|
|
222
222
|
const response = await context.get(url);
|
|
@@ -236,7 +236,7 @@ export class APIHelper {
|
|
|
236
236
|
* @returns The status code of the delete operation.
|
|
237
237
|
*/
|
|
238
238
|
static async deleteEntityLocationById(id) {
|
|
239
|
-
const baseUrl = process.env.
|
|
239
|
+
const baseUrl = process.env.RHDH_BASE_URL;
|
|
240
240
|
const url = `${baseUrl}/api/catalog/locations/${id}`;
|
|
241
241
|
const context = await request.newContext();
|
|
242
242
|
const response = await context.delete(url);
|
|
@@ -249,7 +249,7 @@ export class APIHelper {
|
|
|
249
249
|
* @returns The status code of the registration operation.
|
|
250
250
|
*/
|
|
251
251
|
static async registerLocation(target) {
|
|
252
|
-
const baseUrl = process.env.
|
|
252
|
+
const baseUrl = process.env.RHDH_BASE_URL;
|
|
253
253
|
const url = `${baseUrl}/api/catalog/locations`;
|
|
254
254
|
const context = await request.newContext();
|
|
255
255
|
const response = await context.post(url, {
|
|
@@ -270,7 +270,7 @@ export class APIHelper {
|
|
|
270
270
|
* @returns The ID string if found, otherwise undefined.
|
|
271
271
|
*/
|
|
272
272
|
static async getLocationIdByTarget(target) {
|
|
273
|
-
const baseUrl = process.env.
|
|
273
|
+
const baseUrl = process.env.RHDH_BASE_URL;
|
|
274
274
|
const url = `${baseUrl}/api/catalog/locations`;
|
|
275
275
|
const context = await request.newContext();
|
|
276
276
|
const response = await context.get(url);
|
|
@@ -293,7 +293,7 @@ export class LoginHelper {
|
|
|
293
293
|
this.uiHelper.clickButton("Sign In"),
|
|
294
294
|
]);
|
|
295
295
|
await popup.waitForLoadState("domcontentloaded");
|
|
296
|
-
if (popup.url().startsWith(process.env.
|
|
296
|
+
if (popup.url().startsWith(process.env.RHDH_BASE_URL)) {
|
|
297
297
|
// an active microsoft session is already logged in and the popup will automatically close
|
|
298
298
|
return "Already logged in";
|
|
299
299
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/playwright/pages/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAItD,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAO;IACnB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,WAAW,CAAU;gBAEjB,IAAI,EAAE,IAAI;IAMhB,EAAE;IAIF,UAAU,CAAC,IAAI,EAAE,MAAM;IAKvB,8BAA8B;IAO9B,yBAAyB;IAIzB,MAAM,CAAC,CAAC,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/playwright/pages/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAItD,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAO;IACnB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,WAAW,CAAU;gBAEjB,IAAI,EAAE,IAAI;IAMhB,EAAE;IAIF,UAAU,CAAC,IAAI,EAAE,MAAM;IAKvB,8BAA8B;IAO9B,yBAAyB;IAIzB,MAAM,CAAC,CAAC,EAAE,MAAM;IAWhB,QAAQ,CAAC,OAAO,EAAE,MAAM;CAG/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UIhelper } from "../helpers/ui-helper.js";
|
|
2
|
-
//${
|
|
2
|
+
//${RHDH_BASE_URL}/catalog page
|
|
3
3
|
export class CatalogPage {
|
|
4
4
|
page;
|
|
5
5
|
uiHelper;
|
|
@@ -27,7 +27,7 @@ export class CatalogPage {
|
|
|
27
27
|
}
|
|
28
28
|
async search(s) {
|
|
29
29
|
await this.searchField.clear();
|
|
30
|
-
const searchResponse = this.page.waitForResponse(new RegExp(`${process.env.
|
|
30
|
+
const searchResponse = this.page.waitForResponse(new RegExp(`${process.env.RHDH_BASE_URL}/api/catalog/entities/by-query/*`));
|
|
31
31
|
await this.searchField.fill(s);
|
|
32
32
|
await searchResponse;
|
|
33
33
|
}
|