@camunda/e2e-test-suite 0.0.1694 → 0.0.1696

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.
Files changed (54) hide show
  1. package/dist/fixtures/SM-8.10.d.ts +1 -0
  2. package/dist/fixtures/SM-8.10.js +36 -0
  3. package/dist/fixtures/SM-8.11.d.ts +1 -0
  4. package/dist/fixtures/SM-8.11.js +36 -0
  5. package/dist/fixtures/SM-8.8.d.ts +1 -0
  6. package/dist/fixtures/SM-8.8.js +36 -0
  7. package/dist/fixtures/SM-8.9.d.ts +1 -0
  8. package/dist/fixtures/SM-8.9.js +36 -0
  9. package/dist/pages/8.11/ClusterDetailsPage.d.ts +8 -1
  10. package/dist/pages/8.11/ClusterDetailsPage.js +32 -5
  11. package/dist/pages/8.11/ClusterPage.d.ts +42 -2
  12. package/dist/pages/8.11/ClusterPage.js +228 -31
  13. package/dist/pages/SM-8.10/KeycloakUtils.js +1 -0
  14. package/dist/pages/SM-8.10/ManagementIdentityPage.d.ts +1 -0
  15. package/dist/pages/SM-8.10/ManagementIdentityPage.js +9 -0
  16. package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.d.ts +5 -5
  17. package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.js +22 -12
  18. package/dist/pages/SM-8.10/OperateHomePage.js +4 -2
  19. package/dist/pages/SM-8.10/TaskPanelPage.d.ts +1 -1
  20. package/dist/pages/SM-8.10/TaskPanelPage.js +6 -5
  21. package/dist/pages/SM-8.11/KeycloakUtils.js +1 -0
  22. package/dist/pages/SM-8.11/ManagementIdentityPage.d.ts +1 -0
  23. package/dist/pages/SM-8.11/ManagementIdentityPage.js +9 -0
  24. package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.d.ts +5 -5
  25. package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.js +22 -12
  26. package/dist/pages/SM-8.11/OperateHomePage.js +4 -2
  27. package/dist/pages/SM-8.11/TaskPanelPage.d.ts +1 -1
  28. package/dist/pages/SM-8.11/TaskPanelPage.js +6 -5
  29. package/dist/pages/SM-8.9/OCIdentityClusterVariablesPage.js +3 -1
  30. package/dist/resources/cluster_variables/cluster_variable_tenant_json_readonly.bpmn +4 -4
  31. package/dist/resources/cluster_variables/cluster_variable_tenant_string_readonly.bpmn +4 -4
  32. package/dist/tests/8.10/optimize-api-tests.spec.js +78 -41
  33. package/dist/tests/8.10/optimize-collections-api.spec.js +4 -2
  34. package/dist/tests/8.10/optimize-sharing-alerts-export-api.spec.js +10 -5
  35. package/dist/tests/8.10/optimize-sharing-alerts-export-ui.spec.js +6 -3
  36. package/dist/tests/8.11/console-cluster-duplication-api-clients.spec.d.ts +1 -0
  37. package/dist/tests/8.11/console-cluster-duplication-api-clients.spec.js +154 -0
  38. package/dist/tests/8.11/console-cluster-duplication.spec.d.ts +1 -0
  39. package/dist/tests/8.11/console-cluster-duplication.spec.js +460 -0
  40. package/dist/tests/SM-8.10/cluster-variables-tenant.spec.d.ts +1 -0
  41. package/dist/tests/SM-8.10/cluster-variables-tenant.spec.js +198 -0
  42. package/dist/tests/SM-8.10/optimize-api-tests.spec.d.ts +1 -0
  43. package/dist/tests/SM-8.10/optimize-api-tests.spec.js +468 -0
  44. package/dist/tests/SM-8.11/cluster-variables-tenant.spec.d.ts +1 -0
  45. package/dist/tests/SM-8.11/cluster-variables-tenant.spec.js +198 -0
  46. package/dist/tests/SM-8.11/optimize-api-tests.spec.d.ts +1 -0
  47. package/dist/tests/SM-8.11/optimize-api-tests.spec.js +468 -0
  48. package/dist/tests/SM-8.9/cluster-variables-tenant.spec.js +2 -2
  49. package/dist/utils/apiHelpers.d.ts +4 -0
  50. package/dist/utils/apiHelpers.js +29 -4
  51. package/package.json +1 -1
  52. package/playwright.config.ts +104 -0
  53. package/resources/cluster_variables/cluster_variable_tenant_json_readonly.bpmn +4 -4
  54. package/resources/cluster_variables/cluster_variable_tenant_string_readonly.bpmn +4 -4
@@ -72,6 +72,7 @@ type PlaywrightFixtures = {
72
72
  ocIdentityGroupsPage: OCIdentityGroupsPage;
73
73
  ocTenantPage: OCTenantPage;
74
74
  overrideTrackingScripts: void;
75
+ rewriteIdentityAssetsOnFirefox: void;
75
76
  };
76
77
  declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & PlaywrightFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
77
78
  export { test };
@@ -172,5 +172,41 @@ const test = test_1.test.extend({
172
172
  auto: true,
173
173
  },
174
174
  ],
175
+ rewriteIdentityAssetsOnFirefox: [
176
+ async ({ context, browserName }, use) => {
177
+ // Management Identity serves root-relative assets and relies on its
178
+ // service worker to prefix every same-origin, non-document request with
179
+ // /identity. Playwright's Firefox does not hand those requests to the
180
+ // service worker once any context.route() is registered, so apply the
181
+ // same rewrite. Same recipe as fixtures/SM-8.7.ts.
182
+ if (browserName === 'firefox') {
183
+ await context.route('**/*', async (route) => {
184
+ const request = route.request();
185
+ let frameUrl;
186
+ try {
187
+ frameUrl = new URL(request.frame().url());
188
+ }
189
+ catch {
190
+ frameUrl = undefined;
191
+ }
192
+ const requestUrl = new URL(request.url());
193
+ if (!frameUrl ||
194
+ request.isNavigationRequest() ||
195
+ frameUrl.origin !== requestUrl.origin ||
196
+ !frameUrl.pathname.startsWith('/identity')) {
197
+ await route.fallback();
198
+ return;
199
+ }
200
+ await route.continue({
201
+ url: `${requestUrl.origin}/identity${requestUrl.pathname}${requestUrl.search}`,
202
+ });
203
+ });
204
+ }
205
+ await use();
206
+ },
207
+ {
208
+ auto: true,
209
+ },
210
+ ],
175
211
  });
176
212
  exports.test = test;
@@ -72,6 +72,7 @@ type PlaywrightFixtures = {
72
72
  ocIdentityGroupsPage: OCIdentityGroupsPage;
73
73
  ocTenantPage: OCTenantPage;
74
74
  overrideTrackingScripts: void;
75
+ rewriteIdentityAssetsOnFirefox: void;
75
76
  };
76
77
  declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & PlaywrightFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
77
78
  export { test };
@@ -172,5 +172,41 @@ const test = test_1.test.extend({
172
172
  auto: true,
173
173
  },
174
174
  ],
175
+ rewriteIdentityAssetsOnFirefox: [
176
+ async ({ context, browserName }, use) => {
177
+ // Management Identity serves root-relative assets and relies on its
178
+ // service worker to prefix every same-origin, non-document request with
179
+ // /identity. Playwright's Firefox does not hand those requests to the
180
+ // service worker once any context.route() is registered, so apply the
181
+ // same rewrite. Same recipe as fixtures/SM-8.7.ts.
182
+ if (browserName === 'firefox') {
183
+ await context.route('**/*', async (route) => {
184
+ const request = route.request();
185
+ let frameUrl;
186
+ try {
187
+ frameUrl = new URL(request.frame().url());
188
+ }
189
+ catch {
190
+ frameUrl = undefined;
191
+ }
192
+ const requestUrl = new URL(request.url());
193
+ if (!frameUrl ||
194
+ request.isNavigationRequest() ||
195
+ frameUrl.origin !== requestUrl.origin ||
196
+ !frameUrl.pathname.startsWith('/identity')) {
197
+ await route.fallback();
198
+ return;
199
+ }
200
+ await route.continue({
201
+ url: `${requestUrl.origin}/identity${requestUrl.pathname}${requestUrl.search}`,
202
+ });
203
+ });
204
+ }
205
+ await use();
206
+ },
207
+ {
208
+ auto: true,
209
+ },
210
+ ],
175
211
  });
176
212
  exports.test = test;
@@ -76,6 +76,7 @@ type PlaywrightFixtures = {
76
76
  ocTenantPage: OCTenantPage;
77
77
  idpCreatePage: IdpCreatePage;
78
78
  overrideTrackingScripts: void;
79
+ rewriteIdentityAssetsOnFirefox: void;
79
80
  };
80
81
  declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & PlaywrightFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
81
82
  export { test };
@@ -180,5 +180,41 @@ const test = test_1.test.extend({
180
180
  auto: true,
181
181
  },
182
182
  ],
183
+ rewriteIdentityAssetsOnFirefox: [
184
+ async ({ context, browserName }, use) => {
185
+ // Management Identity serves root-relative assets and relies on its
186
+ // service worker to prefix every same-origin, non-document request with
187
+ // /identity. Playwright's Firefox does not hand those requests to the
188
+ // service worker once any context.route() is registered, so apply the
189
+ // same rewrite. Same recipe as fixtures/SM-8.7.ts.
190
+ if (browserName === 'firefox') {
191
+ await context.route('**/*', async (route) => {
192
+ const request = route.request();
193
+ let frameUrl;
194
+ try {
195
+ frameUrl = new URL(request.frame().url());
196
+ }
197
+ catch {
198
+ frameUrl = undefined;
199
+ }
200
+ const requestUrl = new URL(request.url());
201
+ if (!frameUrl ||
202
+ request.isNavigationRequest() ||
203
+ frameUrl.origin !== requestUrl.origin ||
204
+ !frameUrl.pathname.startsWith('/identity')) {
205
+ await route.fallback();
206
+ return;
207
+ }
208
+ await route.continue({
209
+ url: `${requestUrl.origin}/identity${requestUrl.pathname}${requestUrl.search}`,
210
+ });
211
+ });
212
+ }
213
+ await use();
214
+ },
215
+ {
216
+ auto: true,
217
+ },
218
+ ],
183
219
  });
184
220
  exports.test = test;
@@ -76,6 +76,7 @@ type PlaywrightFixtures = {
76
76
  ocIdentityGroupsPage: OCIdentityGroupsPage;
77
77
  ocTenantPage: OCTenantPage;
78
78
  overrideTrackingScripts: void;
79
+ rewriteIdentityAssetsOnFirefox: void;
79
80
  };
80
81
  declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & PlaywrightFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
81
82
  export { test };
@@ -180,5 +180,41 @@ const test = test_1.test.extend({
180
180
  auto: true,
181
181
  },
182
182
  ],
183
+ rewriteIdentityAssetsOnFirefox: [
184
+ async ({ context, browserName }, use) => {
185
+ // Management Identity serves root-relative assets and relies on its
186
+ // service worker to prefix every same-origin, non-document request with
187
+ // /identity. Playwright's Firefox does not hand those requests to the
188
+ // service worker once any context.route() is registered, so apply the
189
+ // same rewrite. Same recipe as fixtures/SM-8.7.ts.
190
+ if (browserName === 'firefox') {
191
+ await context.route('**/*', async (route) => {
192
+ const request = route.request();
193
+ let frameUrl;
194
+ try {
195
+ frameUrl = new URL(request.frame().url());
196
+ }
197
+ catch {
198
+ frameUrl = undefined;
199
+ }
200
+ const requestUrl = new URL(request.url());
201
+ if (!frameUrl ||
202
+ request.isNavigationRequest() ||
203
+ frameUrl.origin !== requestUrl.origin ||
204
+ !frameUrl.pathname.startsWith('/identity')) {
205
+ await route.fallback();
206
+ return;
207
+ }
208
+ await route.continue({
209
+ url: `${requestUrl.origin}/identity${requestUrl.pathname}${requestUrl.search}`,
210
+ });
211
+ });
212
+ }
213
+ await use();
214
+ },
215
+ {
216
+ auto: true,
217
+ },
218
+ ],
183
219
  });
184
220
  exports.test = test;
@@ -64,6 +64,7 @@ declare class ClusterDetailsPage {
64
64
  clickAPITab(): Promise<void>;
65
65
  dismissOopsIfPresent(): Promise<void>;
66
66
  clickCreateClientButton(): Promise<void>;
67
+ openCreateClientDialog(): Promise<void>;
67
68
  clickClientNameTextbox(): Promise<void>;
68
69
  fillClientNameTextbox(name: string): Promise<void>;
69
70
  clickTasklistCheckbox(): Promise<void>;
@@ -96,7 +97,13 @@ declare class ClusterDetailsPage {
96
97
  createAPIClientAndReturnVariables(name: string, setEnvVariables?: boolean, clusterType?: string): Promise<{
97
98
  [key: string]: string;
98
99
  }>;
99
- createAPIClient(name: string): Promise<void>;
100
+ /**
101
+ * Returns the name the client was really created with, which is `name`
102
+ * unless an attempt failed and the retry suffixed it. A caller that
103
+ * asserts against the requested name instead would miss the client on
104
+ * every retried create.
105
+ */
106
+ createAPIClient(name: string): Promise<string>;
100
107
  clickEnvVarsButton(): Promise<void>;
101
108
  clientCredentialsText(regex: RegExp): Promise<string>;
102
109
  checkTasklistCheckbox(): Promise<void>;
@@ -286,6 +286,27 @@ class ClusterDetailsPage {
286
286
  },
287
287
  });
288
288
  }
289
+ // Right after the API tab mounts, Console refetches the cluster, clients
290
+ // and alerts queries; that re-render unmounts a create dialog opened in the
291
+ // meantime about a second later. Reloading the page restarts the same
292
+ // race, so reopen the dialog in place until it survives the settle window.
293
+ async openCreateClientDialog() {
294
+ const maxOpens = 4;
295
+ for (let open = 1; open <= maxOpens; open++) {
296
+ await this.clickCreateClientButton();
297
+ await (0, test_1.expect)(this.createClientCredentialsDialog).toBeVisible({
298
+ timeout: 30000,
299
+ });
300
+ const closedOnItsOwn = await this.createClientCredentialsDialog
301
+ .waitFor({ state: 'hidden', timeout: 5000 })
302
+ .then(() => true, () => false);
303
+ if (!closedOnItsOwn) {
304
+ return;
305
+ }
306
+ console.warn(`openCreateClientDialog: dialog closed on its own (open ${open}/${maxOpens}); reopening`);
307
+ }
308
+ throw new Error(`Create client dialog closed on its own after ${maxOpens} opens`);
309
+ }
289
310
  async clickClientNameTextbox() {
290
311
  await this.clientNameTextbox.click({ timeout: 60000 });
291
312
  }
@@ -760,6 +781,12 @@ class ClusterDetailsPage {
760
781
  }
761
782
  return variables;
762
783
  }
784
+ /**
785
+ * Returns the name the client was really created with, which is `name`
786
+ * unless an attempt failed and the retry suffixed it. A caller that
787
+ * asserts against the requested name instead would miss the client on
788
+ * every retried create.
789
+ */
763
790
  async createAPIClient(name) {
764
791
  const maxRetries = 3;
765
792
  for (let attempt = 0; attempt < maxRetries; attempt++) {
@@ -768,10 +795,7 @@ class ClusterDetailsPage {
768
795
  // have created the client before we could detect the credentials dialog.
769
796
  const attemptName = attempt === 0 ? name : `${name}-r${attempt}`;
770
797
  try {
771
- await this.clickCreateClientButton();
772
- await (0, test_1.expect)(this.createClientCredentialsDialog).toBeVisible({
773
- timeout: 30000,
774
- });
798
+ await this.openCreateClientDialog();
775
799
  await this.fillAPIClientName(attemptName);
776
800
  await this.checkOrchestrationClusterCheckbox();
777
801
  await this.checkOptimizeCheckbox();
@@ -818,7 +842,7 @@ class ClusterDetailsPage {
818
842
  // round the retry loop, which both left orphan clients behind and
819
843
  // discarded the credentials the caller has yet to read.
820
844
  this.pendingClientScopeCheck = attemptName;
821
- return;
845
+ return attemptName;
822
846
  }
823
847
  catch (error) {
824
848
  if (attempt < maxRetries - 1) {
@@ -841,6 +865,9 @@ class ClusterDetailsPage {
841
865
  }
842
866
  }
843
867
  }
868
+ // Unreachable: every iteration returns or throws. Stated so the compiler
869
+ // can see the function never falls out of the loop without a name.
870
+ throw new Error(`Creating API client "${name}" exhausted ${maxRetries} attempts without a result`);
844
871
  }
845
872
  async clickEnvVarsButton() {
846
873
  await (0, test_1.expect)(this.envVarsTab).toBeVisible({ timeout: 40000 });
@@ -24,6 +24,7 @@ declare class ClusterPage {
24
24
  readonly clusterVersionOption: Locator;
25
25
  readonly generationSearchInput: Locator;
26
26
  readonly g3DevClusterType: Locator;
27
+ readonly clusterRegion: (clusterName: string, regionText: string) => Locator;
27
28
  readonly alphaTab: Locator;
28
29
  readonly devTab: Locator;
29
30
  readonly stableTab: Locator;
@@ -45,15 +46,54 @@ declare class ClusterPage {
45
46
  deleteCluster(name: string): Promise<void>;
46
47
  clickClusterTab(): Promise<void>;
47
48
  clickCreateNewClusterButton(): Promise<void>;
49
+ /**
50
+ * No recovery between attempts, deliberately.
51
+ *
52
+ * clickLocatorWithRetry used to run clickClusterBanner() here, which
53
+ * navigates to the cluster list. That cannot help on either form this is
54
+ * reached from, because the retry loop retries only the click and never
55
+ * reopens the form it navigated away from:
56
+ *
57
+ * - the duplication form is reached from a cluster's overflow menu, so
58
+ * the list is a different page and the input is gone (DUP-01, run
59
+ * 41840910661);
60
+ * - createCluster() opens the create form once before awaiting this, so
61
+ * the list is a different page there too (DUP-02, run 41988552631).
62
+ *
63
+ * Both failed as "Failed to click locator getByPlaceholder('Enter a name
64
+ * for the cluster') after 3 attempts": one recoverable slow render, then
65
+ * two attempts that could not succeed. Retrying in place costs the same
66
+ * time and can actually find the input.
67
+ */
48
68
  clickClusterNameInput(): Promise<void>;
69
+ /**
70
+ * Runs `open` until the cluster form's name input is on screen and stays
71
+ * there. A Console refetch can re-render the page right after the form
72
+ * opens and drop it again (DUP-02/DUP-06, run 44125578620: the snapshot
73
+ * shows the clusters list, no form), and clicking the input in place
74
+ * cannot bring the form back, so the opener itself is retried.
75
+ */
76
+ openClusterForm(open: () => Promise<void>): Promise<void>;
77
+ /**
78
+ * Opens the duplication form of `sourceClusterName` from its details page.
79
+ * When the details page is gone (the form dropped back to the list), it is
80
+ * reached again first; `onDetailsPage` runs once it has loaded.
81
+ */
82
+ openDuplicateClusterForm(sourceClusterName: string, onDetailsPage?: () => Promise<void>): Promise<void>;
49
83
  cloudProviderOption(region: string): Locator;
50
84
  fillClusterNameInput(name: string): Promise<void>;
51
85
  private extractClusterIdFromUrl;
52
86
  private logClusterCreationInfo;
53
- createCluster(name: string, region?: string, tasklistV1Api?: boolean): Promise<void>;
87
+ createCluster(name: string, region?: string, tasklistV1Api?: boolean, subRegion?: string): Promise<void>;
54
88
  determineTasklistAPI(tasklistV1Api?: boolean): Promise<void>;
55
89
  clickClusterType(): Promise<void>;
56
90
  clickCreateClusterButton(): Promise<void>;
91
+ /**
92
+ * Fails at the submit when the create form is still open a minute later,
93
+ * with the form's own error text, instead of letting clickClustersBreadcrumb
94
+ * wait out 90s for a row that was never created.
95
+ */
96
+ private assertClusterFormSubmitted;
57
97
  clickClustersBreadcrumb(clusterName: string): Promise<void>;
58
98
  clickClusterLink(name: string): Promise<void>;
59
99
  clickConnectorSecretsTab(clusterName: string): Promise<void>;
@@ -90,7 +130,7 @@ declare class ClusterPage {
90
130
  clickDevTab(): Promise<void>;
91
131
  clickStableTab(): Promise<void>;
92
132
  clickQAGenerationsTab(): Promise<void>;
93
- selectSubRegion(region: string): Promise<void>;
133
+ selectSubRegion(region: string, subRegion?: string): Promise<void>;
94
134
  clickGCPRegion(): Promise<void>;
95
135
  clickTasklistV1Api(): Promise<void>;
96
136
  }