@camunda/e2e-test-suite 0.0.864 → 0.0.865

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.
@@ -50,6 +50,7 @@ declare class ClusterDetailsPage {
50
50
  readonly tasklistV2RadioButton: Locator;
51
51
  constructor(page: Page);
52
52
  clickAPITab(): Promise<void>;
53
+ dismissOopsIfPresent(): Promise<void>;
53
54
  clickCreateClientButton(): Promise<void>;
54
55
  clickClientNameTextbox(): Promise<void>;
55
56
  fillClientNameTextbox(name: string): Promise<void>;
@@ -177,8 +177,33 @@ class ClusterDetailsPage {
177
177
  await (0, test_1.expect)(this.apiTab).toBeVisible({ timeout: 60000 });
178
178
  await this.apiTab.click({ timeout: 60000 });
179
179
  }
180
+ async dismissOopsIfPresent() {
181
+ // The clients list panel sometimes lands in a Carbon "Oops ... something
182
+ // went wrong." state when a background ClustersService request fails on
183
+ // SaaS INT. The panel replaces the create-client button, so any click
184
+ // attempt will time out until the user clicks the inline Reload button.
185
+ const oopsHeading = this.page.getByRole('heading', { name: /Oops/i });
186
+ if (!(await oopsHeading.isVisible({ timeout: 1000 }).catch(() => false))) {
187
+ return;
188
+ }
189
+ const reloadButton = this.page.getByRole('button', {
190
+ name: 'Reload',
191
+ exact: true,
192
+ });
193
+ if (await reloadButton.isVisible({ timeout: 1000 }).catch(() => false)) {
194
+ await reloadButton.click({ timeout: 15000 }).catch(() => { });
195
+ }
196
+ else {
197
+ await this.page.reload();
198
+ }
199
+ await this.page.waitForLoadState('domcontentloaded');
200
+ }
180
201
  async clickCreateClientButton() {
181
- await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.createFirstClientButton.or(this.createNewClientButton));
202
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.createFirstClientButton.or(this.createNewClientButton), {
203
+ preAction: async () => {
204
+ await this.dismissOopsIfPresent();
205
+ },
206
+ });
182
207
  }
183
208
  async clickClientNameTextbox() {
184
209
  await this.clientNameTextbox.click({ timeout: 60000 });
@@ -216,9 +216,18 @@ class ClusterSecretsPage {
216
216
  });
217
217
  }
218
218
  catch {
219
- // Import dialog didn't close - press Escape and let assertSecretsOrCreate handle creation
219
+ // Import dialog didn't close - press Escape and let assertSecretsOrCreate handle creation.
220
+ // The dialog getting stuck like this is usually a transient "Oops ...
221
+ // something went wrong" error panel replacing its normal content after
222
+ // the import submission (observed in run 30063427178: the panel
223
+ // rendered inside the dialog with its own Reload button). Escape only
224
+ // force-dismisses the dialog chrome - the page behind it is left in
225
+ // the same broken state, so createNewSecretButton below never renders
226
+ // without a reload first.
220
227
  await this.page.keyboard.press('Escape');
221
228
  await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 10000 });
229
+ await this.page.reload();
230
+ await (0, sleep_1.sleep)(5000);
222
231
  }
223
232
  await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
224
233
  timeout: 60000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.864",
3
+ "version": "0.0.865",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",