@camunda/e2e-test-suite 0.0.971 → 0.0.972
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.
|
@@ -25,6 +25,9 @@ declare class ModelerCreatePage {
|
|
|
25
25
|
readonly additionalActionsButton: Locator;
|
|
26
26
|
readonly cancelButton: Locator;
|
|
27
27
|
readonly restConnectorOption: Locator;
|
|
28
|
+
readonly changeElementSearchInput: Locator;
|
|
29
|
+
readonly changeElementTabStrip: Locator;
|
|
30
|
+
readonly reusableAssetsTab: Locator;
|
|
28
31
|
readonly webhookMessageStartEventConnectorOption: Locator;
|
|
29
32
|
readonly webhookTab: Locator;
|
|
30
33
|
readonly webhookIsActiveButton: Locator;
|
|
@@ -156,6 +159,8 @@ declare class ModelerCreatePage {
|
|
|
156
159
|
clickNewForm(): Promise<void>;
|
|
157
160
|
clickDeploySubButton(): Promise<void>;
|
|
158
161
|
clickCancelButton(): Promise<void>;
|
|
162
|
+
private waitForVisible;
|
|
163
|
+
revealChangeElementTemplate(option: Locator, searchTerm: string): Promise<void>;
|
|
159
164
|
clickRestConnectorOption(): Promise<void>;
|
|
160
165
|
clickWebhookStartEventConnectorOption(): Promise<void>;
|
|
161
166
|
clickWebhookTab(): Promise<void>;
|
|
@@ -31,6 +31,9 @@ class ModelerCreatePage {
|
|
|
31
31
|
additionalActionsButton;
|
|
32
32
|
cancelButton;
|
|
33
33
|
restConnectorOption;
|
|
34
|
+
changeElementSearchInput;
|
|
35
|
+
changeElementTabStrip;
|
|
36
|
+
reusableAssetsTab;
|
|
34
37
|
webhookMessageStartEventConnectorOption;
|
|
35
38
|
webhookTab;
|
|
36
39
|
webhookIsActiveButton;
|
|
@@ -170,6 +173,17 @@ class ModelerCreatePage {
|
|
|
170
173
|
this.deploySubButton = page.locator('[data-test="deploy-action"]');
|
|
171
174
|
this.cancelButton = page.getByRole('button', { name: 'Cancel' });
|
|
172
175
|
this.restConnectorOption = page.locator('[data-id="replace.template-io.camunda.connectors.HttpJson.v2"]');
|
|
176
|
+
this.changeElementSearchInput = page.locator('.djs-popup-search input');
|
|
177
|
+
this.changeElementTabStrip = page.locator('.djs-popup-tabs-container');
|
|
178
|
+
// The tab renders its label as text content, which wins over its `title`
|
|
179
|
+
// attribute in the accessible-name computation. Match case-insensitively:
|
|
180
|
+
// the label is capitalised differently across bpmn-js releases. Scope the
|
|
181
|
+
// lookup to the popup's own tab strip -- the properties panel renders its
|
|
182
|
+
// own tablist (see webhookTab below), so an unscoped tab query is
|
|
183
|
+
// ambiguous.
|
|
184
|
+
this.reusableAssetsTab = this.changeElementTabStrip.getByRole('tab', {
|
|
185
|
+
name: /reusable assets/i,
|
|
186
|
+
});
|
|
173
187
|
// bpmn-js popup entries are `li[role="option"]` inside a `role="listbox"`,
|
|
174
188
|
// so getByRole('listitem') no longer matches. Their accessible name also
|
|
175
189
|
// includes the entry description, and three entries share the label
|
|
@@ -734,11 +748,53 @@ class ModelerCreatePage {
|
|
|
734
748
|
async clickCancelButton() {
|
|
735
749
|
await this.cancelButton.click({ timeout: 60000 });
|
|
736
750
|
}
|
|
751
|
+
// `waitFor` actually blocks up to the timeout; `isVisible()` would return
|
|
752
|
+
// immediately and report false while the popup is still rendering.
|
|
753
|
+
async waitForVisible(locator, timeout) {
|
|
754
|
+
return locator
|
|
755
|
+
.first()
|
|
756
|
+
.waitFor({ state: 'visible', timeout })
|
|
757
|
+
.then(() => true)
|
|
758
|
+
.catch(() => false);
|
|
759
|
+
}
|
|
760
|
+
// The change-element popup is now tabbed: every `replace.template-*` entry
|
|
761
|
+
// is assigned to the "Reusable Assets" tab, so connector templates are not
|
|
762
|
+
// in the DOM at all while the default "BPMN" tab is selected - which is why
|
|
763
|
+
// the template locators time out with `<element(s) not found>`.
|
|
764
|
+
// Opening that tab is version-tolerant: on an untabbed popup the strip is
|
|
765
|
+
// absent and this is a no-op.
|
|
766
|
+
// Search is the fallback, because it spans the full entry set across every
|
|
767
|
+
// tab. It must be typed with `pressSequentially`: the popup's search input
|
|
768
|
+
// is uncontrolled and its state is written by a `keyup` handler only, so
|
|
769
|
+
// `fill()` (which dispatches `input` alone) never applies the filter.
|
|
770
|
+
async revealChangeElementTemplate(option, searchTerm) {
|
|
771
|
+
if (await this.waitForVisible(option, 5000)) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
if (await this.waitForVisible(this.changeElementTabStrip, 5000)) {
|
|
775
|
+
// Do not throw: a failed tab click leaves the search fallback below
|
|
776
|
+
// intact, and search alone is enough on an untabbed popup.
|
|
777
|
+
await this.reusableAssetsTab.click({ timeout: 30000 }).catch(() => { });
|
|
778
|
+
if (await this.waitForVisible(option, 15000)) {
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
if (!(await this.waitForVisible(this.changeElementSearchInput, 5000))) {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
await this.changeElementSearchInput.click();
|
|
786
|
+
await this.changeElementSearchInput.fill('');
|
|
787
|
+
await this.changeElementSearchInput.pressSequentially(searchTerm, {
|
|
788
|
+
delay: 50,
|
|
789
|
+
});
|
|
790
|
+
}
|
|
737
791
|
async clickRestConnectorOption() {
|
|
738
|
-
await
|
|
792
|
+
await this.revealChangeElementTemplate(this.restConnectorOption, 'REST');
|
|
793
|
+
await (0, test_1.expect)(this.restConnectorOption).toBeVisible({ timeout: 90000 });
|
|
739
794
|
await this.restConnectorOption.click();
|
|
740
795
|
}
|
|
741
796
|
async clickWebhookStartEventConnectorOption() {
|
|
797
|
+
await this.revealChangeElementTemplate(this.webhookMessageStartEventConnectorOption, 'Webhook');
|
|
742
798
|
await this.webhookMessageStartEventConnectorOption.click({ timeout: 60000 });
|
|
743
799
|
}
|
|
744
800
|
async clickWebhookTab() {
|
|
@@ -991,6 +1047,7 @@ class ModelerCreatePage {
|
|
|
991
1047
|
await this.intermediateBoundaryEvent.click({ timeout: 60000 });
|
|
992
1048
|
}
|
|
993
1049
|
async clickIntermediateWebhookConnectorOption() {
|
|
1050
|
+
await this.revealChangeElementTemplate(this.intermediateWebhookConnectorOption, 'Webhook');
|
|
994
1051
|
await this.intermediateWebhookConnectorOption.click({ timeout: 60000 });
|
|
995
1052
|
}
|
|
996
1053
|
async clickCorrelationKeyProcessInput() {
|
|
@@ -132,6 +132,9 @@ _8_10_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
132
132
|
await modelerCreatePage.enterDiagramName(processName);
|
|
133
133
|
await (0, sleep_1.sleep)(10000);
|
|
134
134
|
await modelerCreatePage.clickChangeTypeButton();
|
|
135
|
+
// Connector templates now sit behind the change-element popup's
|
|
136
|
+
// "Reusable Assets" tab, so surface the entry before asserting on it.
|
|
137
|
+
await modelerCreatePage.revealChangeElementTemplate(modelerCreatePage.webhookMessageStartEventConnectorOption, 'Webhook');
|
|
135
138
|
await (0, test_1.expect)(modelerCreatePage.webhookMessageStartEventConnectorOption).toBeVisible({
|
|
136
139
|
timeout: 30000,
|
|
137
140
|
});
|