@digital-ai/devops-page-object-release 0.0.49 → 0.0.51

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
@@ -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: "value"
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
  }
@@ -4868,7 +4919,7 @@ class $ecd0868a4240184d$export$7b434e00c788d0bf extends (0, $9626bc9256ce31f7$ex
4868
4919
  }
4869
4920
  async expectNewPluginInstallationInfo(pluginName) {
4870
4921
  await (0, $hOLA6$expect)(this.page.getByText("New plugin installedPlugin")).toBeVisible();
4871
- await (0, $hOLA6$expect)(this.page.getByText(pluginName.toLowerCase())).toBeVisible();
4922
+ await (0, $hOLA6$expect)(this.page.getByText(`release-${pluginName.toLowerCase()}-integration has been installed`)).toBeVisible();
4872
4923
  }
4873
4924
  async clickUpload() {
4874
4925
  await this.page.locator("button", {
@@ -5259,6 +5310,7 @@ class $9ca6e63d357957dd$export$922081b54f2ab994 extends (0, $9626bc9256ce31f7$ex
5259
5310
 
5260
5311
 
5261
5312
 
5313
+
5262
5314
  class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
5263
5315
  async openReleaseCalendarPage() {
5264
5316
  await this.page.goto("./#/releases/calendar");
@@ -5474,6 +5526,62 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
5474
5526
  await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
5475
5527
  return downloadCount;
5476
5528
  }
5529
+ async openBlackoutPeriod(date) {
5530
+ return new $3a340a3f4fd8f04d$export$61be9a231bfbe7b9(date, this.page);
5531
+ }
5532
+ }
5533
+ class $3a340a3f4fd8f04d$export$61be9a231bfbe7b9 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
5534
+ constructor(date, page){
5535
+ super(page);
5536
+ this.dateField = date;
5537
+ }
5538
+ async edit() {
5539
+ await this.findBlackout();
5540
+ await this.page.locator(".blackout-popover .blackout-popover-footer .edit-icon").click();
5541
+ return this;
5542
+ }
5543
+ async delete() {
5544
+ await this.findBlackout();
5545
+ await this.page.locator(".blackout-popover .blackout-popover-footer .delete-icon").click({
5546
+ force: true
5547
+ });
5548
+ await this.page.getByRole("button", {
5549
+ name: "Delete"
5550
+ }).click({
5551
+ force: true
5552
+ });
5553
+ return this;
5554
+ }
5555
+ async findBlackout() {
5556
+ await (0, $hOLA6$expect)(async ()=>{
5557
+ await this.page.locator(`.tl-blackout-start[data-test-date="${this.dateField}"]`).click({
5558
+ force: true,
5559
+ position: {
5560
+ x: 4,
5561
+ y: 4
5562
+ }
5563
+ });
5564
+ await (0, $hOLA6$expect)(this.page.locator(".blackout-popover-container")).toBeVisible({
5565
+ timeout: 1000
5566
+ });
5567
+ }).toPass();
5568
+ }
5569
+ // Have to revisit here fix the date selection for different months
5570
+ async setEndDate(date) {
5571
+ const cDate = (0, $hOLA6$moment)(date).format("D");
5572
+ const month = (0, $hOLA6$moment)(date).format("MMMM").toLocaleLowerCase();
5573
+ await this.page.locator(".widget-datetime").filter({
5574
+ hasText: "End date"
5575
+ }).locator(".xl-react-widget-date input").click();
5576
+ await this.page.getByLabel(`${month} ${cDate}`).click();
5577
+ return this;
5578
+ }
5579
+ async save() {
5580
+ await this.page.getByRole("button", {
5581
+ name: "Save"
5582
+ }).click();
5583
+ return this;
5584
+ }
5477
5585
  }
5478
5586
 
5479
5587
 
@@ -7893,9 +8001,12 @@ const $80c3ae34677b4324$export$e0969da9b8fb378d = (0, $hOLA6$test).extend({
7893
8001
  }
7894
8002
  });
7895
8003
  class $80c3ae34677b4324$var$Fixtures {
8004
+ applicationIds = [];
7896
8005
  archivedReleaseIds = [];
8006
+ environmentIds = [];
7897
8007
  releaseIds = [];
7898
8008
  riskProfiles = [];
8009
+ reservationIds = [];
7899
8010
  triggerIds = [];
7900
8011
  configurationIds = [];
7901
8012
  globalVariableIds = [];
@@ -8111,9 +8222,42 @@ class $80c3ae34677b4324$var$Fixtures {
8111
8222
  createDelivery(delivery) {
8112
8223
  return this.doPost("fixtures/deliveries", delivery);
8113
8224
  }
8225
+ async facet(facet) {
8226
+ return this.doPost("fixtures/facets", facet);
8227
+ }
8228
+ async application(application) {
8229
+ const response = await this.doPost("fixtures/application", application);
8230
+ const json = await response.json();
8231
+ this.applicationIds.push(json.id);
8232
+ return json;
8233
+ }
8234
+ async environment(environment) {
8235
+ const response = await this.doPost("fixtures/environment", environment);
8236
+ const json = await response.json();
8237
+ this.environmentIds.push(json.id);
8238
+ return json;
8239
+ }
8240
+ async reservation(reservation) {
8241
+ const response = await this.doPost("fixtures/reservation", reservation);
8242
+ const json = await response.json();
8243
+ this.reservationIds.push(json.id);
8244
+ return json.body;
8245
+ }
8114
8246
  deleteDelivery(delivery) {
8115
8247
  return this.doDelete(`fixtures/deliveries/${delivery}`);
8116
8248
  }
8249
+ async deleteApplication(applicationId) {
8250
+ return this.doDelete(`api/v1/applications/${applicationId}`);
8251
+ }
8252
+ async deleteEnvironment(environmentId) {
8253
+ return this.doDelete(`fixtures/environment/${environmentId}`);
8254
+ }
8255
+ async clearCalendar() {
8256
+ return this.doDelete("fixtures/calendar");
8257
+ }
8258
+ async deleteReservation(id) {
8259
+ return this.doDelete(`fixtures/reservation/${id}`);
8260
+ }
8117
8261
  async cleanAll() {
8118
8262
  for (const username of this.usernames){
8119
8263
  await this.deleteUser(username);
@@ -8125,11 +8269,17 @@ class $80c3ae34677b4324$var$Fixtures {
8125
8269
  for (const confId of this.configurationIds)await this.deleteConfiguration(confId);
8126
8270
  for (const folderId of this.folderIds.reverse())await this.deleteFolder(folderId);
8127
8271
  for (const globalVariableId of this.globalVariableIds)await this.deleteGlobalVariable(globalVariableId);
8272
+ for (const environmentId of this.environmentIds)await this.deleteEnvironment(environmentId);
8273
+ for (const applicationId of this.applicationIds)await this.deleteApplication(applicationId);
8274
+ for (const reservationId of this.reservationIds)await this.deleteReservation(reservationId);
8275
+ this.applicationIds = [];
8276
+ this.configurationIds = [];
8277
+ this.environmentIds = [];
8128
8278
  this.globalVariableIds = [];
8129
8279
  this.folderIds = [];
8130
8280
  this.releaseIds = [];
8281
+ this.reservationIds = [];
8131
8282
  this.triggerIds = [];
8132
- this.configurationIds = [];
8133
8283
  this.usernames = [];
8134
8284
  this.userProfiles = [];
8135
8285
  }
@@ -8157,6 +8307,15 @@ class $80c3ae34677b4324$var$Fixtures {
8157
8307
  const json = await response.json();
8158
8308
  return json.key;
8159
8309
  }
8310
+ async addBlackout(name, from, to) {
8311
+ return this.doPost("calendar/blackouts", {
8312
+ label: name,
8313
+ startDate: from,
8314
+ endDate: to,
8315
+ type: "xlrelease.Blackout",
8316
+ id: null
8317
+ });
8318
+ }
8160
8319
  async addUser(username, password) {
8161
8320
  this.usernames.push(username);
8162
8321
  await this.doPost("fixtures/user", {