@red-hat-developer-hub/e2e-test-utils 1.1.21 → 1.1.23
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 +15 -2
- package/dist/deployment/rhdh/types.d.ts +2 -0
- package/dist/deployment/rhdh/types.d.ts.map +1 -1
- package/dist/playwright/helpers/common.d.ts +1 -1
- package/dist/playwright/helpers/common.d.ts.map +1 -1
- package/dist/playwright/helpers/common.js +8 -11
- package/dist/utils/plugin-metadata.d.ts +10 -0
- package/dist/utils/plugin-metadata.d.ts.map +1 -1
- package/dist/utils/plugin-metadata.js +21 -0
- package/package.json +1 -1
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../src/deployment/rhdh/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAoB1E,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;YAuCpD,eAAe;YAmBf,aAAa;IAqB3B;;;OAGG;YACW,0BAA0B;YA6D1B,oBAAoB;YAWpB,eAAe;YAmCf,mBAAmB;IAiD3B,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;IAwBpD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAIjB,oBAAoB;IAsClC;;;OAGG;YACW,0BAA0B;IAwCxC,OAAO,CAAC,sBAAsB;IAqCxB,SAAS,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrE,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,SAAS;CAMlB"}
|
|
@@ -3,7 +3,7 @@ import { $ } from "../../utils/bash.js";
|
|
|
3
3
|
import yaml from "js-yaml";
|
|
4
4
|
import { test } from "@playwright/test";
|
|
5
5
|
import { mergeYamlFilesIfExists, deepMerge } from "../../utils/merge-yamls.js";
|
|
6
|
-
import { loadAndInjectPluginMetadata, generateDynamicPluginsConfigFromMetadata, getNormalizedPluginMergeKey, } from "../../utils/plugin-metadata.js";
|
|
6
|
+
import { loadAndInjectPluginMetadata, generateDynamicPluginsConfigFromMetadata, getNormalizedPluginMergeKey, disablePluginWrappers, } from "../../utils/plugin-metadata.js";
|
|
7
7
|
import { envsubst } from "../../utils/common.js";
|
|
8
8
|
import { runOnce } from "../../playwright/run-once.js";
|
|
9
9
|
import cloneDeepWith from "lodash.clonedeepwith";
|
|
@@ -77,6 +77,7 @@ export class RHDHDeployment {
|
|
|
77
77
|
const userConfigPath = this.deploymentConfig.dynamicPlugins;
|
|
78
78
|
const userConfigExists = userConfigPath && fs.existsSync(userConfigPath);
|
|
79
79
|
const authConfig = AUTH_CONFIG_PATHS[this.deploymentConfig.auth];
|
|
80
|
+
const wrapperPlugins = disablePluginWrappers(this.deploymentConfig.disableWrappers);
|
|
80
81
|
// If user's dynamic-plugins config doesn't exist, auto-generate from metadata
|
|
81
82
|
if (!userConfigExists) {
|
|
82
83
|
this._log(`Dynamic plugins config not found at '${userConfigPath}', auto-generating from metadata...`);
|
|
@@ -85,12 +86,18 @@ export class RHDHDeployment {
|
|
|
85
86
|
// the same logical plugin (e.g. keycloak from metadata OCI + auth local path)
|
|
86
87
|
// is deduplicated; metadata (source) wins so OCI URL is kept on PR builds.
|
|
87
88
|
const authPlugins = await mergeYamlFilesIfExists([DEFAULT_CONFIG_PATHS.dynamicPlugins, authConfig.dynamicPlugins], { arrayMergeStrategy: { byKey: "package" } });
|
|
88
|
-
|
|
89
|
+
const dynamicPlugins = deepMerge(authPlugins, metadataConfig, {
|
|
89
90
|
arrayMergeStrategy: {
|
|
90
91
|
byKey: "package",
|
|
91
92
|
normalizeKey: (item) => getNormalizedPluginMergeKey(item),
|
|
92
93
|
},
|
|
93
94
|
});
|
|
95
|
+
if (!process.env.GIT_PR_NUMBER) {
|
|
96
|
+
return dynamicPlugins;
|
|
97
|
+
}
|
|
98
|
+
return deepMerge(dynamicPlugins, wrapperPlugins, {
|
|
99
|
+
arrayMergeStrategy: "concat",
|
|
100
|
+
});
|
|
94
101
|
}
|
|
95
102
|
// User config exists - merge provided configs and inject metadata for listed plugins only
|
|
96
103
|
let dynamicPluginsConfig = await mergeYamlFilesIfExists([
|
|
@@ -101,6 +108,11 @@ export class RHDHDeployment {
|
|
|
101
108
|
// Inject plugin metadata configuration for plugins in the config
|
|
102
109
|
dynamicPluginsConfig =
|
|
103
110
|
await loadAndInjectPluginMetadata(dynamicPluginsConfig);
|
|
111
|
+
if (process.env.GIT_PR_NUMBER) {
|
|
112
|
+
dynamicPluginsConfig = deepMerge(dynamicPluginsConfig, wrapperPlugins, {
|
|
113
|
+
arrayMergeStrategy: "concat",
|
|
114
|
+
});
|
|
115
|
+
}
|
|
104
116
|
return dynamicPluginsConfig;
|
|
105
117
|
}
|
|
106
118
|
async _applyDynamicPlugins() {
|
|
@@ -269,6 +281,7 @@ export class RHDHDeployment {
|
|
|
269
281
|
appConfig: input.appConfig ?? `tests/config/app-config-rhdh.yaml`,
|
|
270
282
|
secrets: input.secrets ?? `tests/config/rhdh-secrets.yaml`,
|
|
271
283
|
dynamicPlugins: input.dynamicPlugins ?? `tests/config/dynamic-plugins.yaml`,
|
|
284
|
+
disableWrappers: input.disableWrappers ?? [],
|
|
272
285
|
};
|
|
273
286
|
if (method === "helm") {
|
|
274
287
|
return {
|
|
@@ -10,6 +10,7 @@ export type DeploymentOptions = {
|
|
|
10
10
|
method?: DeploymentMethod;
|
|
11
11
|
valueFile?: string;
|
|
12
12
|
subscription?: string;
|
|
13
|
+
disableWrappers?: string[];
|
|
13
14
|
};
|
|
14
15
|
export type HelmDeploymentConfig = {
|
|
15
16
|
method: "helm";
|
|
@@ -26,6 +27,7 @@ export type DeploymentConfigBase = {
|
|
|
26
27
|
appConfig: string;
|
|
27
28
|
secrets: string;
|
|
28
29
|
dynamicPlugins: string;
|
|
30
|
+
disableWrappers: string[];
|
|
29
31
|
};
|
|
30
32
|
export type DeploymentConfig = DeploymentConfigBase & (HelmDeploymentConfig | OperatorDeploymentConfig);
|
|
31
33
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/deployment/rhdh/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,SAA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AAwB,CAAC,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare class LoginHelper {
|
|
|
7
7
|
loginAsGuest(): Promise<void>;
|
|
8
8
|
signOut(): Promise<void>;
|
|
9
9
|
private logintoGithub;
|
|
10
|
-
logintoKeycloak(userid: string, password: string): Promise<void>;
|
|
10
|
+
logintoKeycloak(popup: Page, userid: string, password: string): Promise<void>;
|
|
11
11
|
loginAsKeycloakUser(userid?: string, password?: string): Promise<void>;
|
|
12
12
|
loginAsGithubUser(userid?: string): Promise<void>;
|
|
13
13
|
checkAndReauthorizeGithubApp(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/playwright/helpers/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOhE,qBAAa,WAAW;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;gBAEP,IAAI,EAAE,IAAI;IAKhB,YAAY;IAcZ,OAAO;YAMC,aAAa;IAyCrB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/playwright/helpers/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOhE,qBAAa,WAAW;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;gBAEP,IAAI,EAAE,IAAI;IAKhB,YAAY;IAcZ,OAAO;YAMC,aAAa;IAyCrB,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAO7D,mBAAmB,CACvB,MAAM,GAAE,MAAkC,EAC1C,QAAQ,GAAE,MAAkC;IAWxC,iBAAiB,CACrB,MAAM,GAAE,MAA+C;IA6BnD,4BAA4B;IAqB5B,YAAY,CAAC,KAAK,EAAE,MAAM;IA2B1B,2BAA2B,CAAC,KAAK,UAAQ;IAU/C,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIxC,mBAAmB,IAAI,MAAM;IAIvB,mBAAmB;IAgBzB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAevC,eAAe,IAAI,MAAM;IAKnB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;YAqCxC,sBAAsB;IAoD9B,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAYjE,2BAA2B,CAC/B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM;IAYb,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CA2C7D;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;;;GAWtE"}
|
|
@@ -54,22 +54,19 @@ export class LoginHelper {
|
|
|
54
54
|
}
|
|
55
55
|
await this.page.waitForTimeout(3_000);
|
|
56
56
|
}
|
|
57
|
-
async logintoKeycloak(userid, password) {
|
|
58
|
-
await
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
await popup.locator("#password").fill(password);
|
|
63
|
-
await popup.locator("#kc-login").click();
|
|
64
|
-
resolve();
|
|
65
|
-
});
|
|
66
|
-
});
|
|
57
|
+
async logintoKeycloak(popup, userid, password) {
|
|
58
|
+
await popup.waitForLoadState();
|
|
59
|
+
await popup.locator("#username").fill(userid);
|
|
60
|
+
await popup.locator("#password").fill(password);
|
|
61
|
+
await popup.locator("#kc-login").click();
|
|
67
62
|
}
|
|
68
63
|
async loginAsKeycloakUser(userid = DEFAULT_USERS[0].username, password = DEFAULT_USERS[0].password) {
|
|
69
64
|
await this.page.goto("/");
|
|
70
65
|
await this.uiHelper.waitForLoad(240000);
|
|
66
|
+
const popupPromise = this.page.waitForEvent("popup");
|
|
71
67
|
await this.uiHelper.clickButton("Sign In");
|
|
72
|
-
await
|
|
68
|
+
const popup = await popupPromise;
|
|
69
|
+
await this.logintoKeycloak(popup, userid, password);
|
|
73
70
|
await this.page.waitForSelector("nav a", { timeout: 10_000 });
|
|
74
71
|
}
|
|
75
72
|
async loginAsGithubUser(userid = process.env.VAULT_GH_USER_ID) {
|
|
@@ -103,6 +103,16 @@ export interface DynamicPluginsConfig {
|
|
|
103
103
|
* @returns The augmented configuration with injected pluginConfigs
|
|
104
104
|
*/
|
|
105
105
|
export declare function injectMetadataConfig(dynamicPluginsConfig: DynamicPluginsConfig, metadataMap: Map<string, PluginMetadata>): DynamicPluginsConfig;
|
|
106
|
+
/**
|
|
107
|
+
* Generates dynamic-plugins configuration for wrapper plugins
|
|
108
|
+
* that need to be disabled. Each plugin entry contains:
|
|
109
|
+
* - package: ./dynamic-plugins/dist/$plugin-name
|
|
110
|
+
* - disabled: true
|
|
111
|
+
*
|
|
112
|
+
* @param plugins list of wrapper plugin names
|
|
113
|
+
* @returns Dynamic plugins configuration that disables listed wrapper plugins
|
|
114
|
+
*/
|
|
115
|
+
export declare function disablePluginWrappers(plugins: string[]): DynamicPluginsConfig;
|
|
106
116
|
/**
|
|
107
117
|
* Generates a complete dynamic-plugins configuration from metadata files.
|
|
108
118
|
* Iterates through all metadata files and creates plugin entries with:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-metadata.d.ts","sourceRoot":"","sources":["../../src/utils/plugin-metadata.ts"],"names":[],"mappings":"AA8HA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B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
271
|
+
/**
|
|
272
|
+
* Generates dynamic-plugins configuration for wrapper plugins
|
|
273
|
+
* that need to be disabled. Each plugin entry contains:
|
|
274
|
+
* - package: ./dynamic-plugins/dist/$plugin-name
|
|
275
|
+
* - disabled: true
|
|
276
|
+
*
|
|
277
|
+
* @param plugins list of wrapper plugin names
|
|
278
|
+
* @returns Dynamic plugins configuration that disables listed wrapper plugins
|
|
279
|
+
*/
|
|
280
|
+
export function disablePluginWrappers(plugins) {
|
|
281
|
+
const pluginConfig = {
|
|
282
|
+
plugins: [],
|
|
283
|
+
};
|
|
284
|
+
for (const plugin of plugins) {
|
|
285
|
+
pluginConfig.plugins.push({
|
|
286
|
+
package: `./dynamic-plugins/dist/${plugin}`,
|
|
287
|
+
disabled: true,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return pluginConfig;
|
|
291
|
+
}
|
|
271
292
|
/**
|
|
272
293
|
* Generates a complete dynamic-plugins configuration from metadata files.
|
|
273
294
|
* Iterates through all metadata files and creates plugin entries with:
|