@camunda/e2e-test-suite 0.0.1333 → 0.0.1335

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.
@@ -8,6 +8,7 @@ declare class ConnectorMarketplacePage {
8
8
  readonly addToProjectButton: Locator;
9
9
  readonly cancelButton: Locator;
10
10
  readonly tryAgainButton: Locator;
11
+ readonly checkFailedAlert: Locator;
11
12
  readonly closeButton: Locator;
12
13
  readonly browseAllMarketplaceDetailsButton: Locator;
13
14
  constructor(page: Page);
@@ -11,6 +11,7 @@ class ConnectorMarketplacePage {
11
11
  addToProjectButton;
12
12
  cancelButton;
13
13
  tryAgainButton;
14
+ checkFailedAlert;
14
15
  closeButton;
15
16
  browseAllMarketplaceDetailsButton;
16
17
  constructor(page) {
@@ -40,6 +41,9 @@ class ConnectorMarketplacePage {
40
41
  });
41
42
  this.cancelButton = page.getByRole('button', { name: 'Cancel' });
42
43
  this.tryAgainButton = page.getByRole('button', { name: 'Try again' });
44
+ this.checkFailedAlert = page
45
+ .getByText("Couldn't check this connector")
46
+ .first();
43
47
  this.closeButton = page.getByRole('button', { name: 'Close' });
44
48
  }
45
49
  async clickSearchForConnectorTextbox() {
@@ -81,24 +85,29 @@ class ConnectorMarketplacePage {
81
85
  // request still pending 30s in. When the check fails the footer offers
82
86
  // "Try again" (RETRY_INSPECTION) instead of "Add to project", so give the
83
87
  // check longer and re-run it on failure rather than timing out.
88
+ //
89
+ // Hub retries a transient (5xx) check once by itself before it shows
90
+ // "Try again" (use-marketplace-connector-inspection.ts), and the gateway
91
+ // only answers a hung metadata request with a 504 after ~60s -- so
92
+ // "Try again" first renders ~121s after the click. A 120s wait expired
93
+ // ~1s before that and never reached the retry below; allow both attempts.
94
+ // A "Try again" check keeps the button on screen (loading) and hides the
95
+ // "Couldn't check" alert until it fails again, so wait on that alert
96
+ // rather than the button to retry as soon as a check has failed.
84
97
  const outcome = this.addToProjectButton
85
98
  .or(this.replaceResourceButton)
86
99
  .or(this.cancelButton)
87
100
  .first();
88
- for (let attempt = 0; attempt < 3; attempt++) {
101
+ for (let attempt = 0; attempt < 4; attempt++) {
89
102
  await outcome
90
- .or(this.tryAgainButton)
103
+ .or(this.checkFailedAlert)
91
104
  .first()
92
- .waitFor({ state: 'visible', timeout: 120000 });
105
+ .waitFor({ state: 'visible', timeout: 180000 });
93
106
  if (await outcome.isVisible()) {
94
107
  break;
95
108
  }
96
- // The retrying check keeps "Try again" on screen (as a loading button),
97
- // so wait for its result here instead of re-polling the union above.
98
109
  await this.tryAgainButton.click({ timeout: 10000 });
99
- await outcome
100
- .waitFor({ state: 'visible', timeout: 120000 })
101
- .catch(() => { });
110
+ await this.checkFailedAlert.waitFor({ state: 'hidden', timeout: 10000 });
102
111
  }
103
112
  await outcome.waitFor({ state: 'visible', timeout: 10000 });
104
113
  let imported = false;
@@ -137,8 +137,17 @@ api_1.test.describe('Resource deletion', () => {
137
137
  }
138
138
  // The test is the deletion, so cleanup has nothing left to do.
139
139
  resources.forget('resource', key);
140
+ // From 8.10 a deleted definition stays readable with `state: DELETED`
141
+ // until a history-deletion batch operation removes it from secondary
142
+ // storage. That removal waits for every instance of the definition to be
143
+ // purged first and has no upper bound, so DELETED is the proof here.
140
144
  await (0, eventually_1.eventually)(async () => {
141
145
  const lookup = await api.get('/process-definitions/{processDefinitionKey}', { params: { processDefinitionKey: key } });
146
+ if ((0, config_1.atLeastVersion)('8.10') && lookup.status() === 200) {
147
+ const definition = (await lookup.json());
148
+ (0, test_1.expect)(definition.state).toBe('DELETED');
149
+ return;
150
+ }
142
151
  await (0, assertions_1.assertNotFound)(lookup);
143
152
  });
144
153
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1333",
3
+ "version": "0.0.1335",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",