@digital-ai/devops-page-object-release 0.0.50 → 0.0.52
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/CHANGELOG.md +14 -0
- package/dist/main.js +161 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +161 -3
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +93 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -879,19 +879,44 @@ class $115d1e40e2564777$export$a87b4660f21fba58 extends (0, $9626bc9256ce31f7$ex
|
|
|
879
879
|
await this.page.getByRole("combobox", {
|
|
880
880
|
name: labelName
|
|
881
881
|
}).click();
|
|
882
|
+
await this.page.getByRole("combobox", {
|
|
883
|
+
name: labelName
|
|
884
|
+
}).clear();
|
|
882
885
|
await this.page.getByRole("combobox", {
|
|
883
886
|
name: labelName
|
|
884
887
|
}).fill(value);
|
|
885
888
|
await this.page.getByRole("option", {
|
|
886
|
-
name:
|
|
889
|
+
name: value,
|
|
890
|
+
exact: true
|
|
887
891
|
}).click();
|
|
888
892
|
}
|
|
889
893
|
async saveAttributes() {
|
|
894
|
+
await this.page.locator(".task-attribute-edit-buttons").click();
|
|
890
895
|
await this.page.getByTestId("save-btn").click();
|
|
891
896
|
}
|
|
892
897
|
async cancelAttribute() {
|
|
893
898
|
await this.page.getByTestId("cancel-btn").click();
|
|
894
899
|
}
|
|
900
|
+
async setInputTextField(fieldId, value) {
|
|
901
|
+
await this.page.locator(`input[id="${fieldId}"]`).focus();
|
|
902
|
+
await this.page.locator(`input[id="${fieldId}"]`).fill(value);
|
|
903
|
+
}
|
|
904
|
+
async expectFacetCountToBe(count) {
|
|
905
|
+
await (0, $hOLA6$expect)(this.page.locator(".task-attribute-item")).toHaveCount(count);
|
|
906
|
+
}
|
|
907
|
+
async expectFieldValueToBe(fieldId, value) {
|
|
908
|
+
await (0, $hOLA6$expect)(this.page.locator('input[id="' + fieldId + '"]')).toHaveValue(value);
|
|
909
|
+
}
|
|
910
|
+
async clickEditExistingFacet(facetName) {
|
|
911
|
+
await this.page.locator(".task-attribute-item").filter({
|
|
912
|
+
hasText: facetName
|
|
913
|
+
}).getByTestId("edit-btn").click();
|
|
914
|
+
}
|
|
915
|
+
async deleteFacet(faceName) {
|
|
916
|
+
await this.page.locator(".task-attribute-item").filter({
|
|
917
|
+
hasText: faceName
|
|
918
|
+
}).getByTestId("delete-btn").click();
|
|
919
|
+
}
|
|
895
920
|
}
|
|
896
921
|
|
|
897
922
|
|
|
@@ -1805,6 +1830,11 @@ class $499d3d8c8706756b$export$e3515314c13bc477 extends (0, $9626bc9256ce31f7$ex
|
|
|
1805
1830
|
hasText: "Start Date"
|
|
1806
1831
|
}).locator(".task-date-view-content")).toBeVisible();
|
|
1807
1832
|
}
|
|
1833
|
+
async expectStartDateToBe(date) {
|
|
1834
|
+
(0, $hOLA6$expect)(await this.page.locator(".flex-section.column").filter({
|
|
1835
|
+
hasText: "Start Date"
|
|
1836
|
+
}).locator(".task-date-view-content").getAttribute("aria-label")).toContain(date);
|
|
1837
|
+
}
|
|
1808
1838
|
async expectEndDateToBeDisplayed() {
|
|
1809
1839
|
await (0, $hOLA6$expect)(this.page.locator(".flex-section.column").filter({
|
|
1810
1840
|
hasText: "End Date"
|
|
@@ -1886,6 +1916,22 @@ class $499d3d8c8706756b$export$e3515314c13bc477 extends (0, $9626bc9256ce31f7$ex
|
|
|
1886
1916
|
exact: true
|
|
1887
1917
|
}).first().click();
|
|
1888
1918
|
}
|
|
1919
|
+
async checkDelayDuringBlackoutPeriod() {
|
|
1920
|
+
await this.page.locator(".task-wait-switch").filter({
|
|
1921
|
+
hasText: "blackout"
|
|
1922
|
+
}).locator(".PrivateSwitchBase-input").check();
|
|
1923
|
+
}
|
|
1924
|
+
async unCheckDelayDuringBlackoutPeriod() {
|
|
1925
|
+
await this.page.getByTestId("blackout").locator(".PrivateSwitchBase-input").uncheck();
|
|
1926
|
+
}
|
|
1927
|
+
async checkEnvironmentAvailability() {
|
|
1928
|
+
await this.page.locator(".task-wait-switch").filter({
|
|
1929
|
+
hasText: "environment"
|
|
1930
|
+
}).locator(".PrivateSwitchBase-input").check();
|
|
1931
|
+
}
|
|
1932
|
+
async unCheckEnvironmentAvailability() {
|
|
1933
|
+
await this.page.getByTestId("environment").locator(".PrivateSwitchBase-input").uncheck();
|
|
1934
|
+
}
|
|
1889
1935
|
}
|
|
1890
1936
|
|
|
1891
1937
|
|
|
@@ -3040,6 +3086,11 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
3040
3086
|
async expectRiskFlagOnTaskCard() {
|
|
3041
3087
|
await (0, $hOLA6$expect)(this.page.locator(".risk-flag-icon")).toBeVisible();
|
|
3042
3088
|
}
|
|
3089
|
+
async expectBlackoutIconOnTaskCard(taskTitle) {
|
|
3090
|
+
await (0, $hOLA6$expect)(this.page.locator(".task").filter({
|
|
3091
|
+
hasText: taskTitle
|
|
3092
|
+
}).locator(".circle-minus-icon")).toBeVisible();
|
|
3093
|
+
}
|
|
3043
3094
|
async expectFlagOnCompletedTaskCard() {
|
|
3044
3095
|
await (0, $hOLA6$expect)(this.page.locator(".flag-count")).toBeVisible();
|
|
3045
3096
|
}
|
|
@@ -4402,7 +4453,6 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
|
|
|
4402
4453
|
await this.page.getByPlaceholder("Search folder...").click();
|
|
4403
4454
|
await this.page.getByPlaceholder("Search folder...").clear();
|
|
4404
4455
|
await this.page.getByPlaceholder("Search folder...").fill(folderName);
|
|
4405
|
-
await this.page.getByPlaceholder("Search folder...").press("Enter");
|
|
4406
4456
|
await (0, $hOLA6$expect)(this.page.getByRole("link", {
|
|
4407
4457
|
name: folderName
|
|
4408
4458
|
})).toBeVisible();
|
|
@@ -5259,6 +5309,7 @@ class $9ca6e63d357957dd$export$922081b54f2ab994 extends (0, $9626bc9256ce31f7$ex
|
|
|
5259
5309
|
|
|
5260
5310
|
|
|
5261
5311
|
|
|
5312
|
+
|
|
5262
5313
|
class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
5263
5314
|
async openReleaseCalendarPage() {
|
|
5264
5315
|
await this.page.goto("./#/releases/calendar");
|
|
@@ -5474,6 +5525,62 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
|
|
|
5474
5525
|
await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
|
|
5475
5526
|
return downloadCount;
|
|
5476
5527
|
}
|
|
5528
|
+
async openBlackoutPeriod(date) {
|
|
5529
|
+
return new $3a340a3f4fd8f04d$export$61be9a231bfbe7b9(date, this.page);
|
|
5530
|
+
}
|
|
5531
|
+
}
|
|
5532
|
+
class $3a340a3f4fd8f04d$export$61be9a231bfbe7b9 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
5533
|
+
constructor(date, page){
|
|
5534
|
+
super(page);
|
|
5535
|
+
this.dateField = date;
|
|
5536
|
+
}
|
|
5537
|
+
async edit() {
|
|
5538
|
+
await this.findBlackout();
|
|
5539
|
+
await this.page.locator(".blackout-popover .blackout-popover-footer .edit-icon").click();
|
|
5540
|
+
return this;
|
|
5541
|
+
}
|
|
5542
|
+
async delete() {
|
|
5543
|
+
await this.findBlackout();
|
|
5544
|
+
await this.page.locator(".blackout-popover .blackout-popover-footer .delete-icon").click({
|
|
5545
|
+
force: true
|
|
5546
|
+
});
|
|
5547
|
+
await this.page.getByRole("button", {
|
|
5548
|
+
name: "Delete"
|
|
5549
|
+
}).click({
|
|
5550
|
+
force: true
|
|
5551
|
+
});
|
|
5552
|
+
return this;
|
|
5553
|
+
}
|
|
5554
|
+
async findBlackout() {
|
|
5555
|
+
await (0, $hOLA6$expect)(async ()=>{
|
|
5556
|
+
await this.page.locator(`.tl-blackout-start[data-test-date="${this.dateField}"]`).click({
|
|
5557
|
+
force: true,
|
|
5558
|
+
position: {
|
|
5559
|
+
x: 4,
|
|
5560
|
+
y: 4
|
|
5561
|
+
}
|
|
5562
|
+
});
|
|
5563
|
+
await (0, $hOLA6$expect)(this.page.locator(".blackout-popover-container")).toBeVisible({
|
|
5564
|
+
timeout: 1000
|
|
5565
|
+
});
|
|
5566
|
+
}).toPass();
|
|
5567
|
+
}
|
|
5568
|
+
// Have to revisit here fix the date selection for different months
|
|
5569
|
+
async setEndDate(date) {
|
|
5570
|
+
const cDate = (0, $hOLA6$moment)(date).format("D");
|
|
5571
|
+
const month = (0, $hOLA6$moment)(date).format("MMMM").toLocaleLowerCase();
|
|
5572
|
+
await this.page.locator(".widget-datetime").filter({
|
|
5573
|
+
hasText: "End date"
|
|
5574
|
+
}).locator(".xl-react-widget-date input").click();
|
|
5575
|
+
await this.page.getByLabel(`${month} ${cDate}`).click();
|
|
5576
|
+
return this;
|
|
5577
|
+
}
|
|
5578
|
+
async save() {
|
|
5579
|
+
await this.page.getByRole("button", {
|
|
5580
|
+
name: "Save"
|
|
5581
|
+
}).click();
|
|
5582
|
+
return this;
|
|
5583
|
+
}
|
|
5477
5584
|
}
|
|
5478
5585
|
|
|
5479
5586
|
|
|
@@ -7893,9 +8000,12 @@ const $80c3ae34677b4324$export$e0969da9b8fb378d = (0, $hOLA6$test).extend({
|
|
|
7893
8000
|
}
|
|
7894
8001
|
});
|
|
7895
8002
|
class $80c3ae34677b4324$var$Fixtures {
|
|
8003
|
+
applicationIds = [];
|
|
7896
8004
|
archivedReleaseIds = [];
|
|
8005
|
+
environmentIds = [];
|
|
7897
8006
|
releaseIds = [];
|
|
7898
8007
|
riskProfiles = [];
|
|
8008
|
+
reservationIds = [];
|
|
7899
8009
|
triggerIds = [];
|
|
7900
8010
|
configurationIds = [];
|
|
7901
8011
|
globalVariableIds = [];
|
|
@@ -8111,9 +8221,42 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
8111
8221
|
createDelivery(delivery) {
|
|
8112
8222
|
return this.doPost("fixtures/deliveries", delivery);
|
|
8113
8223
|
}
|
|
8224
|
+
async facet(facet) {
|
|
8225
|
+
return this.doPost("fixtures/facets", facet);
|
|
8226
|
+
}
|
|
8227
|
+
async application(application) {
|
|
8228
|
+
const response = await this.doPost("fixtures/application", application);
|
|
8229
|
+
const json = await response.json();
|
|
8230
|
+
this.applicationIds.push(json.id);
|
|
8231
|
+
return json;
|
|
8232
|
+
}
|
|
8233
|
+
async environment(environment) {
|
|
8234
|
+
const response = await this.doPost("fixtures/environment", environment);
|
|
8235
|
+
const json = await response.json();
|
|
8236
|
+
this.environmentIds.push(json.id);
|
|
8237
|
+
return json;
|
|
8238
|
+
}
|
|
8239
|
+
async reservation(reservation) {
|
|
8240
|
+
const response = await this.doPost("fixtures/reservation", reservation);
|
|
8241
|
+
const json = await response.json();
|
|
8242
|
+
this.reservationIds.push(json.id);
|
|
8243
|
+
return json.body;
|
|
8244
|
+
}
|
|
8114
8245
|
deleteDelivery(delivery) {
|
|
8115
8246
|
return this.doDelete(`fixtures/deliveries/${delivery}`);
|
|
8116
8247
|
}
|
|
8248
|
+
async deleteApplication(applicationId) {
|
|
8249
|
+
return this.doDelete(`api/v1/applications/${applicationId}`);
|
|
8250
|
+
}
|
|
8251
|
+
async deleteEnvironment(environmentId) {
|
|
8252
|
+
return this.doDelete(`fixtures/environment/${environmentId}`);
|
|
8253
|
+
}
|
|
8254
|
+
async clearCalendar() {
|
|
8255
|
+
return this.doDelete("fixtures/calendar");
|
|
8256
|
+
}
|
|
8257
|
+
async deleteReservation(id) {
|
|
8258
|
+
return this.doDelete(`fixtures/reservation/${id}`);
|
|
8259
|
+
}
|
|
8117
8260
|
async cleanAll() {
|
|
8118
8261
|
for (const username of this.usernames){
|
|
8119
8262
|
await this.deleteUser(username);
|
|
@@ -8125,11 +8268,17 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
8125
8268
|
for (const confId of this.configurationIds)await this.deleteConfiguration(confId);
|
|
8126
8269
|
for (const folderId of this.folderIds.reverse())await this.deleteFolder(folderId);
|
|
8127
8270
|
for (const globalVariableId of this.globalVariableIds)await this.deleteGlobalVariable(globalVariableId);
|
|
8271
|
+
for (const environmentId of this.environmentIds)await this.deleteEnvironment(environmentId);
|
|
8272
|
+
for (const applicationId of this.applicationIds)await this.deleteApplication(applicationId);
|
|
8273
|
+
for (const reservationId of this.reservationIds)await this.deleteReservation(reservationId);
|
|
8274
|
+
this.applicationIds = [];
|
|
8275
|
+
this.configurationIds = [];
|
|
8276
|
+
this.environmentIds = [];
|
|
8128
8277
|
this.globalVariableIds = [];
|
|
8129
8278
|
this.folderIds = [];
|
|
8130
8279
|
this.releaseIds = [];
|
|
8280
|
+
this.reservationIds = [];
|
|
8131
8281
|
this.triggerIds = [];
|
|
8132
|
-
this.configurationIds = [];
|
|
8133
8282
|
this.usernames = [];
|
|
8134
8283
|
this.userProfiles = [];
|
|
8135
8284
|
}
|
|
@@ -8157,6 +8306,15 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
8157
8306
|
const json = await response.json();
|
|
8158
8307
|
return json.key;
|
|
8159
8308
|
}
|
|
8309
|
+
async addBlackout(name, from, to) {
|
|
8310
|
+
return this.doPost("calendar/blackouts", {
|
|
8311
|
+
label: name,
|
|
8312
|
+
startDate: from,
|
|
8313
|
+
endDate: to,
|
|
8314
|
+
type: "xlrelease.Blackout",
|
|
8315
|
+
id: null
|
|
8316
|
+
});
|
|
8317
|
+
}
|
|
8160
8318
|
async addUser(username, password) {
|
|
8161
8319
|
this.usernames.push(username);
|
|
8162
8320
|
await this.doPost("fixtures/user", {
|