@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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.52
4
+
5
+ ### Patch Changes
6
+
7
+ - 421e01c: S-119676: Don't press enter when searching folders
8
+
9
+ ## 0.0.51
10
+
11
+ ### Patch Changes
12
+
13
+ - d94c47c: S-118969: Migrated facet scenario in playwright
14
+ - 412c737: S-119455: Migrated task-blackout-scenario in playwright
15
+ - 39c1832: S-118969: Added facet fixture
16
+
3
17
  ## 0.0.50
4
18
 
5
19
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1815,19 +1815,44 @@ class $6e382f24d680cc9b$export$a87b4660f21fba58 extends (0, $f8721861c660dd88$ex
1815
1815
  await this.page.getByRole("combobox", {
1816
1816
  name: labelName
1817
1817
  }).click();
1818
+ await this.page.getByRole("combobox", {
1819
+ name: labelName
1820
+ }).clear();
1818
1821
  await this.page.getByRole("combobox", {
1819
1822
  name: labelName
1820
1823
  }).fill(value);
1821
1824
  await this.page.getByRole("option", {
1822
- name: "value"
1825
+ name: value,
1826
+ exact: true
1823
1827
  }).click();
1824
1828
  }
1825
1829
  async saveAttributes() {
1830
+ await this.page.locator(".task-attribute-edit-buttons").click();
1826
1831
  await this.page.getByTestId("save-btn").click();
1827
1832
  }
1828
1833
  async cancelAttribute() {
1829
1834
  await this.page.getByTestId("cancel-btn").click();
1830
1835
  }
1836
+ async setInputTextField(fieldId, value) {
1837
+ await this.page.locator(`input[id="${fieldId}"]`).focus();
1838
+ await this.page.locator(`input[id="${fieldId}"]`).fill(value);
1839
+ }
1840
+ async expectFacetCountToBe(count) {
1841
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attribute-item")).toHaveCount(count);
1842
+ }
1843
+ async expectFieldValueToBe(fieldId, value) {
1844
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('input[id="' + fieldId + '"]')).toHaveValue(value);
1845
+ }
1846
+ async clickEditExistingFacet(facetName) {
1847
+ await this.page.locator(".task-attribute-item").filter({
1848
+ hasText: facetName
1849
+ }).getByTestId("edit-btn").click();
1850
+ }
1851
+ async deleteFacet(faceName) {
1852
+ await this.page.locator(".task-attribute-item").filter({
1853
+ hasText: faceName
1854
+ }).getByTestId("delete-btn").click();
1855
+ }
1831
1856
  }
1832
1857
 
1833
1858
 
@@ -2741,6 +2766,11 @@ class $1fbdec5dc9cde599$export$e3515314c13bc477 extends (0, $f8721861c660dd88$ex
2741
2766
  hasText: "Start Date"
2742
2767
  }).locator(".task-date-view-content")).toBeVisible();
2743
2768
  }
2769
+ async expectStartDateToBe(date) {
2770
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".flex-section.column").filter({
2771
+ hasText: "Start Date"
2772
+ }).locator(".task-date-view-content").getAttribute("aria-label")).toContain(date);
2773
+ }
2744
2774
  async expectEndDateToBeDisplayed() {
2745
2775
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flex-section.column").filter({
2746
2776
  hasText: "End Date"
@@ -2822,6 +2852,22 @@ class $1fbdec5dc9cde599$export$e3515314c13bc477 extends (0, $f8721861c660dd88$ex
2822
2852
  exact: true
2823
2853
  }).first().click();
2824
2854
  }
2855
+ async checkDelayDuringBlackoutPeriod() {
2856
+ await this.page.locator(".task-wait-switch").filter({
2857
+ hasText: "blackout"
2858
+ }).locator(".PrivateSwitchBase-input").check();
2859
+ }
2860
+ async unCheckDelayDuringBlackoutPeriod() {
2861
+ await this.page.getByTestId("blackout").locator(".PrivateSwitchBase-input").uncheck();
2862
+ }
2863
+ async checkEnvironmentAvailability() {
2864
+ await this.page.locator(".task-wait-switch").filter({
2865
+ hasText: "environment"
2866
+ }).locator(".PrivateSwitchBase-input").check();
2867
+ }
2868
+ async unCheckEnvironmentAvailability() {
2869
+ await this.page.getByTestId("environment").locator(".PrivateSwitchBase-input").uncheck();
2870
+ }
2825
2871
  }
2826
2872
 
2827
2873
 
@@ -3976,6 +4022,11 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3976
4022
  async expectRiskFlagOnTaskCard() {
3977
4023
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".risk-flag-icon")).toBeVisible();
3978
4024
  }
4025
+ async expectBlackoutIconOnTaskCard(taskTitle) {
4026
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task").filter({
4027
+ hasText: taskTitle
4028
+ }).locator(".circle-minus-icon")).toBeVisible();
4029
+ }
3979
4030
  async expectFlagOnCompletedTaskCard() {
3980
4031
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flag-count")).toBeVisible();
3981
4032
  }
@@ -5338,7 +5389,6 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
5338
5389
  await this.page.getByPlaceholder("Search folder...").click();
5339
5390
  await this.page.getByPlaceholder("Search folder...").clear();
5340
5391
  await this.page.getByPlaceholder("Search folder...").fill(folderName);
5341
- await this.page.getByPlaceholder("Search folder...").press("Enter");
5342
5392
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
5343
5393
  name: folderName
5344
5394
  })).toBeVisible();
@@ -6195,6 +6245,7 @@ class $a642d735048996f9$export$922081b54f2ab994 extends (0, $f8721861c660dd88$ex
6195
6245
 
6196
6246
 
6197
6247
 
6248
+
6198
6249
  class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
6199
6250
  async openReleaseCalendarPage() {
6200
6251
  await this.page.goto("./#/releases/calendar");
@@ -6410,6 +6461,62 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
6410
6461
  await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
6411
6462
  return downloadCount;
6412
6463
  }
6464
+ async openBlackoutPeriod(date) {
6465
+ return new $a8855257f8bb2b12$export$61be9a231bfbe7b9(date, this.page);
6466
+ }
6467
+ }
6468
+ class $a8855257f8bb2b12$export$61be9a231bfbe7b9 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
6469
+ constructor(date, page){
6470
+ super(page);
6471
+ this.dateField = date;
6472
+ }
6473
+ async edit() {
6474
+ await this.findBlackout();
6475
+ await this.page.locator(".blackout-popover .blackout-popover-footer .edit-icon").click();
6476
+ return this;
6477
+ }
6478
+ async delete() {
6479
+ await this.findBlackout();
6480
+ await this.page.locator(".blackout-popover .blackout-popover-footer .delete-icon").click({
6481
+ force: true
6482
+ });
6483
+ await this.page.getByRole("button", {
6484
+ name: "Delete"
6485
+ }).click({
6486
+ force: true
6487
+ });
6488
+ return this;
6489
+ }
6490
+ async findBlackout() {
6491
+ await (0, $kKeXs$playwrighttest.expect)(async ()=>{
6492
+ await this.page.locator(`.tl-blackout-start[data-test-date="${this.dateField}"]`).click({
6493
+ force: true,
6494
+ position: {
6495
+ x: 4,
6496
+ y: 4
6497
+ }
6498
+ });
6499
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".blackout-popover-container")).toBeVisible({
6500
+ timeout: 1000
6501
+ });
6502
+ }).toPass();
6503
+ }
6504
+ // Have to revisit here fix the date selection for different months
6505
+ async setEndDate(date) {
6506
+ const cDate = (0, ($parcel$interopDefault($kKeXs$moment)))(date).format("D");
6507
+ const month = (0, ($parcel$interopDefault($kKeXs$moment)))(date).format("MMMM").toLocaleLowerCase();
6508
+ await this.page.locator(".widget-datetime").filter({
6509
+ hasText: "End date"
6510
+ }).locator(".xl-react-widget-date input").click();
6511
+ await this.page.getByLabel(`${month} ${cDate}`).click();
6512
+ return this;
6513
+ }
6514
+ async save() {
6515
+ await this.page.getByRole("button", {
6516
+ name: "Save"
6517
+ }).click();
6518
+ return this;
6519
+ }
6413
6520
  }
6414
6521
 
6415
6522
 
@@ -9503,9 +9610,12 @@ const $6998c6a53a9eb4fa$export$e0969da9b8fb378d = (0, $kKeXs$playwrighttest.test
9503
9610
  }
9504
9611
  });
9505
9612
  class $6998c6a53a9eb4fa$var$Fixtures {
9613
+ applicationIds = [];
9506
9614
  archivedReleaseIds = [];
9615
+ environmentIds = [];
9507
9616
  releaseIds = [];
9508
9617
  riskProfiles = [];
9618
+ reservationIds = [];
9509
9619
  triggerIds = [];
9510
9620
  configurationIds = [];
9511
9621
  globalVariableIds = [];
@@ -9721,9 +9831,42 @@ class $6998c6a53a9eb4fa$var$Fixtures {
9721
9831
  createDelivery(delivery) {
9722
9832
  return this.doPost("fixtures/deliveries", delivery);
9723
9833
  }
9834
+ async facet(facet) {
9835
+ return this.doPost("fixtures/facets", facet);
9836
+ }
9837
+ async application(application) {
9838
+ const response = await this.doPost("fixtures/application", application);
9839
+ const json = await response.json();
9840
+ this.applicationIds.push(json.id);
9841
+ return json;
9842
+ }
9843
+ async environment(environment) {
9844
+ const response = await this.doPost("fixtures/environment", environment);
9845
+ const json = await response.json();
9846
+ this.environmentIds.push(json.id);
9847
+ return json;
9848
+ }
9849
+ async reservation(reservation) {
9850
+ const response = await this.doPost("fixtures/reservation", reservation);
9851
+ const json = await response.json();
9852
+ this.reservationIds.push(json.id);
9853
+ return json.body;
9854
+ }
9724
9855
  deleteDelivery(delivery) {
9725
9856
  return this.doDelete(`fixtures/deliveries/${delivery}`);
9726
9857
  }
9858
+ async deleteApplication(applicationId) {
9859
+ return this.doDelete(`api/v1/applications/${applicationId}`);
9860
+ }
9861
+ async deleteEnvironment(environmentId) {
9862
+ return this.doDelete(`fixtures/environment/${environmentId}`);
9863
+ }
9864
+ async clearCalendar() {
9865
+ return this.doDelete("fixtures/calendar");
9866
+ }
9867
+ async deleteReservation(id) {
9868
+ return this.doDelete(`fixtures/reservation/${id}`);
9869
+ }
9727
9870
  async cleanAll() {
9728
9871
  for (const username of this.usernames){
9729
9872
  await this.deleteUser(username);
@@ -9735,11 +9878,17 @@ class $6998c6a53a9eb4fa$var$Fixtures {
9735
9878
  for (const confId of this.configurationIds)await this.deleteConfiguration(confId);
9736
9879
  for (const folderId of this.folderIds.reverse())await this.deleteFolder(folderId);
9737
9880
  for (const globalVariableId of this.globalVariableIds)await this.deleteGlobalVariable(globalVariableId);
9881
+ for (const environmentId of this.environmentIds)await this.deleteEnvironment(environmentId);
9882
+ for (const applicationId of this.applicationIds)await this.deleteApplication(applicationId);
9883
+ for (const reservationId of this.reservationIds)await this.deleteReservation(reservationId);
9884
+ this.applicationIds = [];
9885
+ this.configurationIds = [];
9886
+ this.environmentIds = [];
9738
9887
  this.globalVariableIds = [];
9739
9888
  this.folderIds = [];
9740
9889
  this.releaseIds = [];
9890
+ this.reservationIds = [];
9741
9891
  this.triggerIds = [];
9742
- this.configurationIds = [];
9743
9892
  this.usernames = [];
9744
9893
  this.userProfiles = [];
9745
9894
  }
@@ -9767,6 +9916,15 @@ class $6998c6a53a9eb4fa$var$Fixtures {
9767
9916
  const json = await response.json();
9768
9917
  return json.key;
9769
9918
  }
9919
+ async addBlackout(name, from, to) {
9920
+ return this.doPost("calendar/blackouts", {
9921
+ label: name,
9922
+ startDate: from,
9923
+ endDate: to,
9924
+ type: "xlrelease.Blackout",
9925
+ id: null
9926
+ });
9927
+ }
9770
9928
  async addUser(username, password) {
9771
9929
  this.usernames.push(username);
9772
9930
  await this.doPost("fixtures/user", {