@camunda/e2e-test-suite 0.0.1001 → 0.0.1002
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.
|
@@ -36,6 +36,7 @@ declare class ModelerCreatePage {
|
|
|
36
36
|
readonly firstPlacedElement: Locator;
|
|
37
37
|
readonly secondPlacedElement: Locator;
|
|
38
38
|
readonly appendElementButton: Locator;
|
|
39
|
+
readonly appendIndicator: Locator;
|
|
39
40
|
readonly payloadInput: Locator;
|
|
40
41
|
readonly marketPlaceButton: Locator;
|
|
41
42
|
readonly publicHolidayConnectorOption: Locator;
|
|
@@ -164,6 +165,18 @@ declare class ModelerCreatePage {
|
|
|
164
165
|
clickFirstPlacedElement(): Promise<void>;
|
|
165
166
|
clickSecondPlacedElement(): Promise<void>;
|
|
166
167
|
clickSecondElement(): Promise<void>;
|
|
168
|
+
/**
|
|
169
|
+
* Hovers the append ("+") pad of the current selection, opening it first
|
|
170
|
+
* when it is not already on screen.
|
|
171
|
+
*
|
|
172
|
+
* Since camunda/improved-canvas commit 3e2aa7a ("show append indicator
|
|
173
|
+
* instead of full pad when selection has outgoing flow") the full append pad
|
|
174
|
+
* only auto-opens for elements without an outgoing sequence flow. A selected
|
|
175
|
+
* element that already has one now shows a `.djs-append-indicator` "+"
|
|
176
|
+
* whose `mouseenter` opens the pad — see
|
|
177
|
+
* `lib/bpmn/appendIndicator/AppendIndicator.js` in that repo.
|
|
178
|
+
*/
|
|
179
|
+
private hoverAppendPad;
|
|
167
180
|
clickAppendElementButton(): Promise<void>;
|
|
168
181
|
clickMarketPlaceButton(): Promise<void>;
|
|
169
182
|
clickPublicHolidayConnectorOption(): Promise<void>;
|
|
@@ -41,6 +41,7 @@ class ModelerCreatePage {
|
|
|
41
41
|
firstPlacedElement;
|
|
42
42
|
secondPlacedElement;
|
|
43
43
|
appendElementButton;
|
|
44
|
+
appendIndicator;
|
|
44
45
|
payloadInput;
|
|
45
46
|
marketPlaceButton;
|
|
46
47
|
publicHolidayConnectorOption;
|
|
@@ -114,6 +115,12 @@ class ModelerCreatePage {
|
|
|
114
115
|
this.appendElementButton = page
|
|
115
116
|
.locator('[class="djs-create-pad open djs-append-create-pad"]')
|
|
116
117
|
.first();
|
|
118
|
+
// Web Modeler renders a "+" indicator next to every appendable element and
|
|
119
|
+
// marks the selected element's one as `selected`; hovering it opens the
|
|
120
|
+
// append pad.
|
|
121
|
+
this.appendIndicator = page
|
|
122
|
+
.locator('.djs-append-indicator.selected:visible')
|
|
123
|
+
.first();
|
|
117
124
|
this.appendTaskButton = page.getByRole('button', { name: 'Append task' });
|
|
118
125
|
this.changeTypeButton = page.getByRole('button', {
|
|
119
126
|
name: 'Change element',
|
|
@@ -449,7 +456,7 @@ class ModelerCreatePage {
|
|
|
449
456
|
else if (parentElement == 'parallelGateway') {
|
|
450
457
|
await this.clickSecondPlacedGateway();
|
|
451
458
|
}
|
|
452
|
-
await this.
|
|
459
|
+
await this.hoverAppendPad(60000);
|
|
453
460
|
await this.appendEndEventButton.click({ timeout: 120000 });
|
|
454
461
|
}
|
|
455
462
|
}
|
|
@@ -736,16 +743,31 @@ class ModelerCreatePage {
|
|
|
736
743
|
async clickSecondElement() {
|
|
737
744
|
await this.secondElement.click({ timeout: 60000 });
|
|
738
745
|
}
|
|
746
|
+
/**
|
|
747
|
+
* Hovers the append ("+") pad of the current selection, opening it first
|
|
748
|
+
* when it is not already on screen.
|
|
749
|
+
*
|
|
750
|
+
* Since camunda/improved-canvas commit 3e2aa7a ("show append indicator
|
|
751
|
+
* instead of full pad when selection has outgoing flow") the full append pad
|
|
752
|
+
* only auto-opens for elements without an outgoing sequence flow. A selected
|
|
753
|
+
* element that already has one now shows a `.djs-append-indicator` "+"
|
|
754
|
+
* whose `mouseenter` opens the pad — see
|
|
755
|
+
* `lib/bpmn/appendIndicator/AppendIndicator.js` in that repo.
|
|
756
|
+
*/
|
|
757
|
+
async hoverAppendPad(timeout) {
|
|
758
|
+
if (!(await this.appendElementButton.isVisible())) {
|
|
759
|
+
await this.appendIndicator.hover({ timeout });
|
|
760
|
+
}
|
|
761
|
+
await this.appendElementButton.hover({ timeout, force: true });
|
|
762
|
+
}
|
|
739
763
|
async clickAppendElementButton() {
|
|
740
764
|
try {
|
|
741
|
-
|
|
742
|
-
await
|
|
743
|
-
await this.appendElementButton.hover({ timeout: 60000, force: true });
|
|
765
|
+
await (0, sleep_1.sleep)(10000);
|
|
766
|
+
await this.hoverAppendPad(60000);
|
|
744
767
|
}
|
|
745
768
|
catch (error) {
|
|
746
|
-
|
|
747
|
-
await
|
|
748
|
-
await this.appendElementButton.hover({ timeout: 90000, force: true });
|
|
769
|
+
await (0, sleep_1.sleep)(10000);
|
|
770
|
+
await this.hoverAppendPad(90000);
|
|
749
771
|
}
|
|
750
772
|
}
|
|
751
773
|
async clickMarketPlaceButton() {
|
|
@@ -972,7 +994,7 @@ class ModelerCreatePage {
|
|
|
972
994
|
await this.page.reload();
|
|
973
995
|
await (0, sleep_1.sleep)(10000);
|
|
974
996
|
await this.clickFirstPlacedElement();
|
|
975
|
-
await this.
|
|
997
|
+
await this.hoverAppendPad(60000);
|
|
976
998
|
}
|
|
977
999
|
await this.clickAppendGatewayButton();
|
|
978
1000
|
await this.clickChangeTypeButton();
|