@camunda/e2e-test-suite 0.0.1431 → 0.0.1433

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.
@@ -43,10 +43,8 @@ _8_11_1.test.describe('User Roles User Flow', () => {
43
43
  });
44
44
  // Workspace membership is durable organization state, so the Editor rights
45
45
  // the Analyst flow grants must be handed back whether the test passed or
46
- // failed. Left behind, a retry would start with the analyst already an
47
- // Editor and its own "not reachable without workspace access" assertion
48
- // would fail on the second attempt; the grant would also leak into every
49
- // later nightly run against the same org.
46
+ // failed. Left behind, the grant would leak into every later nightly run
47
+ // against the same org.
50
48
  _8_11_1.test.afterEach(async ({ page, loginPage }, testInfo) => {
51
49
  if (!testInfo.title.startsWith('Analyst Role User Flow')) {
52
50
  return;
@@ -170,7 +168,8 @@ _8_11_1.test.describe('User Roles User Flow', () => {
170
168
  const clusterName = clusterNames['Analyst Role User Flow'];
171
169
  // A retry runs in a fresh worker, where analystWorkspaceGrantMade starts
172
170
  // false even when the previous attempt's teardown failed to hand the
173
- // grant back. The "not reachable" step below would then always fail.
171
+ // grant back. Remove a leftover grant so the membership does not leak
172
+ // into later runs against the same org.
174
173
  if (_8_11_1.test.info().retry > 0) {
175
174
  await _8_11_1.test.step('Hand back a workspace grant left by the previous attempt', async () => {
176
175
  await appsPage.clickModeler();
@@ -200,51 +199,23 @@ _8_11_1.test.describe('User Roles User Flow', () => {
200
199
  password: process.env.C8_PASSWORD_TEST_9,
201
200
  });
202
201
  });
203
- // An organization role no longer decides on its own what a non-admin can
204
- // reach. Since camunda-hub's environments work (pdp-3443, pdp-3715), a
205
- // cluster's apps are surfaced through an ENVIRONMENT, and an environment
206
- // is visible only to users who are Editor or Workspace Admin on a
207
- // workspace it is assigned to -- organization admins and owners excepted,
208
- // who see every environment unconditionally. An Analyst with no workspace
209
- // membership therefore reaches nothing, which is the decided design
210
- // rather than a defect: "Clusters are shown only to org admins.
211
- // Non-admins do not have cluster visibility (they operate with
212
- // environments instead)."
213
- //
214
- // Assert that gate before granting the membership the rest of this test
215
- // depends on, so both halves are covered: the role alone grants no
216
- // access, and the role plus workspace editorship does.
217
- await _8_11_1.test.step('Ensure Optimize is not reachable without workspace access', async () => {
218
- // Assert the cause, not just the consequence. Hub shows the analyst an
219
- // empty Workspaces overview -- "You don't have explicit membership in
220
- // any workspace in this organization" before the scope is widened, and
221
- // "Your organization has no workspaces yet" after -- because the
222
- // workspace belongs to whoever created it. With no workspace there is
223
- // no environment, and with no environment no cluster app, so checking
224
- // the Optimize banner alone would pass for unrelated reasons too.
202
+ // Every SaaS organization member sees every environment in the
203
+ // organization, whether or not they belong to a workspace. Hub decided
204
+ // this in camunda-hub#30270 and shipped it in camunda-hub#30271; the bug
205
+ // that challenged it, camunda-hub#30300, was closed as works-as-intended.
206
+ // Assert it, so a revert to the stricter "assigned only" rule is caught.
207
+ // What the analyst may do inside each app stays gated by the cluster's
208
+ // authorizations, which the steps below assert.
209
+ await _8_11_1.test.step('Ensure the cluster is listed without workspace access', async () => {
225
210
  await appsPage.clickCamundaApps();
226
211
  await (0, test_1.expect)(page
227
212
  .getByText('Your organization has no workspaces yet')
228
213
  .or(page.getByText("You don't have explicit membership in any workspace"))
229
214
  .first()).toBeVisible({ timeout: 60000 });
230
- // Assert the absence of THIS cluster's Optimize target directly rather
231
- // than calling clickOptimize() and swallowing whatever it throws: a
232
- // swallowed error would let this step pass because the hand-off helper
233
- // itself broke and the page simply stayed on Hub, where the Optimize
234
- // banner is absent for reasons that have nothing to do with the gate.
235
- // On Hub a cluster's apps hang off the sidebar group named for the
236
- // cluster, so with no environment neither the group nor the Optimize
237
- // link inside it is ever rendered.
238
215
  const hubSidebar = page.getByRole('navigation', {
239
216
  name: 'Main navigation',
240
217
  });
241
- // The negative counts below mean nothing before the shell has rendered.
242
- await (0, test_1.expect)(hubSidebar).toBeVisible({ timeout: 30000 });
243
- await (0, test_1.expect)(hubSidebar.getByRole('button', { name: clusterName })).toHaveCount(0, { timeout: 30000 });
244
- await (0, test_1.expect)(hubSidebar.getByRole('link', { name: /Optimize/ })).toHaveCount(0, { timeout: 30000 });
245
- await (0, test_1.expect)(optimizeHomePage.optimizeBanner).not.toBeVisible({
246
- timeout: 30000,
247
- });
218
+ await (0, test_1.expect)(hubSidebar.getByRole('button', { name: clusterName })).toBeVisible({ timeout: 30000 });
248
219
  });
249
220
  await _8_11_1.test.step('Grant the analyst Editor rights on the shared workspace', async () => {
250
221
  // Only an organization admin may change workspace membership, so this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1431",
3
+ "version": "0.0.1433",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",