@digital-ai/devops-page-object-release 0.0.28 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - 530ebfd: Migrated create-release-task-scenario cypress script to playwright
8
+ - d4c2287: S-117771: Support for prefill variable feature
9
+ - e8f2005: Migrated cypress script of dependencies-scenario into playwright
10
+
11
+ ## 0.0.29
12
+
13
+ ### Patch Changes
14
+
15
+ - 04c131c: S-115743 migrated template-details, phase-details, phase-delete scenarios
16
+ - 9eb4c0b: S-109217: Filter User
17
+
3
18
  ## 0.0.28
4
19
 
5
20
  ### Patch Changes
package/dist/main.js CHANGED
@@ -998,7 +998,7 @@ class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$ex
998
998
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable-editor .form-group")).toHaveCount(count);
999
999
  }
1000
1000
  async expectContainingVariable(variableName, value) {
1001
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`#form-${variableName} .text span`).textContent()).toBe(value);
1001
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#form-${variableName} .text span`)).toContainText(value);
1002
1002
  }
1003
1003
  async selectTemplate(templateName) {
1004
1004
  await this.page.getByPlaceholder("No template").click();
@@ -1012,6 +1012,7 @@ class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$ex
1012
1012
  async setValueForVariables(variableName, value) {
1013
1013
  await this.page.locator(`#form-${variableName} .display`).click();
1014
1014
  await this.page.locator(`input[name="${variableName}"]`).fill(value);
1015
+ await this.page.locator(`input[name="${variableName}"]`).blur();
1015
1016
  }
1016
1017
  async setVariable(variable, value) {
1017
1018
  await this.releaseForm.filter({
@@ -1020,6 +1021,34 @@ class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$ex
1020
1021
  await this.releaseForm.filter({
1021
1022
  hasText: variable
1022
1023
  }).locator("div[inline-text-editor] input").fill(value);
1024
+ await this.releaseForm.filter({
1025
+ hasText: variable
1026
+ }).locator("div[inline-text-editor] input").blur();
1027
+ }
1028
+ async resetVariableValues() {
1029
+ await this.page.locator("button", {
1030
+ hasText: "Reset to defaults"
1031
+ }).click();
1032
+ await this.page.locator("button", {
1033
+ hasText: "Reset variables"
1034
+ }).click();
1035
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("button", {
1036
+ hasText: "Reset to defaults"
1037
+ })).toBeDisabled();
1038
+ }
1039
+ async clickOnPrefillVariables() {
1040
+ await this.page.getByText("Pre-fill variable values from previous releases").click();
1041
+ }
1042
+ async selectPreviousRelease(releaseName) {
1043
+ await this.page.locator("button", {
1044
+ hasText: "Select release"
1045
+ }).click();
1046
+ await this.page.locator("a", {
1047
+ hasText: releaseName
1048
+ }).click();
1049
+ }
1050
+ async expectPrefillWarning(message) {
1051
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(message)).toBeVisible();
1023
1052
  }
1024
1053
  }
1025
1054
 
@@ -1034,7 +1063,39 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
1034
1063
  if (amount === 1) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
1035
1064
  timeout: 5000
1036
1065
  });
1037
- else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
1066
+ else (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
1067
+ }
1068
+ async expectReleaseStarted(releaseTitle) {
1069
+ const releaseStatus = this.page.locator(".release").filter({
1070
+ hasText: releaseTitle
1071
+ }).locator(".release-status").filter({
1072
+ hasText: "Planned"
1073
+ });
1074
+ await (0, $kKeXs$playwrighttest.expect)(releaseStatus).toBeVisible();
1075
+ }
1076
+ async expectReleaseStatusInProgress(releaseTitle) {
1077
+ const releaseStatus = this.page.locator(".release").filter({
1078
+ hasText: releaseTitle
1079
+ }).locator(".release-status").filter({
1080
+ hasText: "In progress"
1081
+ });
1082
+ await (0, $kKeXs$playwrighttest.expect)(releaseStatus).toBeVisible();
1083
+ }
1084
+ async expectReleaseAborted(releaseTitle) {
1085
+ const releaseStatus = this.page.locator(".release").filter({
1086
+ hasText: releaseTitle
1087
+ }).locator(".release-status").filter({
1088
+ hasText: "Aborted"
1089
+ });
1090
+ await (0, $kKeXs$playwrighttest.expect)(releaseStatus).toBeVisible();
1091
+ }
1092
+ async expectReleaseFailed(releaseTitle) {
1093
+ const releaseStatus = this.page.locator(".release").filter({
1094
+ hasText: releaseTitle
1095
+ }).locator(".release-status").filter({
1096
+ hasText: "Failed"
1097
+ });
1098
+ await (0, $kKeXs$playwrighttest.expect)(releaseStatus).toBeVisible();
1038
1099
  }
1039
1100
  async filterReleaseByAllStatus() {
1040
1101
  await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
@@ -1046,11 +1107,34 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
1046
1107
  }).click();
1047
1108
  return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
1048
1109
  }
1049
- async filterReleaseByTitle(releaseTitle) {
1110
+ async openSearchFilter() {
1050
1111
  await this.page.locator(".toggle-search-filter").click();
1051
- await this.page.locator(".searchFilter").fill(releaseTitle);
1052
- await this.page.locator(".searchFilter").press("Enter");
1053
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
1112
+ }
1113
+ async filterReleaseByTitle(releaseTitle) {
1114
+ const searchTitle = this.page.locator(".searchFilter");
1115
+ const searchCount = await searchTitle.count();
1116
+ if (searchCount == 0) {
1117
+ await this.openSearchFilter();
1118
+ await searchTitle.fill(releaseTitle);
1119
+ await searchTitle.press("Enter");
1120
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
1121
+ } else {
1122
+ await searchTitle.press("Enter");
1123
+ await searchTitle.fill(releaseTitle);
1124
+ await searchTitle.press("Enter");
1125
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
1126
+ }
1127
+ }
1128
+ async clearTitleFilter() {
1129
+ const search = await this.page.locator(".searchFilter").count();
1130
+ if (search == 0) {
1131
+ await this.openSearchFilter();
1132
+ await this.page.locator(".searchFilter").clear();
1133
+ await this.page.locator(".searchFilter").press("Enter");
1134
+ } else {
1135
+ await this.page.locator(".searchFilter").clear();
1136
+ await this.page.locator(".searchFilter").press("Enter");
1137
+ }
1054
1138
  }
1055
1139
  async createNewRelease(releaseName, description) {
1056
1140
  await this.releaseCreatePage.setName(releaseName);
@@ -1687,6 +1771,12 @@ class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$ex
1687
1771
  await this.saveButton.dblclick();
1688
1772
  await this.page.waitForTimeout(1000);
1689
1773
  }
1774
+ async expectPreconditionEditable() {
1775
+ await this.textEditor.isVisible();
1776
+ }
1777
+ async expectPreconditionNotEditable() {
1778
+ await this.textEditor.isHidden();
1779
+ }
1690
1780
  }
1691
1781
 
1692
1782
 
@@ -1783,7 +1873,7 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1783
1873
  return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
1784
1874
  }
1785
1875
  async setValueFromString(propertyName, value) {
1786
- await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
1876
+ await this.railLocator.locator(`input[name=${propertyName}]`).focus();
1787
1877
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
1788
1878
  }
1789
1879
  async setValueFromLargeString(propertyName, value) {
@@ -1793,37 +1883,76 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1793
1883
  async setValueFromPassword(propertyName, value) {
1794
1884
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
1795
1885
  }
1796
- async setAndCreateVariable(propertyName, variableName) {
1797
- await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
1798
- await this.railLocator.locator(`input[id="${propertyName}"]`).click();
1799
- await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
1886
+ async selectVariableFromOption(objectID, variable) {
1887
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
1888
+ await this.page.locator(`#${objectID}`).fill(variable);
1889
+ await this.page.getByRole("option", {
1890
+ name: variable
1891
+ }).click();
1892
+ }
1893
+ async createNewVariableForField(objectID, variable) {
1894
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
1895
+ await this.page.locator(`#${objectID}`).fill(variable);
1800
1896
  await this.railLocator.locator(`.dot-popper button`, {
1801
- hasText: variableName
1897
+ hasText: variable
1802
1898
  }).click();
1803
1899
  }
1804
- async setVariable(propertyName, variableName) {
1805
- await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
1900
+ async createReleaseIdInOutputProperties(propertyName, variableName) {
1901
+ await this.railLocator.locator(`#${propertyName}`).fill(variableName);
1902
+ await this.page.getByTestId("dot-action-item-btn").click();
1903
+ }
1904
+ async expectValueInOutputProperties(variableId, value, expected = true) {
1905
+ if (expected) {
1906
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`#${variableId}`)).toBeVisible();
1907
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`#${variableId}`)).toHaveValue(value);
1908
+ } else await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`#${variableId}`)).not.toBeVisible();
1909
+ }
1910
+ async selectReleaseIdInOutputProperties(propertyName, variableName) {
1911
+ await this.railLocator.locator(`#${propertyName}`).fill(variableName);
1912
+ await this.page.getByRole("option", {
1913
+ name: variableName
1914
+ }).click();
1806
1915
  }
1807
- async expectVariable(propertyName) {
1808
- await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).toBeVisible();
1916
+ async expectVariable(propertyName, expected = true) {
1917
+ if (expected) await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${propertyName}"]`).or(this.railLocator.locator(`textarea[id="${propertyName}"]`))).toBeVisible();
1918
+ else await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${propertyName}"]`).or(this.railLocator.locator(`textarea[id="${propertyName}"]`))).not.toBeVisible();
1919
+ }
1920
+ async expectAlertMessage(alertMessage) {
1921
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".warning .MuiAlert-message")).toHaveText(alertMessage);
1809
1922
  }
1810
1923
  async expectValueFromString(propertyName, propertyValue) {
1811
1924
  return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
1812
1925
  }
1926
+ async expectRiskProfileValue(value) {
1927
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator("#riskProfileId")).toHaveValue(value);
1928
+ }
1813
1929
  async expectTo(value) {
1814
1930
  return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByTestId(`dot-autocomplete-chip`)).toHaveText(value);
1815
1931
  }
1816
1932
  async expectSubjectToBe(value) {
1817
- return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#notification-subject").getAttribute("value")).toContain(value);
1933
+ return await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#notification-subject")).toHaveValue(value);
1818
1934
  }
1819
1935
  async expectBodyToBe(value) {
1820
1936
  return await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
1821
1937
  }
1938
+ async expectReleaseTitleToBe(value) {
1939
+ return await (0, $kKeXs$playwrighttest.expect)(this.page.locator("input[name=newReleaseTitle]")).toHaveValue(value);
1940
+ }
1822
1941
  async setBody(value) {
1823
1942
  await this.page.locator(".notification-body-field p").dblclick();
1824
1943
  await this.page.locator(".notification-body-field #notification-body").fill(value);
1825
1944
  await this.page.getByTestId(`save-button`).click();
1826
1945
  }
1946
+ async setReleaseTags(tags) {
1947
+ if (typeof tags !== "string") for (const tag of tags){
1948
+ await this.page.locator("#release-tags").fill(tag);
1949
+ await this.page.locator("#release-tags").press("Enter");
1950
+ }
1951
+ else {
1952
+ await this.page.locator("#release-tags").fill(tags);
1953
+ await this.page.locator("#release-tags").press("Enter");
1954
+ }
1955
+ }
1827
1956
  async setValueFromMap(propertyName, key, value) {
1828
1957
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
1829
1958
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
@@ -1867,6 +1996,16 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1867
1996
  hasText: dependencies[i]
1868
1997
  })).toBeVisible();
1869
1998
  }
1999
+ async expectDependencyStatus(option = true) {
2000
+ if (option) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".with-status .task-status")).toBeVisible();
2001
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".with-status .task-status")).not.toBeVisible();
2002
+ }
2003
+ async expectResolvedDependency() {
2004
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('span[aria-label="check-line icon"]')).toBeVisible();
2005
+ }
2006
+ async expectUnresolvedDependency() {
2007
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('span[aria-label="close-line icon"]')).not.toBeVisible();
2008
+ }
1870
2009
  async expectCanDeleteDependency(title, canDelete = true) {
1871
2010
  const depOptionsIcon = this.page.locator(".dependency").filter({
1872
2011
  has: this.page.getByRole("link", {
@@ -1882,6 +2021,27 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1882
2021
  })).toBeVisible();
1883
2022
  } else await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).not.toBeVisible();
1884
2023
  }
2024
+ async expectDependencyContextualMenu(option = true) {
2025
+ const depOptionsIcon = this.page.locator(".dependency .icon-options");
2026
+ if (option) await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).toBeVisible();
2027
+ else await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).not.toBeVisible();
2028
+ }
2029
+ async removeDependency(title) {
2030
+ const depOptionsIcon = this.page.locator(".dependency").filter({
2031
+ has: this.page.getByRole("link", {
2032
+ name: title,
2033
+ exact: true
2034
+ })
2035
+ }).locator(".icon-options");
2036
+ await depOptionsIcon.isVisible();
2037
+ await depOptionsIcon.click();
2038
+ await this.railLocator.getByRole("menuitem", {
2039
+ name: "Remove"
2040
+ }).click();
2041
+ }
2042
+ async expectDependencyNotToBeVisible() {
2043
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).not.toBeVisible();
2044
+ }
1885
2045
  async getDependencyCount() {
1886
2046
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
1887
2047
  return await this.railLocator.locator(".gate-task-dependencies .dependency").count();
@@ -1986,8 +2146,10 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1986
2146
  }).click();
1987
2147
  }
1988
2148
  async expectTemplate(template) {
1989
- const templateName = await this.page.locator("#templateId").getAttribute("value");
1990
- (0, $kKeXs$playwrighttest.expect)(templateName).toEqual(template);
2149
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator("#templateId")).toBeVisible({
2150
+ timeout: 10000
2151
+ });
2152
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator("#templateId")).toHaveValue(template);
1991
2153
  }
1992
2154
  async setAutoCompletePassword(passwordValue) {
1993
2155
  await this.page.getByTestId("password").getByLabel("Click to switch between").click();
@@ -2032,13 +2194,6 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2032
2194
  await this.page.locator("#endDate").click();
2033
2195
  await this.page.locator("#endDate").fill(date);
2034
2196
  }
2035
- async clickVariableButton(objectID, variableValue) {
2036
- await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
2037
- await this.page.locator(`#${objectID}`).fill(variableValue);
2038
- await this.page.getByRole("option", {
2039
- name: variableValue
2040
- }).click();
2041
- }
2042
2197
  async enableFallback() {
2043
2198
  await this.page.getByLabel("Fallback").check();
2044
2199
  }
@@ -2084,6 +2239,16 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2084
2239
  await this.page.getByTestId(`${fieldName}-input`).fill(fieldValue);
2085
2240
  await this.page.getByText(fieldValue).click();
2086
2241
  }
2242
+ async expectStartReleaseToBe(value) {
2243
+ return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator("#startRelease")).toHaveValue(value);
2244
+ }
2245
+ async setStartReleaseVariable(value) {
2246
+ await this.railLocator.locator("#startRelease").click();
2247
+ await this.railLocator.locator("#startRelease").fill(value);
2248
+ }
2249
+ async close() {
2250
+ await this.page.locator("task-drawer .dot-drawer .task-drawer-header").getByTestId("close-btn").click();
2251
+ }
2087
2252
  }
2088
2253
  class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2089
2254
  constructor(page){
@@ -2435,6 +2600,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2435
2600
  async expectStartDateToBeDisplayed() {
2436
2601
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
2437
2602
  }
2603
+ async expectStartDayToBeInAvatar(expectedDay) {
2604
+ const startDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(0);
2605
+ const startDay = await startDayAvatar.locator("..").locator("h3").textContent();
2606
+ (0, $kKeXs$playwrighttest.expect)(startDay?.trim()).toBe(expectedDay);
2607
+ }
2608
+ async expectEndDayToBeInAvatar(expectedDay) {
2609
+ const endDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(1);
2610
+ const endDay = await endDayAvatar.locator("..").locator("h3").textContent();
2611
+ (0, $kKeXs$playwrighttest.expect)(endDay?.trim()).toBe(expectedDay);
2612
+ }
2438
2613
  async expectEndDateToBeDisplayed() {
2439
2614
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
2440
2615
  }
@@ -2864,6 +3039,15 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
2864
3039
  async expectOwnerToBe(user) {
2865
3040
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-owner")).toContainText(user);
2866
3041
  }
3042
+ async expectReleaseTaggedWith(tagName) {
3043
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#tags")).toContainText(tagName);
3044
+ }
3045
+ async expectTemplateTitleToBe(templateTitle) {
3046
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('[data-test="created-from-template"]')).toContainText(templateTitle);
3047
+ }
3048
+ async expectRiskProfileTitleToBe(riskProfile) {
3049
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('[data-test="release-risk-profile"]')).toContainText(riskProfile);
3050
+ }
2867
3051
  }
2868
3052
 
2869
3053
 
@@ -3216,6 +3400,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3216
3400
  getPhase(phaseName) {
3217
3401
  return new $9b9a8c3da392d020$var$Phase(this.page, phaseName);
3218
3402
  }
3403
+ async expectPhaseCountToBe(expectedPhaseCount) {
3404
+ const phaseCount = await this.page.locator(".phase").count();
3405
+ (0, $kKeXs$playwrighttest.expect)(phaseCount).toBe(expectedPhaseCount);
3406
+ }
3407
+ async expectVariableToBeFound(variableName) {
3408
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`span.variable:has-text("${variableName}")`)).toHaveCount(1);
3409
+ }
3219
3410
  async expectNotFlagged() {
3220
3411
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flag-none-icon")).toBeHidden();
3221
3412
  }
@@ -3316,6 +3507,11 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3316
3507
  timeout: timeout
3317
3508
  });
3318
3509
  }
3510
+ async clickOnStatusLine(statusLine) {
3511
+ await this.page.locator(".task .status-line a").getByText(statusLine, {
3512
+ exact: true
3513
+ }).click();
3514
+ }
3319
3515
  async expectTaskCompletedInAdvance(taskTitle) {
3320
3516
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content .completed_in_advance .task-title").filter({
3321
3517
  hasText: taskTitle
@@ -3437,11 +3633,19 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3437
3633
  await this.page.locator(".progress-status-and-percentage").waitFor({
3438
3634
  timeout: 10000
3439
3635
  });
3440
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
3636
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".progress-status-and-percentage")).toHaveText("Aborted");
3441
3637
  }
3442
3638
  async expectInProgressStatusToBePresent() {
3443
- await this.page.getByTestId("refresh-btn").click();
3444
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("In progress");
3639
+ await this.page.locator(".release-status").waitFor({
3640
+ timeout: 10000
3641
+ });
3642
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-status")).toHaveText("In progress");
3643
+ }
3644
+ async expectFailedStatusToBePresent() {
3645
+ await this.page.locator(".progress-status-and-percentage").waitFor({
3646
+ timeout: 10000
3647
+ });
3648
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".progress-status-and-percentage")).toHaveText("Failed0%");
3445
3649
  }
3446
3650
  async openTableView() {
3447
3651
  await this.util.openSideNavMenu("Table");
@@ -3583,12 +3787,13 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3583
3787
  }
3584
3788
  async isMenuItemDisabled(menuName, taskTitle) {
3585
3789
  await this.openContextMenuForTask(taskTitle);
3586
- await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
3587
- hasText: menuName
3588
- })).toHaveClass(/disabled/);
3589
- await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
3790
+ const menuItem = this.contextMenuButton.filter({
3590
3791
  hasText: menuName
3591
- }).locator("a")).toBeDisabled();
3792
+ });
3793
+ await (0, $kKeXs$playwrighttest.expect)(menuItem).toHaveClass(/disabled/);
3794
+ const anchorTag = menuItem.locator("a");
3795
+ const disabledAttribute = await anchorTag.getAttribute("disabled");
3796
+ (0, $kKeXs$playwrighttest.expect)(disabledAttribute).not.toBeNull();
3592
3797
  await this.closeContextMenu();
3593
3798
  }
3594
3799
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
@@ -3753,6 +3958,51 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3753
3958
  hasText: taskName
3754
3959
  })).toBeVisible();
3755
3960
  }
3961
+ async expectContainingTask(taskName, exist = true) {
3962
+ const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
3963
+ hasText: taskName
3964
+ });
3965
+ if (exist) await (0, $kKeXs$playwrighttest.expect)(taskHeaderLocator).toContainText(taskName);
3966
+ else await (0, $kKeXs$playwrighttest.expect)(taskHeaderLocator).not.toContainText(taskName);
3967
+ }
3968
+ // eslint-disable-next-line max-params
3969
+ async addTaskInGroup(currentGroupType, taskTitle, taskGroup, taskType) {
3970
+ const groupTaskLocator = this.phaseLocator.filter({
3971
+ hasText: "Dev.Phase"
3972
+ }).locator("li").filter({
3973
+ hasText: currentGroupType
3974
+ }).locator("a.add-task.link");
3975
+ await groupTaskLocator.click();
3976
+ await this.page.locator("#task-selector").hover();
3977
+ await this.page.locator('button[aria-label="Clear"]').click();
3978
+ await this.page.locator("#task-selector").fill(taskGroup);
3979
+ await this.page.getByTestId(taskType).click();
3980
+ await this.page.locator(".icon-close").click();
3981
+ await this.page.locator("#task-title").fill(taskTitle);
3982
+ await this.page.getByTestId("save-select-task-btn").click();
3983
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.filter({
3984
+ hasText: currentGroupType
3985
+ }).getByText(taskTitle)).toBeVisible();
3986
+ }
3987
+ async openContextMenuForTaskInGroup(taskTitle, groupName) {
3988
+ const taskLocator = this.phaseLocator.filter({
3989
+ hasText: groupName
3990
+ }).locator(".task").filter({
3991
+ hasText: taskTitle
3992
+ });
3993
+ await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
3994
+ }
3995
+ async duplicatePhase() {
3996
+ await this.phaseLocator.locator(".duplicate-phase").click();
3997
+ }
3998
+ async expectActionsDisabled() {
3999
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".duplicate-phase")).toHaveCount(0);
4000
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".delete-phase")).toHaveCount(0);
4001
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .duplicate-task")).toHaveCount(0);
4002
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .delete-task")).toHaveCount(0);
4003
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task-generator .add-task")).toHaveCount(0);
4004
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".display")).toHaveCount(0);
4005
+ }
3756
4006
  }
3757
4007
  class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
3758
4008
  constructor(page){
@@ -5011,15 +5261,21 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
5011
5261
  await this.modal.setConfirmPassword(password);
5012
5262
  await this.modal.save();
5013
5263
  }
5264
+ async filterUser(username) {
5265
+ await this.page.getByPlaceholder("Filter...").fill(username);
5266
+ }
5267
+ async expectToHaveFilteredUser(username) {
5268
+ return await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
5269
+ name: "" + username + ""
5270
+ })).toBeVisible();
5271
+ }
5014
5272
  async expectToHaveLoginPermission(username) {
5015
5273
  return await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
5016
5274
  name: "" + username + ""
5017
5275
  }).getByRole("checkbox")).toBeChecked();
5018
5276
  }
5019
5277
  async deleteUser(username) {
5020
- await this.page.getByRole("row", {
5021
- name: "" + username + ""
5022
- }).locator("i").nth(1).click();
5278
+ await this.page.getByTestId(`delete-btn-${username}`).click();
5023
5279
  await this.modal.delete();
5024
5280
  }
5025
5281
  async openRoles() {
@@ -7420,6 +7676,9 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
7420
7676
  await this.page.goto("./#/configuration");
7421
7677
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
7422
7678
  }
7679
+ async clickOnPrimaryLogo() {
7680
+ await this.page.getByTestId("primary-logo").click();
7681
+ }
7423
7682
  }
7424
7683
 
7425
7684