@digital-ai/devops-page-object-release 0.0.34 → 0.0.36

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,17 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.36
4
+
5
+ ### Patch Changes
6
+
7
+ - 73b32ce: Removed a repeated line in openContextMenuForTaskInGroup
8
+
9
+ ## 0.0.35
10
+
11
+ ### Patch Changes
12
+
13
+ - 90124a3: S-118788: Fixed pages as per review comments and flakiness of custom script
14
+
3
15
  ## 0.0.34
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1418,6 +1418,9 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
1418
1418
  await (0, $kKeXs$playwrighttest.expect)(createButton).not.toBeVisible();
1419
1419
  }
1420
1420
  async expectVariableWithNameValueAndType(name, value, type) {
1421
+ await this.page.locator(".variables-list .row-table").waitFor({
1422
+ timeout: 10000
1423
+ });
1421
1424
  const rowLocator = await this.page.locator(".variable .data-row").allTextContents();
1422
1425
  (0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(name);
1423
1426
  (0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(value);
@@ -1934,6 +1937,9 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1934
1937
  }).click();
1935
1938
  }
1936
1939
  async createNewVariableForField(objectID, variable) {
1940
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).waitFor({
1941
+ timeout: 10000
1942
+ });
1937
1943
  await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
1938
1944
  await this.page.locator(`#${objectID}`).fill(variable);
1939
1945
  await this.railLocator.locator(`.dot-popper button`, {
@@ -2471,6 +2477,7 @@ class $eb81c1b930e440ff$export$62811a109bb4377d extends (0, $f8721861c660dd88$ex
2471
2477
  await this.page.locator(`.map-data-row`).filter({
2472
2478
  has: this.page.locator(`.map-key`).getByText(key)
2473
2479
  }).locator(`.icon-delete`).click();
2480
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.map-data-row .map-key`).getByText(key)).not.toBeVisible();
2474
2481
  return this;
2475
2482
  }
2476
2483
  async expectStringMapCount(count) {
@@ -3236,6 +3243,15 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
3236
3243
  async expectRiskProfileTitleToBe(riskProfile) {
3237
3244
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator('[data-test="release-risk-profile"]')).toContainText(riskProfile);
3238
3245
  }
3246
+ async expectStartFromReleaseToBe(parentRelease) {
3247
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".started-from-release")).toHaveText(parentRelease);
3248
+ }
3249
+ async expectTemplateURLToBe(templateURL) {
3250
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator('[data-test="created-from-template"]').getAttribute("href")).toContain(templateURL);
3251
+ }
3252
+ async expectStartFromReleaseURLToBe(parentReleaseURL) {
3253
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".started-from-release").getAttribute("href")).toContain(parentReleaseURL);
3254
+ }
3239
3255
  }
3240
3256
 
3241
3257
 
@@ -3914,9 +3930,9 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3914
3930
  })).not.toBeVisible();
3915
3931
  }
3916
3932
  async toggleTaskFilter(filterOption) {
3917
- this.clickFilterOptions();
3933
+ await this.clickFilterOptions();
3918
3934
  await this.page.locator(`#filter-container #${filterOption}`).click();
3919
- this.clickFilterOptions();
3935
+ await this.clickFilterOptions();
3920
3936
  }
3921
3937
  async clickFilterOptions() {
3922
3938
  await this.page.locator("#release-header .dropdown-button").click();
@@ -4180,10 +4196,13 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
4180
4196
  async clickViewAllCompletedPhase() {
4181
4197
  await this.page.getByText("View all completed phases").click();
4182
4198
  }
4183
- async expectTaskToBePresent(taskName) {
4184
- await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
4199
+ async expectTaskToBePresent(taskName, visible = true) {
4200
+ if (visible) await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
4185
4201
  hasText: taskName
4186
4202
  })).toBeVisible();
4203
+ else await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
4204
+ hasText: taskName
4205
+ })).not.toBeVisible();
4187
4206
  }
4188
4207
  async expectContainingTask(taskName, exist = true) {
4189
4208
  const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
@@ -4211,13 +4230,26 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
4211
4230
  hasText: currentGroupType
4212
4231
  }).getByText(taskTitle)).toBeVisible();
4213
4232
  }
4214
- async openContextMenuForTaskInGroup(taskTitle, groupName) {
4233
+ async openContextMenuForTaskInGroup(groupName, taskTitle) {
4215
4234
  const taskLocator = this.phaseLocator.filter({
4216
4235
  hasText: groupName
4217
4236
  }).locator(".task").filter({
4218
4237
  hasText: taskTitle
4219
4238
  });
4220
- await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
4239
+ await taskLocator.locator(".task .context-menu-button").click();
4240
+ }
4241
+ async duplicateFromContextualMenuInGroup(groupName, taskTitle) {
4242
+ await this.openContextMenuForTaskInGroup(groupName, taskTitle);
4243
+ await this.page.locator(".dropdown-menu li").getByText("Duplicate").click();
4244
+ return this;
4245
+ }
4246
+ async deleteFromContextualMenuInGroup(groupName, taskTitle) {
4247
+ await this.openContextMenuForTaskInGroup(groupName, taskTitle);
4248
+ await this.page.locator(".dropdown-menu li").getByText("Delete").click();
4249
+ await this.page.getByRole("button", {
4250
+ name: "Delete"
4251
+ }).click();
4252
+ return this;
4221
4253
  }
4222
4254
  async duplicatePhase() {
4223
4255
  await this.phaseLocator.locator(".duplicate-phase").click();
@@ -5899,9 +5931,6 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
5899
5931
  }).click();
5900
5932
  await this.page.locator(".tl-event-title").getByText(release_title).scrollIntoViewIfNeeded();
5901
5933
  await this.page.locator(".tl-event-title").getByText(release_title).click();
5902
- await this.page.locator(".release-modal-container").waitFor({
5903
- state: "visible"
5904
- });
5905
5934
  const modalWindow = await this.page.locator(".release-modal-container").isVisible();
5906
5935
  if (!modalWindow) {
5907
5936
  await this.page.locator(".tl-event-title").getByText(release_title).scrollIntoViewIfNeeded();