@digital-ai/devops-page-object-release 0.0.29 → 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();
870
967
  }
871
- async expectVariable(propertyName) {
872
- await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).toBeVisible();
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();
979
+ }
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){
@@ -1938,6 +2103,15 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
1938
2103
  async expectOwnerToBe(user) {
1939
2104
  await (0, $hOLA6$expect)(this.page.locator(".release-owner")).toContainText(user);
1940
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
+ }
1941
2115
  }
1942
2116
 
1943
2117
 
@@ -2397,6 +2571,11 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
2397
2571
  timeout: timeout
2398
2572
  });
2399
2573
  }
2574
+ async clickOnStatusLine(statusLine) {
2575
+ await this.page.locator(".task .status-line a").getByText(statusLine, {
2576
+ exact: true
2577
+ }).click();
2578
+ }
2400
2579
  async expectTaskCompletedInAdvance(taskTitle) {
2401
2580
  await (0, $hOLA6$expect)(this.page.locator("#release-content .completed_in_advance .task-title").filter({
2402
2581
  hasText: taskTitle
@@ -2518,11 +2697,19 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
2518
2697
  await this.page.locator(".progress-status-and-percentage").waitFor({
2519
2698
  timeout: 10000
2520
2699
  });
2521
- (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");
2522
2701
  }
2523
2702
  async expectInProgressStatusToBePresent() {
2524
- await this.page.getByTestId("refresh-btn").click();
2525
- (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%");
2526
2713
  }
2527
2714
  async openTableView() {
2528
2715
  await this.util.openSideNavMenu("Table");
@@ -2670,7 +2857,7 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2670
2857
  await (0, $hOLA6$expect)(menuItem).toHaveClass(/disabled/);
2671
2858
  const anchorTag = menuItem.locator("a");
2672
2859
  const disabledAttribute = await anchorTag.getAttribute("disabled");
2673
- await (0, $hOLA6$expect)(disabledAttribute).not.toBeNull();
2860
+ (0, $hOLA6$expect)(disabledAttribute).not.toBeNull();
2674
2861
  await this.closeContextMenu();
2675
2862
  }
2676
2863
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
@@ -4152,9 +4339,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
4152
4339
  }).getByRole("checkbox")).toBeChecked();
4153
4340
  }
4154
4341
  async deleteUser(username) {
4155
- await this.page.getByRole("row", {
4156
- name: "" + username + ""
4157
- }).locator("i").nth(1).click();
4342
+ await this.page.getByTestId(`delete-btn-${username}`).click();
4158
4343
  await this.modal.delete();
4159
4344
  }
4160
4345
  async openRoles() {
@@ -6555,6 +6740,9 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
6555
6740
  await this.page.goto("./#/configuration");
6556
6741
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
6557
6742
  }
6743
+ async clickOnPrimaryLogo() {
6744
+ await this.page.getByTestId("primary-logo").click();
6745
+ }
6558
6746
  }
6559
6747
 
6560
6748