@camunda/e2e-test-suite 0.0.1113 → 0.0.1114
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.
|
@@ -56,7 +56,15 @@ class OptimizeSharePage {
|
|
|
56
56
|
// always-present Share control) renders from scratch. Use waitFor (which
|
|
57
57
|
// actually polls) rather than isVisible (a one-shot check), reloading only
|
|
58
58
|
// when the Share control still hasn't rendered.
|
|
59
|
-
|
|
59
|
+
//
|
|
60
|
+
// A reload is also the recovery path for a second, distinct failure mode:
|
|
61
|
+
// the entity was created moments earlier via the API (in a describe's
|
|
62
|
+
// beforeAll) and Optimize's evaluate endpoint hasn't caught up yet, which
|
|
63
|
+
// renders the "This link is not valid" ErrorPage instead of a loading
|
|
64
|
+
// state -- there is no spinner to wait out, only a fresh navigation
|
|
65
|
+
// re-queries the entity. 5 attempts give that eventual-consistency window
|
|
66
|
+
// more room than 3 did.
|
|
67
|
+
for (let attempt = 0; attempt < 5; attempt++) {
|
|
60
68
|
const shareVisible = await this.shareButton
|
|
61
69
|
.waitFor({ state: 'visible', timeout: 10000 })
|
|
62
70
|
.then(() => true)
|
|
@@ -87,12 +87,14 @@ _8_10_1.test.describe('API Optimize Collections Lifecycle Tests @optimize-collec
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
await _8_10_1.test.step('GET /api/collection/{id} exposes the added scope entry', async () => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
await (0, apiHelpers_1.retryOnTransientApiError)(async () => {
|
|
91
|
+
const response = await request.get(`${baseUrl}/api/collection/${collectionId}`, { headers: { Cookie: optimizeCookie } });
|
|
92
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
93
|
+
const body = await response.json();
|
|
94
|
+
const scope = body?.data?.scope;
|
|
95
|
+
(0, test_1.expect)(Array.isArray(scope)).toBeTruthy();
|
|
96
|
+
(0, test_1.expect)(scope.some((entry) => entry.definitionKey === definitionKey)).toBeTruthy();
|
|
97
|
+
}, 'GET /api/collection/{id} exposes the added scope entry');
|
|
96
98
|
});
|
|
97
99
|
await request.delete(`${baseUrl}/api/public/collection/${collectionId}`, {
|
|
98
100
|
headers: { Authorization: optimizeBearerToken },
|
|
@@ -140,11 +140,13 @@ _8_10_1.test.describe('Optimize Sharing & Export UI Tests @optimize-sharing-aler
|
|
|
140
140
|
});
|
|
141
141
|
(0, _8_10_1.test)('Enable report sharing and expose a public share link', async ({ appsPage, optimizeHomePage, optimizeSharePage, }) => {
|
|
142
142
|
await _8_10_1.test.step('Open Optimize from the Camunda apps launcher', async () => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
// The apps-menu hand-off starts an OIDC round trip, and when
|
|
144
|
+
// Optimize's /sso-callback answers 401 the tab is left on a blank
|
|
145
|
+
// page that never renders the banner. Polling the banner cannot
|
|
146
|
+
// recover that — only re-entering through the apps menu restarts
|
|
147
|
+
// the hand-off — so use the retrying opener instead (see
|
|
148
|
+
// AppsPage.openOptimizeWithRetry and the CSV export test below).
|
|
149
|
+
await appsPage.openOptimizeWithRetry(optimizeHomePage.optimizeBanner, clusterName);
|
|
148
150
|
});
|
|
149
151
|
await _8_10_1.test.step('Navigate to the seeded report', async () => {
|
|
150
152
|
await optimizeSharePage.openEntityById(baseUrl, 'report', reportId);
|