@camunda/e2e-test-suite 0.0.1090 → 0.0.1091
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.
|
@@ -148,7 +148,22 @@ class FormJsPage {
|
|
|
148
148
|
.isVisible()
|
|
149
149
|
.catch(() => false);
|
|
150
150
|
if (!isLegacyDialog) {
|
|
151
|
-
await
|
|
151
|
+
const offered = await this.dialog
|
|
152
|
+
.getByText(clusterName, { exact: false })
|
|
153
|
+
.first()
|
|
154
|
+
.waitFor({ state: 'visible', timeout: 30000 })
|
|
155
|
+
.then(() => true)
|
|
156
|
+
.catch(() => false);
|
|
157
|
+
if (!offered) {
|
|
158
|
+
// Forget the binding before failing. The dialog lists exactly the
|
|
159
|
+
// clusters this application's stages point at, so a missing cluster
|
|
160
|
+
// means the binding did not take -- and no amount of reopening the
|
|
161
|
+
// dialog will make it appear. Clearing the record lets the caller's
|
|
162
|
+
// next attempt rebind instead of re-checking an unchanged dialog.
|
|
163
|
+
this.processApplicationPage.forgetStageCluster();
|
|
164
|
+
throw new Error(`The deploy dialog does not offer "${clusterName}": its stage ` +
|
|
165
|
+
'binding did not take. It will be rebound on the next attempt.');
|
|
166
|
+
}
|
|
152
167
|
return;
|
|
153
168
|
}
|
|
154
169
|
const healthyRegex = new RegExp(`${clusterName}[\\s\\S]*?HealthydevManage`);
|
|
@@ -200,7 +215,25 @@ class FormJsPage {
|
|
|
200
215
|
await (0, test_1.expect)(this.dialog).toBeVisible({
|
|
201
216
|
timeout: 30000,
|
|
202
217
|
});
|
|
203
|
-
|
|
218
|
+
// selectCluster clears the stage binding when the dialog does not offer the
|
|
219
|
+
// cluster, so ensureStageCluster rebinds here and reports that it
|
|
220
|
+
// navigated. Any other failure leaves the binding in place, it returns
|
|
221
|
+
// false, and the original error stands. This path has no surrounding retry
|
|
222
|
+
// loop, hence the one explicit second attempt.
|
|
223
|
+
try {
|
|
224
|
+
await this.selectCluster(clusterName);
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
const rebound = await this.processApplicationPage.ensureStageCluster(clusterName);
|
|
228
|
+
if (!rebound) {
|
|
229
|
+
throw error;
|
|
230
|
+
}
|
|
231
|
+
await this.clickDeployButton();
|
|
232
|
+
await (0, test_1.expect)(this.dialog).toBeVisible({
|
|
233
|
+
timeout: 30000,
|
|
234
|
+
});
|
|
235
|
+
await this.selectCluster(clusterName);
|
|
236
|
+
}
|
|
204
237
|
await this.selectOnlyThisResource();
|
|
205
238
|
await this.clickDeploySubButton();
|
|
206
239
|
await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
|
|
@@ -22,6 +22,7 @@ declare class ProcessApplicationPage {
|
|
|
22
22
|
nameNewProcessApplication(name: string): Promise<void>;
|
|
23
23
|
defineDevelopmentStage(clusterName?: string): Promise<void>;
|
|
24
24
|
rememberResourceContainer(url: string): void;
|
|
25
|
+
forgetStageCluster(): void;
|
|
25
26
|
ensureStageCluster(clusterName: string): Promise<boolean>;
|
|
26
27
|
private openStageDefinition;
|
|
27
28
|
openByName(name: string): Promise<void>;
|
|
@@ -196,6 +196,18 @@ class ProcessApplicationPage {
|
|
|
196
196
|
rememberResourceContainer(url) {
|
|
197
197
|
resourceContainers.set(this.page, { url });
|
|
198
198
|
}
|
|
199
|
+
// Drops the recorded development-stage binding so the next ensureStageCluster
|
|
200
|
+
// call binds again. Called when the deploy dialog turns out not to offer the
|
|
201
|
+
// cluster we believe we bound: the dialog offers exactly what the
|
|
202
|
+
// application's stages point at, so if the cluster is missing the binding
|
|
203
|
+
// did not take, and reopening the dialog can never change that. Without
|
|
204
|
+
// this, a caller's retries all re-check a state nothing is changing.
|
|
205
|
+
forgetStageCluster() {
|
|
206
|
+
const container = resourceContainers.get(this.page);
|
|
207
|
+
if (container) {
|
|
208
|
+
container.developmentCluster = undefined;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
199
211
|
// A process application deploys to the clusters bound to its stages, and
|
|
200
212
|
// nothing else: inside a container DeployModal renders
|
|
201
213
|
// ProcessAppClusterSelection, which lists only those and auto-selects the
|