@camunda/e2e-test-suite 0.0.1330 → 0.0.1332

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormJsPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const modelerCluster_1 = require("../../utils/modelerCluster");
6
+ const hubDeployDialog_1 = require("../../utils/hubDeployDialog");
6
7
  class FormJsPage {
7
8
  page;
8
9
  aiFormGeneratorButton;
@@ -86,34 +87,15 @@ class FormJsPage {
86
87
  await this.deployModalSubmitButton.click({ timeout: 60000 });
87
88
  }
88
89
  // Since camunda/camunda-hub#25831 a form lives inside a process application,
89
- // and Hub then scopes Deploy to the WHOLE application by default -- it calls
90
+ // and Hub scopes Deploy to that application unless the scope is narrowed --
90
91
  // deployProcessApplication, not deployFile, so the "Form deployed!" toast
91
- // never fires (hub's own form-deploy-action.spec.sm.tsx asserts exactly that
92
- // default). Narrowing the scope keeps this a form-deploy test instead of
93
- // silently turning it into a process-application deploy. The combobox only
94
- // exists inside a container, hence the boolean probe.
92
+ // never fires. Narrowing the scope keeps this a form-deploy test instead of
93
+ // silently turning it into a process-application deploy. Since
94
+ // camunda/camunda-hub#29791 Hub preselects "Only this resource" when
95
+ // deploying from a file, so the shared helper's already-selected guard is
96
+ // what keeps this from reopening the preselected scope select and failing.
95
97
  async selectOnlyThisResource() {
96
- const scopeSelect = this.deployDialog.getByRole('combobox', {
97
- name: 'Resources to deploy',
98
- });
99
- const hasScopeSelect = await scopeSelect
100
- .waitFor({ state: 'visible', timeout: 10000 })
101
- .then(() => true)
102
- .catch(() => false);
103
- if (!hasScopeSelect) {
104
- return;
105
- }
106
- await scopeSelect.click();
107
- // The scope select is a Radix UI Select: its listbox is portalled to
108
- // document.body, OUTSIDE the dialog element, so a dialog-scoped option
109
- // query never resolves even while the option is visible on screen. Query
110
- // the portalled option at page scope instead; the trigger above stays
111
- // dialog-scoped because it renders inside the dialog.
112
- await this.page
113
- .getByRole('option', { name: 'Only this resource' })
114
- .or(this.page.getByText('Only this resource', { exact: true }))
115
- .first()
116
- .click({ timeout: 30000 });
98
+ await (0, hubDeployDialog_1.selectOnlyThisResourceInDialog)(this.page, this.deployDialog);
117
99
  }
118
100
  async deployForm() {
119
101
  await this.clickDeployFormButton();
@@ -506,9 +506,10 @@ class ModelerCreatePage {
506
506
  }
507
507
  const [executeResponse] = await Promise.all([
508
508
  this.page.waitForResponse((response) => response.request().method() === 'POST' &&
509
- // Workspace-era Hub builds execute via /v2/projects/{id}; older
510
- // builds used /process-applications/{id}.
511
- /\/(process-applications|projects)\/[^/]+\/execute$/.test(new URL(response.url()).pathname), { timeout: 30000 }),
509
+ // Hub's deploy & run posts to /v2/files/{id}/execute; older
510
+ // workspace builds used /v2/projects/{id} and
511
+ // /process-applications/{id}.
512
+ /\/(process-applications|projects|files)\/[^/]+\/execute$/.test(new URL(response.url()).pathname), { timeout: 30000 }),
512
513
  this.clickDeployAndRunSubButton(),
513
514
  ]);
514
515
  (0, test_1.expect)(executeResponse.ok(), await executeResponse.text()).toBeTruthy();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1330",
3
+ "version": "0.0.1332",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",