@camunda/e2e-test-suite 0.0.1499 → 0.0.1501
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.
|
@@ -6,6 +6,7 @@ const sleep_1 = require("../../utils/sleep");
|
|
|
6
6
|
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
7
7
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
8
8
|
const clusterVersions_1 = require("../../utils/clusterVersions");
|
|
9
|
+
const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
|
|
9
10
|
class ClusterPage {
|
|
10
11
|
page;
|
|
11
12
|
defaultClusterType = 'G3-Dev';
|
|
@@ -341,6 +342,16 @@ class ClusterPage {
|
|
|
341
342
|
await this.page.waitForTimeout(3000);
|
|
342
343
|
await this.page.reload({ waitUntil: 'domcontentloaded' }).catch(() => { });
|
|
343
344
|
await this.deleteCluster(name);
|
|
345
|
+
// Console hides generations past their unsupported date from the create
|
|
346
|
+
// form's channel tabs, so an explicit generation UUID (on-demand runs) can
|
|
347
|
+
// only be used through the API. The UI flow sets nothing beyond name, type,
|
|
348
|
+
// region and generation, all of which the API create carries.
|
|
349
|
+
if ((process.env.CLUSTER_GENERATION_UUID ?? '').trim()) {
|
|
350
|
+
const clusterId = await (0, consoleApiHelpers_1.createClusterViaApi)(this.page, name, region);
|
|
351
|
+
this.createdClusterIds.set(name, clusterId);
|
|
352
|
+
await this.clickClusterBanner();
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
344
355
|
await this.clickCreateNewClusterButton();
|
|
345
356
|
await this.clickClusterNameInput();
|
|
346
357
|
await this.fillClusterNameInput(name);
|
|
@@ -986,6 +986,7 @@ class ModelerCreatePage {
|
|
|
986
986
|
if (await this.diagramNameInput.isVisible()) {
|
|
987
987
|
await this.diagramNameInput.fill(name, { timeout: 60000 });
|
|
988
988
|
await this.diagramNameInput.press('Enter', { timeout: 60000 });
|
|
989
|
+
await this.waitForFileSavesToSettle();
|
|
989
990
|
return;
|
|
990
991
|
}
|
|
991
992
|
// Today the shell renders one kebab for the whole breadcrumb; camunda-hub
|
|
@@ -1016,6 +1017,10 @@ class ModelerCreatePage {
|
|
|
1016
1017
|
await this.renameInput.fill(name);
|
|
1017
1018
|
await this.renameSubmitButton.click();
|
|
1018
1019
|
await (0, test_1.expect)(this.renameInput).toBeHidden({ timeout: 10000 });
|
|
1020
|
+
// The rename is its own PATCH /files/{id}; an edit autosaved while it is
|
|
1021
|
+
// in flight gets a 409 and Hub force-refreshes the diagram, dropping the
|
|
1022
|
+
// edit.
|
|
1023
|
+
await this.waitForFileSavesToSettle();
|
|
1019
1024
|
}
|
|
1020
1025
|
async clickVariableInput() {
|
|
1021
1026
|
await this.variableInput.click();
|
|
@@ -372,6 +372,33 @@ function pickGenerationByName(channels, generationName) {
|
|
|
372
372
|
throw new Error(`Source generation "${generationName}" not found in any channel's ` +
|
|
373
373
|
`allowed generations`);
|
|
374
374
|
}
|
|
375
|
+
function hasGenerationUuid() {
|
|
376
|
+
return (process.env.CLUSTER_GENERATION_UUID ?? '').trim() !== '';
|
|
377
|
+
}
|
|
378
|
+
// Explicit generation UUID for on-demand runs (CLUSTER_GENERATION_UUID, with an
|
|
379
|
+
// optional CLUSTER_CHANNEL_UUID). Console hides generations past their
|
|
380
|
+
// unsupported date (e.g. 8.7 after 8.10 GA) from /clusters/parameters for orgs
|
|
381
|
+
// without the legacyStreams limit -- which includes every QA org -- so a name
|
|
382
|
+
// lookup cannot find them, but cluster creation still validates against the
|
|
383
|
+
// channel's full generation list. A UUID therefore reaches a generation the org
|
|
384
|
+
// cannot list. The channel is taken, in order, from CLUSTER_CHANNEL_UUID, the
|
|
385
|
+
// channel that lists the UUID, or the Stable channel.
|
|
386
|
+
function pickGenerationByUuid(channels) {
|
|
387
|
+
const generationId = (process.env.CLUSTER_GENERATION_UUID ?? '').trim();
|
|
388
|
+
if (!generationId)
|
|
389
|
+
return undefined;
|
|
390
|
+
const listedIn = channels.find((channel) => (channel.allowedGenerations ?? []).some((generation) => generation.uuid === generationId));
|
|
391
|
+
const channelId = (process.env.CLUSTER_CHANNEL_UUID ?? '').trim() ||
|
|
392
|
+
listedIn?.uuid ||
|
|
393
|
+
channels.find((channel) => channel.name === STABLE_CHANNEL_NAME)?.uuid;
|
|
394
|
+
if (!channelId) {
|
|
395
|
+
throw new Error(`No channel for generation ${generationId}: set CLUSTER_CHANNEL_UUID ` +
|
|
396
|
+
`or make sure the "${STABLE_CHANNEL_NAME}" channel is listed`);
|
|
397
|
+
}
|
|
398
|
+
console.log(`Using generation ${generationId} from CLUSTER_GENERATION_UUID in ` +
|
|
399
|
+
`channel ${channelId}`);
|
|
400
|
+
return { channelId, generationId };
|
|
401
|
+
}
|
|
375
402
|
// Resolve the version-keyed snapshot generation live by name. The snapshot is
|
|
376
403
|
// named "<minor> Cross Component Test Suite" (see .github/c8_versions.json) and
|
|
377
404
|
// is periodically recreated in Console INT with a fresh UUID -- and can move
|
|
@@ -499,8 +526,13 @@ async function createClusterViaApi(page, clusterName, region = 'GCP', tasklistV2
|
|
|
499
526
|
channelId = migrationTarget.channelId;
|
|
500
527
|
generationId = migrationTarget.generationId;
|
|
501
528
|
}
|
|
502
|
-
else if (requestedGeneration) {
|
|
503
|
-
|
|
529
|
+
else if (hasGenerationUuid() || requestedGeneration) {
|
|
530
|
+
// An explicit UUID is honored even when CLUSTER_VERSION is a bare minor or
|
|
531
|
+
// the snapshot name (which requestedGenerationName() excludes), so it can
|
|
532
|
+
// never silently fall through to the default snapshot generation.
|
|
533
|
+
const channels = await fetchClusterChannels(page);
|
|
534
|
+
const target = pickGenerationByUuid(channels) ??
|
|
535
|
+
pickGenerationByName(channels, requestedGeneration ?? '');
|
|
504
536
|
channelId = target.channelId;
|
|
505
537
|
generationId = target.generationId;
|
|
506
538
|
}
|