@red-hat-developer-hub/e2e-test-utils 1.1.28 → 1.1.29
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.
- package/dist/deployment/rhdh/deployment.d.ts.map +1 -1
- package/dist/deployment/rhdh/deployment.js +1 -1
- package/dist/playwright/helpers/api-helper.js +1 -1
- package/dist/playwright/helpers/common.js +4 -4
- package/dist/utils/kubernetes-client.d.ts.map +1 -1
- package/dist/utils/kubernetes-client.js +3 -3
- package/package.json +30 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../src/deployment/rhdh/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAwB1E,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAEpB,qBAAa,cAAc;IAClB,SAAS,yBAAgC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;gBAE9B,SAAS,EAAE,MAAM;IAKvB,MAAM,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YA0CpD,eAAe;YAmBf,aAAa;IAqB3B,uDAAuD;IACvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAE5B;IAEX;;;OAGG;YACW,iBAAiB;IAY/B;;OAEG;YACW,uBAAuB;IAgBrC;;;;;;;;OAQG;YACW,0BAA0B;YAsC1B,oBAAoB;YAWpB,eAAe;YA6Df,mBAAmB;IAoE3B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAWrC;;;;OAIG;IACG,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOpC,cAAc,CAAC,OAAO,GAAE,MAAY,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../src/deployment/rhdh/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAwB1E,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAEpB,qBAAa,cAAc;IAClB,SAAS,yBAAgC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;gBAE9B,SAAS,EAAE,MAAM;IAKvB,MAAM,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YA0CpD,eAAe;YAmBf,aAAa;IAqB3B,uDAAuD;IACvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAE5B;IAEX;;;OAGG;YACW,iBAAiB;IAY/B;;OAEG;YACW,uBAAuB;IAgBrC;;;;;;;;OAQG;YACW,0BAA0B;YAsC1B,oBAAoB;YAWpB,eAAe;YA6Df,mBAAmB;IAoE3B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAWrC;;;;OAIG;IACG,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOpC,cAAc,CAAC,OAAO,GAAE,MAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BpD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAIjB,iBAAiB;YASjB,oBAAoB;IAsClC;;;OAGG;YACW,0BAA0B;IAwCxC,OAAO,CAAC,sBAAsB;IAoCxB,SAAS,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrE,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,SAAS;CAMlB"}
|
|
@@ -273,7 +273,7 @@ export class RHDHDeployment {
|
|
|
273
273
|
await this.k8sClient.waitForPodsWithFailureDetection(namespace, labelSelector, timeout);
|
|
274
274
|
}
|
|
275
275
|
catch (error) {
|
|
276
|
-
throw new Error(`RHDH deployment failed in ${namespace}: ${error instanceof Error ? error.message : error}
|
|
276
|
+
throw new Error(`RHDH deployment failed in ${namespace}: ${error instanceof Error ? error.message : error}`, { cause: error });
|
|
277
277
|
}
|
|
278
278
|
// Use remaining timeout for route readiness check
|
|
279
279
|
const remaining = timeout * 1000 - (Date.now() - startTime);
|
|
@@ -161,7 +161,7 @@ export class APIHelper {
|
|
|
161
161
|
}
|
|
162
162
|
async deleteUserEntityFromAPI(user) {
|
|
163
163
|
const r = await this.getCatalogUserFromAPI(user);
|
|
164
|
-
if (!r.metadata
|
|
164
|
+
if (!r.metadata?.uid) {
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
const url = `${this.baseUrl}/api/catalog/entities/by-uid/${r.metadata.uid}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UIhelper } from "./ui-helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { generateSync } from "otplib";
|
|
3
3
|
import { test, expect } from "@playwright/test";
|
|
4
4
|
import { SETTINGS_PAGE_COMPONENTS } from "../page-objects/page-obj.js";
|
|
5
5
|
import { UI_HELPER_ELEMENTS } from "../page-objects/global-obj.js";
|
|
@@ -177,11 +177,11 @@ export class LoginHelper {
|
|
|
177
177
|
if (!secret) {
|
|
178
178
|
throw new Error("Invalid User ID");
|
|
179
179
|
}
|
|
180
|
-
return
|
|
180
|
+
return generateSync({ secret });
|
|
181
181
|
}
|
|
182
182
|
getGoogle2FAOTP() {
|
|
183
183
|
const secret = process.env.GOOGLE_2FA_SECRET;
|
|
184
|
-
return
|
|
184
|
+
return generateSync({ secret });
|
|
185
185
|
}
|
|
186
186
|
async keycloakLogin(username, password) {
|
|
187
187
|
await this.page.goto("/");
|
|
@@ -247,7 +247,7 @@ export class LoginHelper {
|
|
|
247
247
|
.locator("[type='submit'][value='Sign in']:not(webauthn-status *)")
|
|
248
248
|
.first()
|
|
249
249
|
.click({ timeout: 5000 });
|
|
250
|
-
const twofactorcode =
|
|
250
|
+
const twofactorcode = generateSync({ secret: twofactor });
|
|
251
251
|
await popup.locator("#app_totp").click({ timeout: 5000 });
|
|
252
252
|
await popup.locator("#app_totp").fill(twofactorcode, { timeout: 5000 });
|
|
253
253
|
await popup.waitForEvent("close", { timeout: 20000 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubernetes-client.d.ts","sourceRoot":"","sources":["../../src/utils/kubernetes-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAC;AAO/C;;GAEG;AACH,cAAM,sBAAsB;IAC1B,OAAO,CAAC,GAAG,CAAiB;IAC5B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,iBAAiB,CAAuB;;
|
|
1
|
+
{"version":3,"file":"kubernetes-client.d.ts","sourceRoot":"","sources":["../../src/utils/kubernetes-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAC;AAO/C;;GAEG;AACH,cAAM,sBAAsB;IAC1B,OAAO,CAAC,GAAG,CAAiB;IAC5B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,iBAAiB,CAAuB;;IAqChD;;OAEG;IACG,uBAAuB,CAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IA8C3B;;OAEG;IACG,0BAA0B,CAC9B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IA+B3B;;UAEM;IAmBN;;OAEG;IAsBH;;OAEG;YACW,YAAY;IA8B1B;;OAEG;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B,OAAO,CAAC,IAAI,CAAC;IA2FhB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CA8BzB;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -35,7 +35,7 @@ class KubernetesClientHelper {
|
|
|
35
35
|
` 3. Verify your connection: oc whoami && oc cluster-info\n\n` +
|
|
36
36
|
`Kubeconfig locations checked:\n` +
|
|
37
37
|
` - KUBECONFIG env: ${process.env.KUBECONFIG || "(not set)"}\n` +
|
|
38
|
-
` - Default: ~/.kube/config
|
|
38
|
+
` - Default: ~/.kube/config`, { cause: error });
|
|
39
39
|
}
|
|
40
40
|
throw error;
|
|
41
41
|
}
|
|
@@ -391,7 +391,7 @@ class KubernetesClientHelper {
|
|
|
391
391
|
return domain;
|
|
392
392
|
}
|
|
393
393
|
catch (error) {
|
|
394
|
-
throw new Error(`Failed to get cluster ingress domain: ${error instanceof Error ? error.message : error}
|
|
394
|
+
throw new Error(`Failed to get cluster ingress domain: ${error instanceof Error ? error.message : error}`, { cause: error });
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
/**
|
|
@@ -413,7 +413,7 @@ class KubernetesClientHelper {
|
|
|
413
413
|
return this._extractRouteUrl(route, name);
|
|
414
414
|
}
|
|
415
415
|
catch (error) {
|
|
416
|
-
throw new Error(`Failed to get route ${name} in namespace ${namespace}: ${error instanceof Error ? error.message : error}
|
|
416
|
+
throw new Error(`Failed to get route ${name} in namespace ${namespace}: ${error instanceof Error ? error.message : error}`, { cause: error });
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/e2e-test-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.29",
|
|
4
4
|
"description": "Test utilities for RHDH E2E tests",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -89,37 +89,37 @@
|
|
|
89
89
|
"@playwright/test": "^1.57.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@backstage/catalog-model": "1.7.
|
|
93
|
-
"@playwright/test": "
|
|
94
|
-
"@types/fs-extra": "
|
|
95
|
-
"@types/js-yaml": "
|
|
96
|
-
"@types/lodash.clonedeepwith": "
|
|
97
|
-
"@types/lodash.mergewith": "
|
|
98
|
-
"@types/node": "
|
|
99
|
-
"@types/proper-lockfile": "
|
|
100
|
-
"husky": "
|
|
101
|
-
"lint-staged": "
|
|
102
|
-
"markdown-link-check": "
|
|
92
|
+
"@backstage/catalog-model": "1.7.7",
|
|
93
|
+
"@playwright/test": "1.59.1",
|
|
94
|
+
"@types/fs-extra": "11.0.4",
|
|
95
|
+
"@types/js-yaml": "4.0.9",
|
|
96
|
+
"@types/lodash.clonedeepwith": "4.5.9",
|
|
97
|
+
"@types/lodash.mergewith": "4.6.9",
|
|
98
|
+
"@types/node": "25.5.2",
|
|
99
|
+
"@types/proper-lockfile": "4.1.4",
|
|
100
|
+
"husky": "9.1.7",
|
|
101
|
+
"lint-staged": "16.4.0",
|
|
102
|
+
"markdown-link-check": "3.14.2"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@axe-core/playwright": "
|
|
106
|
-
"@backstage-community/plugin-rbac-common": "1.
|
|
107
|
-
"@eslint/js": "
|
|
105
|
+
"@axe-core/playwright": "4.11.1",
|
|
106
|
+
"@backstage-community/plugin-rbac-common": "1.26.0",
|
|
107
|
+
"@eslint/js": "10.0.1",
|
|
108
108
|
"@keycloak/keycloak-admin-client": "26.5.6",
|
|
109
|
-
"@kubernetes/client-node": "
|
|
110
|
-
"eslint": "
|
|
111
|
-
"eslint-plugin-check-file": "
|
|
112
|
-
"eslint-plugin-playwright": "
|
|
113
|
-
"fs-extra": "
|
|
114
|
-
"js-yaml": "
|
|
115
|
-
"lodash.clonedeepwith": "
|
|
116
|
-
"lodash.mergewith": "
|
|
117
|
-
"otplib": "
|
|
118
|
-
"prettier": "
|
|
119
|
-
"proper-lockfile": "
|
|
120
|
-
"typescript": "
|
|
121
|
-
"typescript-eslint": "
|
|
122
|
-
"zx": "
|
|
109
|
+
"@kubernetes/client-node": "1.4.0",
|
|
110
|
+
"eslint": "10.2.0",
|
|
111
|
+
"eslint-plugin-check-file": "3.3.1",
|
|
112
|
+
"eslint-plugin-playwright": "2.10.1",
|
|
113
|
+
"fs-extra": "11.3.4",
|
|
114
|
+
"js-yaml": "4.1.1",
|
|
115
|
+
"lodash.clonedeepwith": "4.5.0",
|
|
116
|
+
"lodash.mergewith": "4.6.2",
|
|
117
|
+
"otplib": "13.4.0",
|
|
118
|
+
"prettier": "3.8.1",
|
|
119
|
+
"proper-lockfile": "4.1.2",
|
|
120
|
+
"typescript": "6.0.2",
|
|
121
|
+
"typescript-eslint": "8.58.1",
|
|
122
|
+
"zx": "8.8.5"
|
|
123
123
|
},
|
|
124
|
-
"packageManager": "yarn@
|
|
124
|
+
"packageManager": "yarn@4.12.0"
|
|
125
125
|
}
|