@digital-ai/devops-page-object-release 0.0.28 → 0.0.30

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.
package/dist/module.js CHANGED
@@ -62,7 +62,7 @@ class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$ex
62
62
  await (0, $hOLA6$expect)(this.page.locator(".variable-editor .form-group")).toHaveCount(count);
63
63
  }
64
64
  async expectContainingVariable(variableName, value) {
65
- (0, $hOLA6$expect)(await this.page.locator(`#form-${variableName} .text span`).textContent()).toBe(value);
65
+ await (0, $hOLA6$expect)(this.page.locator(`#form-${variableName} .text span`)).toContainText(value);
66
66
  }
67
67
  async selectTemplate(templateName) {
68
68
  await this.page.getByPlaceholder("No template").click();
@@ -76,6 +76,7 @@ class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$ex
76
76
  async setValueForVariables(variableName, value) {
77
77
  await this.page.locator(`#form-${variableName} .display`).click();
78
78
  await this.page.locator(`input[name="${variableName}"]`).fill(value);
79
+ await this.page.locator(`input[name="${variableName}"]`).blur();
79
80
  }
80
81
  async setVariable(variable, value) {
81
82
  await this.releaseForm.filter({
@@ -84,6 +85,34 @@ class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$ex
84
85
  await this.releaseForm.filter({
85
86
  hasText: variable
86
87
  }).locator("div[inline-text-editor] input").fill(value);
88
+ await this.releaseForm.filter({
89
+ hasText: variable
90
+ }).locator("div[inline-text-editor] input").blur();
91
+ }
92
+ async resetVariableValues() {
93
+ await this.page.locator("button", {
94
+ hasText: "Reset to defaults"
95
+ }).click();
96
+ await this.page.locator("button", {
97
+ hasText: "Reset variables"
98
+ }).click();
99
+ await (0, $hOLA6$expect)(this.page.locator("button", {
100
+ hasText: "Reset to defaults"
101
+ })).toBeDisabled();
102
+ }
103
+ async clickOnPrefillVariables() {
104
+ await this.page.getByText("Pre-fill variable values from previous releases").click();
105
+ }
106
+ async selectPreviousRelease(releaseName) {
107
+ await this.page.locator("button", {
108
+ hasText: "Select release"
109
+ }).click();
110
+ await this.page.locator("a", {
111
+ hasText: releaseName
112
+ }).click();
113
+ }
114
+ async expectPrefillWarning(message) {
115
+ await (0, $hOLA6$expect)(this.page.getByText(message)).toBeVisible();
87
116
  }
88
117
  }
89
118
 
@@ -98,7 +127,39 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
98
127
  if (amount === 1) await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
99
128
  timeout: 5000
100
129
  });
101
- else await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
130
+ else (0, $hOLA6$expect)(await this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
131
+ }
132
+ async expectReleaseStarted(releaseTitle) {
133
+ const releaseStatus = this.page.locator(".release").filter({
134
+ hasText: releaseTitle
135
+ }).locator(".release-status").filter({
136
+ hasText: "Planned"
137
+ });
138
+ await (0, $hOLA6$expect)(releaseStatus).toBeVisible();
139
+ }
140
+ async expectReleaseStatusInProgress(releaseTitle) {
141
+ const releaseStatus = this.page.locator(".release").filter({
142
+ hasText: releaseTitle
143
+ }).locator(".release-status").filter({
144
+ hasText: "In progress"
145
+ });
146
+ await (0, $hOLA6$expect)(releaseStatus).toBeVisible();
147
+ }
148
+ async expectReleaseAborted(releaseTitle) {
149
+ const releaseStatus = this.page.locator(".release").filter({
150
+ hasText: releaseTitle
151
+ }).locator(".release-status").filter({
152
+ hasText: "Aborted"
153
+ });
154
+ await (0, $hOLA6$expect)(releaseStatus).toBeVisible();
155
+ }
156
+ async expectReleaseFailed(releaseTitle) {
157
+ const releaseStatus = this.page.locator(".release").filter({
158
+ hasText: releaseTitle
159
+ }).locator(".release-status").filter({
160
+ hasText: "Failed"
161
+ });
162
+ await (0, $hOLA6$expect)(releaseStatus).toBeVisible();
102
163
  }
103
164
  async filterReleaseByAllStatus() {
104
165
  await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
@@ -110,11 +171,34 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
110
171
  }).click();
111
172
  return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
112
173
  }
113
- async filterReleaseByTitle(releaseTitle) {
174
+ async openSearchFilter() {
114
175
  await this.page.locator(".toggle-search-filter").click();
115
- await this.page.locator(".searchFilter").fill(releaseTitle);
116
- await this.page.locator(".searchFilter").press("Enter");
117
- await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
176
+ }
177
+ async filterReleaseByTitle(releaseTitle) {
178
+ const searchTitle = this.page.locator(".searchFilter");
179
+ const searchCount = await searchTitle.count();
180
+ if (searchCount == 0) {
181
+ await this.openSearchFilter();
182
+ await searchTitle.fill(releaseTitle);
183
+ await searchTitle.press("Enter");
184
+ await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
185
+ } else {
186
+ await searchTitle.press("Enter");
187
+ await searchTitle.fill(releaseTitle);
188
+ await searchTitle.press("Enter");
189
+ await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
190
+ }
191
+ }
192
+ async clearTitleFilter() {
193
+ const search = await this.page.locator(".searchFilter").count();
194
+ if (search == 0) {
195
+ await this.openSearchFilter();
196
+ await this.page.locator(".searchFilter").clear();
197
+ await this.page.locator(".searchFilter").press("Enter");
198
+ } else {
199
+ await this.page.locator(".searchFilter").clear();
200
+ await this.page.locator(".searchFilter").press("Enter");
201
+ }
118
202
  }
119
203
  async createNewRelease(releaseName, description) {
120
204
  await this.releaseCreatePage.setName(releaseName);
@@ -751,6 +835,12 @@ class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$ex
751
835
  await this.saveButton.dblclick();
752
836
  await this.page.waitForTimeout(1000);
753
837
  }
838
+ async expectPreconditionEditable() {
839
+ await this.textEditor.isVisible();
840
+ }
841
+ async expectPreconditionNotEditable() {
842
+ await this.textEditor.isHidden();
843
+ }
754
844
  }
755
845
 
756
846
 
@@ -847,7 +937,7 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
847
937
  return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
848
938
  }
849
939
  async setValueFromString(propertyName, value) {
850
- await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
940
+ await this.railLocator.locator(`input[name=${propertyName}]`).focus();
851
941
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
852
942
  }
853
943
  async setValueFromLargeString(propertyName, value) {
@@ -857,37 +947,76 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
857
947
  async setValueFromPassword(propertyName, value) {
858
948
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
859
949
  }
860
- async setAndCreateVariable(propertyName, variableName) {
861
- await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
862
- await this.railLocator.locator(`input[id="${propertyName}"]`).click();
863
- await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
950
+ async selectVariableFromOption(objectID, variable) {
951
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
952
+ await this.page.locator(`#${objectID}`).fill(variable);
953
+ await this.page.getByRole("option", {
954
+ name: variable
955
+ }).click();
956
+ }
957
+ async createNewVariableForField(objectID, variable) {
958
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
959
+ await this.page.locator(`#${objectID}`).fill(variable);
864
960
  await this.railLocator.locator(`.dot-popper button`, {
865
- hasText: variableName
961
+ hasText: variable
866
962
  }).click();
867
963
  }
868
- async setVariable(propertyName, variableName) {
869
- await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
964
+ async createReleaseIdInOutputProperties(propertyName, variableName) {
965
+ await this.railLocator.locator(`#${propertyName}`).fill(variableName);
966
+ await this.page.getByTestId("dot-action-item-btn").click();
967
+ }
968
+ async expectValueInOutputProperties(variableId, value, expected = true) {
969
+ if (expected) {
970
+ await (0, $hOLA6$expect)(this.railLocator.locator(`#${variableId}`)).toBeVisible();
971
+ await (0, $hOLA6$expect)(this.railLocator.locator(`#${variableId}`)).toHaveValue(value);
972
+ } else await (0, $hOLA6$expect)(this.railLocator.locator(`#${variableId}`)).not.toBeVisible();
973
+ }
974
+ async selectReleaseIdInOutputProperties(propertyName, variableName) {
975
+ await this.railLocator.locator(`#${propertyName}`).fill(variableName);
976
+ await this.page.getByRole("option", {
977
+ name: variableName
978
+ }).click();
870
979
  }
871
- async expectVariable(propertyName) {
872
- await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).toBeVisible();
980
+ async expectVariable(propertyName, expected = true) {
981
+ if (expected) await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`).or(this.railLocator.locator(`textarea[id="${propertyName}"]`))).toBeVisible();
982
+ else await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`).or(this.railLocator.locator(`textarea[id="${propertyName}"]`))).not.toBeVisible();
983
+ }
984
+ async expectAlertMessage(alertMessage) {
985
+ await (0, $hOLA6$expect)(this.railLocator.locator(".warning .MuiAlert-message")).toHaveText(alertMessage);
873
986
  }
874
987
  async expectValueFromString(propertyName, propertyValue) {
875
988
  return await (0, $hOLA6$expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
876
989
  }
990
+ async expectRiskProfileValue(value) {
991
+ await (0, $hOLA6$expect)(this.railLocator.locator("#riskProfileId")).toHaveValue(value);
992
+ }
877
993
  async expectTo(value) {
878
994
  return await (0, $hOLA6$expect)(this.railLocator.getByTestId(`dot-autocomplete-chip`)).toHaveText(value);
879
995
  }
880
996
  async expectSubjectToBe(value) {
881
- return (0, $hOLA6$expect)(await this.page.locator("#notification-subject").getAttribute("value")).toContain(value);
997
+ return await (0, $hOLA6$expect)(this.page.locator("#notification-subject")).toHaveValue(value);
882
998
  }
883
999
  async expectBodyToBe(value) {
884
1000
  return await (0, $hOLA6$expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
885
1001
  }
1002
+ async expectReleaseTitleToBe(value) {
1003
+ return await (0, $hOLA6$expect)(this.page.locator("input[name=newReleaseTitle]")).toHaveValue(value);
1004
+ }
886
1005
  async setBody(value) {
887
1006
  await this.page.locator(".notification-body-field p").dblclick();
888
1007
  await this.page.locator(".notification-body-field #notification-body").fill(value);
889
1008
  await this.page.getByTestId(`save-button`).click();
890
1009
  }
1010
+ async setReleaseTags(tags) {
1011
+ if (typeof tags !== "string") for (const tag of tags){
1012
+ await this.page.locator("#release-tags").fill(tag);
1013
+ await this.page.locator("#release-tags").press("Enter");
1014
+ }
1015
+ else {
1016
+ await this.page.locator("#release-tags").fill(tags);
1017
+ await this.page.locator("#release-tags").press("Enter");
1018
+ }
1019
+ }
891
1020
  async setValueFromMap(propertyName, key, value) {
892
1021
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
893
1022
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
@@ -931,6 +1060,16 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
931
1060
  hasText: dependencies[i]
932
1061
  })).toBeVisible();
933
1062
  }
1063
+ async expectDependencyStatus(option = true) {
1064
+ if (option) await (0, $hOLA6$expect)(this.page.locator(".with-status .task-status")).toBeVisible();
1065
+ else await (0, $hOLA6$expect)(this.page.locator(".with-status .task-status")).not.toBeVisible();
1066
+ }
1067
+ async expectResolvedDependency() {
1068
+ await (0, $hOLA6$expect)(this.page.locator('span[aria-label="check-line icon"]')).toBeVisible();
1069
+ }
1070
+ async expectUnresolvedDependency() {
1071
+ await (0, $hOLA6$expect)(this.page.locator('span[aria-label="close-line icon"]')).not.toBeVisible();
1072
+ }
934
1073
  async expectCanDeleteDependency(title, canDelete = true) {
935
1074
  const depOptionsIcon = this.page.locator(".dependency").filter({
936
1075
  has: this.page.getByRole("link", {
@@ -946,6 +1085,27 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
946
1085
  })).toBeVisible();
947
1086
  } else await (0, $hOLA6$expect)(depOptionsIcon).not.toBeVisible();
948
1087
  }
1088
+ async expectDependencyContextualMenu(option = true) {
1089
+ const depOptionsIcon = this.page.locator(".dependency .icon-options");
1090
+ if (option) await (0, $hOLA6$expect)(depOptionsIcon).toBeVisible();
1091
+ else await (0, $hOLA6$expect)(depOptionsIcon).not.toBeVisible();
1092
+ }
1093
+ async removeDependency(title) {
1094
+ const depOptionsIcon = this.page.locator(".dependency").filter({
1095
+ has: this.page.getByRole("link", {
1096
+ name: title,
1097
+ exact: true
1098
+ })
1099
+ }).locator(".icon-options");
1100
+ await depOptionsIcon.isVisible();
1101
+ await depOptionsIcon.click();
1102
+ await this.railLocator.getByRole("menuitem", {
1103
+ name: "Remove"
1104
+ }).click();
1105
+ }
1106
+ async expectDependencyNotToBeVisible() {
1107
+ await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).not.toBeVisible();
1108
+ }
949
1109
  async getDependencyCount() {
950
1110
  await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
951
1111
  return await this.railLocator.locator(".gate-task-dependencies .dependency").count();
@@ -1050,8 +1210,10 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1050
1210
  }).click();
1051
1211
  }
1052
1212
  async expectTemplate(template) {
1053
- const templateName = await this.page.locator("#templateId").getAttribute("value");
1054
- (0, $hOLA6$expect)(templateName).toEqual(template);
1213
+ await (0, $hOLA6$expect)(this.railLocator.locator("#templateId")).toBeVisible({
1214
+ timeout: 10000
1215
+ });
1216
+ await (0, $hOLA6$expect)(this.railLocator.locator("#templateId")).toHaveValue(template);
1055
1217
  }
1056
1218
  async setAutoCompletePassword(passwordValue) {
1057
1219
  await this.page.getByTestId("password").getByLabel("Click to switch between").click();
@@ -1096,13 +1258,6 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1096
1258
  await this.page.locator("#endDate").click();
1097
1259
  await this.page.locator("#endDate").fill(date);
1098
1260
  }
1099
- async clickVariableButton(objectID, variableValue) {
1100
- await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
1101
- await this.page.locator(`#${objectID}`).fill(variableValue);
1102
- await this.page.getByRole("option", {
1103
- name: variableValue
1104
- }).click();
1105
- }
1106
1261
  async enableFallback() {
1107
1262
  await this.page.getByLabel("Fallback").check();
1108
1263
  }
@@ -1148,6 +1303,16 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1148
1303
  await this.page.getByTestId(`${fieldName}-input`).fill(fieldValue);
1149
1304
  await this.page.getByText(fieldValue).click();
1150
1305
  }
1306
+ async expectStartReleaseToBe(value) {
1307
+ return await (0, $hOLA6$expect)(this.railLocator.locator("#startRelease")).toHaveValue(value);
1308
+ }
1309
+ async setStartReleaseVariable(value) {
1310
+ await this.railLocator.locator("#startRelease").click();
1311
+ await this.railLocator.locator("#startRelease").fill(value);
1312
+ }
1313
+ async close() {
1314
+ await this.page.locator("task-drawer .dot-drawer .task-drawer-header").getByTestId("close-btn").click();
1315
+ }
1151
1316
  }
1152
1317
  class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1153
1318
  constructor(page){
@@ -1499,6 +1664,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1499
1664
  async expectStartDateToBeDisplayed() {
1500
1665
  await (0, $hOLA6$expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
1501
1666
  }
1667
+ async expectStartDayToBeInAvatar(expectedDay) {
1668
+ const startDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(0);
1669
+ const startDay = await startDayAvatar.locator("..").locator("h3").textContent();
1670
+ (0, $hOLA6$expect)(startDay?.trim()).toBe(expectedDay);
1671
+ }
1672
+ async expectEndDayToBeInAvatar(expectedDay) {
1673
+ const endDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(1);
1674
+ const endDay = await endDayAvatar.locator("..").locator("h3").textContent();
1675
+ (0, $hOLA6$expect)(endDay?.trim()).toBe(expectedDay);
1676
+ }
1502
1677
  async expectEndDateToBeDisplayed() {
1503
1678
  await (0, $hOLA6$expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
1504
1679
  }
@@ -1928,6 +2103,15 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
1928
2103
  async expectOwnerToBe(user) {
1929
2104
  await (0, $hOLA6$expect)(this.page.locator(".release-owner")).toContainText(user);
1930
2105
  }
2106
+ async expectReleaseTaggedWith(tagName) {
2107
+ await (0, $hOLA6$expect)(this.page.locator("#tags")).toContainText(tagName);
2108
+ }
2109
+ async expectTemplateTitleToBe(templateTitle) {
2110
+ await (0, $hOLA6$expect)(this.page.locator('[data-test="created-from-template"]')).toContainText(templateTitle);
2111
+ }
2112
+ async expectRiskProfileTitleToBe(riskProfile) {
2113
+ await (0, $hOLA6$expect)(this.page.locator('[data-test="release-risk-profile"]')).toContainText(riskProfile);
2114
+ }
1931
2115
  }
1932
2116
 
1933
2117
 
@@ -2280,6 +2464,13 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
2280
2464
  getPhase(phaseName) {
2281
2465
  return new $43cbcdfccb6c2a76$var$Phase(this.page, phaseName);
2282
2466
  }
2467
+ async expectPhaseCountToBe(expectedPhaseCount) {
2468
+ const phaseCount = await this.page.locator(".phase").count();
2469
+ (0, $hOLA6$expect)(phaseCount).toBe(expectedPhaseCount);
2470
+ }
2471
+ async expectVariableToBeFound(variableName) {
2472
+ await (0, $hOLA6$expect)(this.page.locator(`span.variable:has-text("${variableName}")`)).toHaveCount(1);
2473
+ }
2283
2474
  async expectNotFlagged() {
2284
2475
  await (0, $hOLA6$expect)(this.page.locator(".flag-none-icon")).toBeHidden();
2285
2476
  }
@@ -2380,6 +2571,11 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
2380
2571
  timeout: timeout
2381
2572
  });
2382
2573
  }
2574
+ async clickOnStatusLine(statusLine) {
2575
+ await this.page.locator(".task .status-line a").getByText(statusLine, {
2576
+ exact: true
2577
+ }).click();
2578
+ }
2383
2579
  async expectTaskCompletedInAdvance(taskTitle) {
2384
2580
  await (0, $hOLA6$expect)(this.page.locator("#release-content .completed_in_advance .task-title").filter({
2385
2581
  hasText: taskTitle
@@ -2501,11 +2697,19 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
2501
2697
  await this.page.locator(".progress-status-and-percentage").waitFor({
2502
2698
  timeout: 10000
2503
2699
  });
2504
- (0, $hOLA6$expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
2700
+ await (0, $hOLA6$expect)(this.page.locator(".progress-status-and-percentage")).toHaveText("Aborted");
2505
2701
  }
2506
2702
  async expectInProgressStatusToBePresent() {
2507
- await this.page.getByTestId("refresh-btn").click();
2508
- (0, $hOLA6$expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("In progress");
2703
+ await this.page.locator(".release-status").waitFor({
2704
+ timeout: 10000
2705
+ });
2706
+ await (0, $hOLA6$expect)(this.page.locator(".release-status")).toHaveText("In progress");
2707
+ }
2708
+ async expectFailedStatusToBePresent() {
2709
+ await this.page.locator(".progress-status-and-percentage").waitFor({
2710
+ timeout: 10000
2711
+ });
2712
+ await (0, $hOLA6$expect)(this.page.locator(".progress-status-and-percentage")).toHaveText("Failed0%");
2509
2713
  }
2510
2714
  async openTableView() {
2511
2715
  await this.util.openSideNavMenu("Table");
@@ -2647,12 +2851,13 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2647
2851
  }
2648
2852
  async isMenuItemDisabled(menuName, taskTitle) {
2649
2853
  await this.openContextMenuForTask(taskTitle);
2650
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
2651
- hasText: menuName
2652
- })).toHaveClass(/disabled/);
2653
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
2854
+ const menuItem = this.contextMenuButton.filter({
2654
2855
  hasText: menuName
2655
- }).locator("a")).toBeDisabled();
2856
+ });
2857
+ await (0, $hOLA6$expect)(menuItem).toHaveClass(/disabled/);
2858
+ const anchorTag = menuItem.locator("a");
2859
+ const disabledAttribute = await anchorTag.getAttribute("disabled");
2860
+ (0, $hOLA6$expect)(disabledAttribute).not.toBeNull();
2656
2861
  await this.closeContextMenu();
2657
2862
  }
2658
2863
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
@@ -2817,6 +3022,51 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2817
3022
  hasText: taskName
2818
3023
  })).toBeVisible();
2819
3024
  }
3025
+ async expectContainingTask(taskName, exist = true) {
3026
+ const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
3027
+ hasText: taskName
3028
+ });
3029
+ if (exist) await (0, $hOLA6$expect)(taskHeaderLocator).toContainText(taskName);
3030
+ else await (0, $hOLA6$expect)(taskHeaderLocator).not.toContainText(taskName);
3031
+ }
3032
+ // eslint-disable-next-line max-params
3033
+ async addTaskInGroup(currentGroupType, taskTitle, taskGroup, taskType) {
3034
+ const groupTaskLocator = this.phaseLocator.filter({
3035
+ hasText: "Dev.Phase"
3036
+ }).locator("li").filter({
3037
+ hasText: currentGroupType
3038
+ }).locator("a.add-task.link");
3039
+ await groupTaskLocator.click();
3040
+ await this.page.locator("#task-selector").hover();
3041
+ await this.page.locator('button[aria-label="Clear"]').click();
3042
+ await this.page.locator("#task-selector").fill(taskGroup);
3043
+ await this.page.getByTestId(taskType).click();
3044
+ await this.page.locator(".icon-close").click();
3045
+ await this.page.locator("#task-title").fill(taskTitle);
3046
+ await this.page.getByTestId("save-select-task-btn").click();
3047
+ await (0, $hOLA6$expect)(this.phaseLocator.filter({
3048
+ hasText: currentGroupType
3049
+ }).getByText(taskTitle)).toBeVisible();
3050
+ }
3051
+ async openContextMenuForTaskInGroup(taskTitle, groupName) {
3052
+ const taskLocator = this.phaseLocator.filter({
3053
+ hasText: groupName
3054
+ }).locator(".task").filter({
3055
+ hasText: taskTitle
3056
+ });
3057
+ await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
3058
+ }
3059
+ async duplicatePhase() {
3060
+ await this.phaseLocator.locator(".duplicate-phase").click();
3061
+ }
3062
+ async expectActionsDisabled() {
3063
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".duplicate-phase")).toHaveCount(0);
3064
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".delete-phase")).toHaveCount(0);
3065
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task .duplicate-task")).toHaveCount(0);
3066
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task .delete-task")).toHaveCount(0);
3067
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task-generator .add-task")).toHaveCount(0);
3068
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".display")).toHaveCount(0);
3069
+ }
2820
3070
  }
2821
3071
  class $43cbcdfccb6c2a76$var$RestartPhaseModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2822
3072
  constructor(page){
@@ -4075,15 +4325,21 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
4075
4325
  await this.modal.setConfirmPassword(password);
4076
4326
  await this.modal.save();
4077
4327
  }
4328
+ async filterUser(username) {
4329
+ await this.page.getByPlaceholder("Filter...").fill(username);
4330
+ }
4331
+ async expectToHaveFilteredUser(username) {
4332
+ return await (0, $hOLA6$expect)(this.page.getByRole("row", {
4333
+ name: "" + username + ""
4334
+ })).toBeVisible();
4335
+ }
4078
4336
  async expectToHaveLoginPermission(username) {
4079
4337
  return await (0, $hOLA6$expect)(this.page.getByRole("row", {
4080
4338
  name: "" + username + ""
4081
4339
  }).getByRole("checkbox")).toBeChecked();
4082
4340
  }
4083
4341
  async deleteUser(username) {
4084
- await this.page.getByRole("row", {
4085
- name: "" + username + ""
4086
- }).locator("i").nth(1).click();
4342
+ await this.page.getByTestId(`delete-btn-${username}`).click();
4087
4343
  await this.modal.delete();
4088
4344
  }
4089
4345
  async openRoles() {
@@ -6484,6 +6740,9 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
6484
6740
  await this.page.goto("./#/configuration");
6485
6741
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
6486
6742
  }
6743
+ async clickOnPrimaryLogo() {
6744
+ await this.page.getByTestId("primary-logo").click();
6745
+ }
6487
6746
  }
6488
6747
 
6489
6748