@digital-ai/devops-page-object-release 0.0.13 → 0.0.14
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 +7 -0
- package/dist/main.js +506 -6
- package/dist/main.js.map +1 -1
- package/dist/module.js +506 -6
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +117 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @digital-ai/devops-page-object-release
|
|
2
2
|
|
|
3
|
+
## 0.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 282b6b1: Methods are added in existing pages related to cypress script task-drawer scenario
|
|
8
|
+
- 7fcada5: Pages for template feature respect to migrated template test script
|
|
9
|
+
|
|
3
10
|
## 0.0.13
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var $kKeXs$playwrighttest = require("@playwright/test");
|
|
2
2
|
var $kKeXs$child_process = require("child_process");
|
|
3
3
|
var $kKeXs$process = require("process");
|
|
4
|
+
var $kKeXs$fs = require("fs");
|
|
5
|
+
var $kKeXs$moment = require("moment");
|
|
4
6
|
|
|
5
7
|
var $parcel$global =
|
|
6
8
|
typeof globalThis !== 'undefined'
|
|
@@ -951,6 +953,7 @@ $edb0b0405039996a$exports = $edb0b0405039996a$var$isNil;
|
|
|
951
953
|
|
|
952
954
|
|
|
953
955
|
|
|
956
|
+
|
|
954
957
|
class $f8721861c660dd88$export$2b65d1d97338f32b {
|
|
955
958
|
constructor(page){
|
|
956
959
|
this.page = page;
|
|
@@ -1513,6 +1516,17 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1513
1516
|
async expectTaskTitle(taskTitle) {
|
|
1514
1517
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
|
|
1515
1518
|
}
|
|
1519
|
+
async expectTypeToContain(taskType) {
|
|
1520
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-type").innerText()).toContain(taskType);
|
|
1521
|
+
}
|
|
1522
|
+
async clickExpand() {
|
|
1523
|
+
await this.page.locator(".icon-fullscreen-enter").click();
|
|
1524
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-fullscreen-enter")).not.toBeVisible();
|
|
1525
|
+
}
|
|
1526
|
+
async clickShrink() {
|
|
1527
|
+
await this.page.locator(".icon-fullscreen-exit").click();
|
|
1528
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-fullscreen-exit")).not.toBeVisible();
|
|
1529
|
+
}
|
|
1516
1530
|
}
|
|
1517
1531
|
|
|
1518
1532
|
|
|
@@ -1563,6 +1577,11 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
1563
1577
|
name: "Reset"
|
|
1564
1578
|
}).click();
|
|
1565
1579
|
}
|
|
1580
|
+
async expectWithAttachment(filename) {
|
|
1581
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".attachments tr td a").filter({
|
|
1582
|
+
hasText: filename
|
|
1583
|
+
})).toBeVisible();
|
|
1584
|
+
}
|
|
1566
1585
|
}
|
|
1567
1586
|
|
|
1568
1587
|
|
|
@@ -1646,6 +1665,18 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1646
1665
|
}).click();
|
|
1647
1666
|
return this.taskDrawer;
|
|
1648
1667
|
}
|
|
1668
|
+
async openTaskDrawerFromTableView(taskName) {
|
|
1669
|
+
await this.page.locator(".name-cell-title").getByText(taskName, {
|
|
1670
|
+
exact: true
|
|
1671
|
+
}).click();
|
|
1672
|
+
return this.taskDrawer;
|
|
1673
|
+
}
|
|
1674
|
+
async openTaskDrawerFromGrantt(taskName) {
|
|
1675
|
+
await this.page.locator(".gantt_tree_content").getByText(taskName, {
|
|
1676
|
+
exact: true
|
|
1677
|
+
}).dblclick();
|
|
1678
|
+
return this.taskDrawer;
|
|
1679
|
+
}
|
|
1649
1680
|
async openVariables() {
|
|
1650
1681
|
await this.openReleaseMenu("Variables");
|
|
1651
1682
|
}
|
|
@@ -1705,6 +1736,24 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1705
1736
|
async backToRelease() {
|
|
1706
1737
|
await this.page.locator(".icon-back").click();
|
|
1707
1738
|
}
|
|
1739
|
+
async openTableView() {
|
|
1740
|
+
await this.page.locator(".xl-icon.table-icon").click();
|
|
1741
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
1742
|
+
}
|
|
1743
|
+
async openPlannerView() {
|
|
1744
|
+
await this.page.locator(".xl-icon.planner-icon").click();
|
|
1745
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
|
|
1746
|
+
}
|
|
1747
|
+
async expandGanttFolder() {
|
|
1748
|
+
const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
|
|
1749
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
1750
|
+
const blnVal = await element.isVisible();
|
|
1751
|
+
if (blnVal) {
|
|
1752
|
+
await element.click();
|
|
1753
|
+
await this.expandGanttFolder();
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1708
1757
|
}
|
|
1709
1758
|
class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1710
1759
|
constructor(page, phaseName){
|
|
@@ -1751,6 +1800,11 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
1751
1800
|
async expectToHaveTitle(phaseTitle) {
|
|
1752
1801
|
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
|
|
1753
1802
|
}
|
|
1803
|
+
async expectTemplateLabelNotToBePresent() {
|
|
1804
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
|
|
1805
|
+
hasText: "TEMPLATE"
|
|
1806
|
+
})).not.toBeVisible();
|
|
1807
|
+
}
|
|
1754
1808
|
}
|
|
1755
1809
|
|
|
1756
1810
|
|
|
@@ -1857,7 +1911,6 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
|
|
|
1857
1911
|
constructor(page){
|
|
1858
1912
|
super(page);
|
|
1859
1913
|
this.page = page;
|
|
1860
|
-
this.newUserButton = this.page.getByTestId("new-user-btn");
|
|
1861
1914
|
this.modal = new (0, $bb5572a48b31014a$export$e2e2e1ffdce20c30)(page);
|
|
1862
1915
|
}
|
|
1863
1916
|
async openUsersPage() {
|
|
@@ -1874,7 +1927,7 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
|
|
|
1874
1927
|
}).locator(".Mui-checked")).toBeChecked();
|
|
1875
1928
|
}
|
|
1876
1929
|
async addUser() {
|
|
1877
|
-
await this.
|
|
1930
|
+
await this.page.locator(".new-user-btn").click();
|
|
1878
1931
|
}
|
|
1879
1932
|
async createUser(username, password) {
|
|
1880
1933
|
await this.modal.setUserName(username);
|
|
@@ -2143,6 +2196,419 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
|
|
|
2143
2196
|
|
|
2144
2197
|
|
|
2145
2198
|
|
|
2199
|
+
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2203
|
+
constructor(page){
|
|
2204
|
+
super(page);
|
|
2205
|
+
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2206
|
+
}
|
|
2207
|
+
async openTask(taskName) {
|
|
2208
|
+
await this.filterTaskByTitle(taskName);
|
|
2209
|
+
await this.page.getByText(taskName).click();
|
|
2210
|
+
}
|
|
2211
|
+
async filterTaskByTitle(taskname) {
|
|
2212
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
2213
|
+
await this.page.locator(".searchFilter").fill(taskname);
|
|
2214
|
+
await this.page.locator(".searchFilter").press("Enter");
|
|
2215
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("//div[@data-task-title]").filter({
|
|
2216
|
+
hasText: taskname
|
|
2217
|
+
})).toBeVisible();
|
|
2218
|
+
}
|
|
2219
|
+
async filterTasksByTag(tag, taskTitleForValidation) {
|
|
2220
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
2221
|
+
await this.page.locator(".tag-input").fill(tag);
|
|
2222
|
+
await this.page.locator(".tag-input").press("Enter");
|
|
2223
|
+
//TODO: Validation can be changed based on actual test case implementation
|
|
2224
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("//div[@data-task-title]").filter({
|
|
2225
|
+
hasText: taskTitleForValidation
|
|
2226
|
+
})).toBeVisible();
|
|
2227
|
+
}
|
|
2228
|
+
async filterTasksByReleaseTitle(releaseTitle) {
|
|
2229
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
2230
|
+
await this.page.locator(".release-input").fill(releaseTitle);
|
|
2231
|
+
await this.page.locator(".release-input").press("Enter");
|
|
2232
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".group-title").filter({
|
|
2233
|
+
hasText: releaseTitle
|
|
2234
|
+
})).toBeVisible();
|
|
2235
|
+
}
|
|
2236
|
+
async openSingleTask(taskId, showDetails = false) {
|
|
2237
|
+
await this.page.goto(`./#/tasks/${taskId}?showDetails=${showDetails}`);
|
|
2238
|
+
}
|
|
2239
|
+
async expectReleaseLinksDisplayed(releaseTitle, displayed = true) {
|
|
2240
|
+
if (displayed) {
|
|
2241
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2242
|
+
name: "" + releaseTitle + ""
|
|
2243
|
+
})).toBeVisible();
|
|
2244
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".view-in-release")).toBeVisible();
|
|
2245
|
+
} else {
|
|
2246
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2247
|
+
name: "" + releaseTitle + ""
|
|
2248
|
+
})).not.toBeVisible();
|
|
2249
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".view-in-release")).not.toBeVisible();
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
async expectTaskTitle(taskTitle) {
|
|
2253
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
|
|
2260
|
+
class $4efca3d4eadf892b$export$6adb8dd3f0d1e432 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2261
|
+
constructor(page){
|
|
2262
|
+
super(page);
|
|
2263
|
+
this.tempDir = "";
|
|
2264
|
+
this.content = "";
|
|
2265
|
+
}
|
|
2266
|
+
async createTempFile(fileName, testInfo) {
|
|
2267
|
+
const content = fileName.toString();
|
|
2268
|
+
const tempDir = testInfo.outputPath(fileName.toString());
|
|
2269
|
+
$kKeXs$fs.promises.writeFile(tempDir, content, "utf8");
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
class $f4ca0e32f2cf5291$export$ccf2756779bad715 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2281
|
+
constructor(page){
|
|
2282
|
+
super(page);
|
|
2283
|
+
}
|
|
2284
|
+
async getAttachmentsListCount() {
|
|
2285
|
+
return await this.page.locator(".attachments tr").count();
|
|
2286
|
+
}
|
|
2287
|
+
async uploadFile(filePath) {
|
|
2288
|
+
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
2289
|
+
await this.page.locator('input[type="file"]').click();
|
|
2290
|
+
const fileChooser = await fileChooserPromise;
|
|
2291
|
+
await fileChooser.setFiles(filePath);
|
|
2292
|
+
}
|
|
2293
|
+
async expectWithAttachment(filename) {
|
|
2294
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".attachments tr td a").filter({
|
|
2295
|
+
hasText: filename
|
|
2296
|
+
})).toBeVisible();
|
|
2297
|
+
}
|
|
2298
|
+
async expectWithNoAttachment(filename) {
|
|
2299
|
+
const test = await this.page.locator(".attachments").isVisible();
|
|
2300
|
+
if (test) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".attachments tr td a").filter({
|
|
2301
|
+
hasText: filename
|
|
2302
|
+
})).not.toBeVisible();
|
|
2303
|
+
}
|
|
2304
|
+
async downloadFile(filename) {
|
|
2305
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2306
|
+
const downloadPromise1 = this.page.waitForEvent("download");
|
|
2307
|
+
await this.page.getByText(filename).click();
|
|
2308
|
+
const download = await downloadPromise1;
|
|
2309
|
+
// Wait for the download process to complete and save the downloaded file in given path.
|
|
2310
|
+
await download.saveAs("./core/xlr-ui/build/playwright/" + download.suggestedFilename());
|
|
2311
|
+
(0, $kKeXs$playwrighttest.expect)(download.suggestedFilename()).toBe(filename);
|
|
2312
|
+
}
|
|
2313
|
+
async deleteAttachment(fileName) {
|
|
2314
|
+
await this.page.getByRole("row", {
|
|
2315
|
+
name: fileName
|
|
2316
|
+
}).locator("span").click();
|
|
2317
|
+
await this.page.getByText("Remove").click();
|
|
2318
|
+
}
|
|
2319
|
+
async save() {
|
|
2320
|
+
await this.page.getByRole("button", {
|
|
2321
|
+
name: "Save"
|
|
2322
|
+
}).click({
|
|
2323
|
+
timeout: 8000
|
|
2324
|
+
});
|
|
2325
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
|
|
2326
|
+
}
|
|
2327
|
+
async reset() {
|
|
2328
|
+
await this.page.getByRole("button", {
|
|
2329
|
+
name: "Reset"
|
|
2330
|
+
}).waitFor();
|
|
2331
|
+
await this.page.getByRole("button", {
|
|
2332
|
+
name: "Reset"
|
|
2333
|
+
}).click();
|
|
2334
|
+
}
|
|
2335
|
+
async removeDueDate() {
|
|
2336
|
+
await this.page.locator(".due-date .close-icon").click();
|
|
2337
|
+
}
|
|
2338
|
+
async setScheduledStartDate(date, monthYear) {
|
|
2339
|
+
await this.page.locator(`.scheduled-start-date .date`).click();
|
|
2340
|
+
const prev = this.page.locator(".datepicker-days .prev");
|
|
2341
|
+
const next = this.page.locator(".datepicker-days .next");
|
|
2342
|
+
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
2343
|
+
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore();
|
|
2344
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
2345
|
+
else await next.click();
|
|
2346
|
+
await this.page.getByRole("cell", {
|
|
2347
|
+
name: "" + date + ""
|
|
2348
|
+
}).first().click();
|
|
2349
|
+
}
|
|
2350
|
+
async setDuration(days, hours, mins) {
|
|
2351
|
+
await this.page.locator(".duration-editor").click();
|
|
2352
|
+
if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
|
|
2353
|
+
if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
|
|
2354
|
+
if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
|
|
2355
|
+
}
|
|
2356
|
+
async expectScheduledStartDateToBe(date) {
|
|
2357
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toBe(date);
|
|
2358
|
+
}
|
|
2359
|
+
async expectDueDateToBe(date) {
|
|
2360
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .date-editor .date > .light-text").getAttribute("value")).toContain(date);
|
|
2361
|
+
}
|
|
2362
|
+
async expectedDueDateTime(time) {
|
|
2363
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .date-editor .time-picker-holder input").getAttribute("value")).toContain(time);
|
|
2364
|
+
}
|
|
2365
|
+
async expectDurationToBe(duration) {
|
|
2366
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
2367
|
+
}
|
|
2368
|
+
async setUsername(username) {
|
|
2369
|
+
await this.page.locator(".script-username").click();
|
|
2370
|
+
await this.page.locator("user-input-with-variable").getByLabel("*").fill(username);
|
|
2371
|
+
await this.page.locator("user-input-with-variable").press("Enter");
|
|
2372
|
+
}
|
|
2373
|
+
async setPassword(password) {
|
|
2374
|
+
await this.page.locator(".field > .display").click();
|
|
2375
|
+
await this.page.locator('input[name="scriptUserPassword"]').fill(password);
|
|
2376
|
+
await this.page.locator('input[name="scriptUserPassword"]').press("Enter");
|
|
2377
|
+
}
|
|
2378
|
+
async expectScriptUsernameToBe(username) {
|
|
2379
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".script-username").textContent()).toContain(username);
|
|
2380
|
+
}
|
|
2381
|
+
async expectScriptUserPasswordToBe(password) {
|
|
2382
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator('span[name="scriptUserPassword"]').textContent()).toContain(password);
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
class $3048f12d9d777352$export$98de9bca7d44fc1a extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2389
|
+
constructor(page){
|
|
2390
|
+
super(page);
|
|
2391
|
+
}
|
|
2392
|
+
async setName(name) {
|
|
2393
|
+
await this.page.locator("#release-form-title").fill(name);
|
|
2394
|
+
}
|
|
2395
|
+
async setDescription(description) {
|
|
2396
|
+
await this.page.getByText("Set description...").click();
|
|
2397
|
+
await this.page.locator("span").filter({
|
|
2398
|
+
hasText: "Set description... * Save"
|
|
2399
|
+
}).locator("i").first().click();
|
|
2400
|
+
await this.page.locator("textarea").click();
|
|
2401
|
+
await this.page.locator("textarea").fill(description);
|
|
2402
|
+
await this.page.getByText("Save", {
|
|
2403
|
+
exact: true
|
|
2404
|
+
}).click();
|
|
2405
|
+
}
|
|
2406
|
+
async create() {
|
|
2407
|
+
await this.page.getByRole("button", {
|
|
2408
|
+
name: "Create"
|
|
2409
|
+
}).click();
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
|
|
2416
|
+
class $b12db2561a3bf785$export$899a7095bab1879d extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2417
|
+
constructor(page){
|
|
2418
|
+
super(page);
|
|
2419
|
+
}
|
|
2420
|
+
async expectAllowConcurrentReleasesFromTrigger(expectedValue) {
|
|
2421
|
+
if (expectedValue) {
|
|
2422
|
+
await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
|
|
2423
|
+
timeout: 3000
|
|
2424
|
+
});
|
|
2425
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Enabled");
|
|
2426
|
+
} else {
|
|
2427
|
+
await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
|
|
2428
|
+
timeout: 3000
|
|
2429
|
+
});
|
|
2430
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Disabled");
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
async setAllowConcurrentReleasesFromTriggerAndSubmit(checked) {
|
|
2434
|
+
const result = await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
|
|
2435
|
+
timeout: 3000
|
|
2436
|
+
});
|
|
2437
|
+
if (result === "Enabled" && checked === false || result == "Disabled" && checked === true) await this.page.locator('form[name="releaseTriggerOptions"] label[for="cb"]').click();
|
|
2438
|
+
}
|
|
2439
|
+
async expectTriggersVisible(amount) {
|
|
2440
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".xlr-trigger-row .trigger-row-content")).toHaveCount(amount);
|
|
2441
|
+
}
|
|
2442
|
+
async expectNoNewTriggerButtonShown() {
|
|
2443
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".trigger-header a.button.primary")).not.toBeVisible();
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
|
|
2448
|
+
class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2449
|
+
constructor(page){
|
|
2450
|
+
super(page);
|
|
2451
|
+
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2452
|
+
this.properties = new (0, $f4ca0e32f2cf5291$export$ccf2756779bad715)(page);
|
|
2453
|
+
this.createTemplatePage = new (0, $3048f12d9d777352$export$98de9bca7d44fc1a)(page);
|
|
2454
|
+
this.triggers = new (0, $b12db2561a3bf785$export$899a7095bab1879d)(page);
|
|
2455
|
+
}
|
|
2456
|
+
async openTemplateMenu(menuItem) {
|
|
2457
|
+
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
2458
|
+
exact: true
|
|
2459
|
+
}).click();
|
|
2460
|
+
}
|
|
2461
|
+
async openTaskDrawer(taskName) {
|
|
2462
|
+
await this.page.getByText(taskName, {
|
|
2463
|
+
exact: true
|
|
2464
|
+
}).click();
|
|
2465
|
+
return this.taskDrawer;
|
|
2466
|
+
}
|
|
2467
|
+
async openTaskDrawerFromGrantt(taskName) {
|
|
2468
|
+
await this.page.locator(".gantt_tree_content").getByText(taskName, {
|
|
2469
|
+
exact: true
|
|
2470
|
+
}).dblclick();
|
|
2471
|
+
return this.taskDrawer;
|
|
2472
|
+
}
|
|
2473
|
+
async openProperties() {
|
|
2474
|
+
await this.openTemplateMenu("Properties");
|
|
2475
|
+
}
|
|
2476
|
+
async openTriggers() {
|
|
2477
|
+
await this.openTemplateMenu("Triggers");
|
|
2478
|
+
}
|
|
2479
|
+
async backToTemplate() {
|
|
2480
|
+
await this.page.locator(".icon-back").click();
|
|
2481
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
|
|
2482
|
+
}
|
|
2483
|
+
async expectTemplateLabelToBePresent() {
|
|
2484
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
|
|
2485
|
+
hasText: "TEMPLATE"
|
|
2486
|
+
})).toBeVisible();
|
|
2487
|
+
}
|
|
2488
|
+
async expectSubPage(menuItem, toBePresent) {
|
|
2489
|
+
if (toBePresent) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
2490
|
+
exact: true
|
|
2491
|
+
})).toBeVisible();
|
|
2492
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
2493
|
+
exact: true
|
|
2494
|
+
})).not.toBeVisible();
|
|
2495
|
+
}
|
|
2496
|
+
async openFlowView() {
|
|
2497
|
+
await this.page.locator(".xl-icon.column-icon").click();
|
|
2498
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content")).toBeVisible();
|
|
2499
|
+
}
|
|
2500
|
+
async openTableView() {
|
|
2501
|
+
await this.page.locator(".xl-icon.table-icon").click();
|
|
2502
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
2503
|
+
}
|
|
2504
|
+
async openPlannerView() {
|
|
2505
|
+
await this.page.locator(".xl-icon.planner-icon").click();
|
|
2506
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
|
|
2507
|
+
}
|
|
2508
|
+
async openCodeView() {
|
|
2509
|
+
await this.page.locator(".xl-icon.code-icon").click();
|
|
2510
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dsl-content")).toBeVisible();
|
|
2511
|
+
}
|
|
2512
|
+
async expandGanttFolder() {
|
|
2513
|
+
const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
|
|
2514
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
2515
|
+
const blnVal = await element.isVisible();
|
|
2516
|
+
if (blnVal) {
|
|
2517
|
+
await element.click();
|
|
2518
|
+
await this.expandGanttFolder();
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2528
|
+
constructor(page){
|
|
2529
|
+
super(page);
|
|
2530
|
+
}
|
|
2531
|
+
async openTemplatesList(filter) {
|
|
2532
|
+
let url = "/templates";
|
|
2533
|
+
if (filter) url += `?has_filter&filter=${filter}`;
|
|
2534
|
+
await this.page.goto(url);
|
|
2535
|
+
}
|
|
2536
|
+
async searchBy(criteria) {
|
|
2537
|
+
await this.page.locator(".searchFilter").clear();
|
|
2538
|
+
await this.page.locator(".searchFilter").fill(criteria);
|
|
2539
|
+
}
|
|
2540
|
+
async copy(originTitle, targetTitle) {
|
|
2541
|
+
await this.page.locator(".title").filter({
|
|
2542
|
+
hasText: originTitle
|
|
2543
|
+
}).locator(".copy").click();
|
|
2544
|
+
await this.page.getByLabel("Template name").clear();
|
|
2545
|
+
await this.page.getByLabel("Template name").fill(targetTitle);
|
|
2546
|
+
await this.page.getByLabel("Description").clear();
|
|
2547
|
+
await this.page.getByLabel("Description").fill("description");
|
|
2548
|
+
await this.page.getByRole("button", {
|
|
2549
|
+
name: "Continue"
|
|
2550
|
+
}).click();
|
|
2551
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
|
|
2552
|
+
hasText: "TEMPLATE"
|
|
2553
|
+
})).toBeVisible();
|
|
2554
|
+
}
|
|
2555
|
+
async expectTemplateVisible(title, expected = true) {
|
|
2556
|
+
if (expected) {
|
|
2557
|
+
await this.page.locator(".template").filter({
|
|
2558
|
+
hasText: title
|
|
2559
|
+
}).waitFor();
|
|
2560
|
+
(0, $kKeXs$playwrighttest.expect)(this.page.locator(".template").filter({
|
|
2561
|
+
hasText: title
|
|
2562
|
+
})).toBeVisible();
|
|
2563
|
+
} else {
|
|
2564
|
+
await this.page.locator(".template").filter({
|
|
2565
|
+
hasText: title
|
|
2566
|
+
}).waitFor();
|
|
2567
|
+
(0, $kKeXs$playwrighttest.expect)(this.page.locator(".template").filter({
|
|
2568
|
+
hasText: title
|
|
2569
|
+
})).not.toBeVisible();
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
async delete(title) {
|
|
2573
|
+
await this.page.locator(".title").filter({
|
|
2574
|
+
hasText: title
|
|
2575
|
+
}).locator(".delete").waitFor();
|
|
2576
|
+
await this.page.locator(".title").filter({
|
|
2577
|
+
hasText: title
|
|
2578
|
+
}).locator(".delete").click();
|
|
2579
|
+
await this.page.getByRole("button", {
|
|
2580
|
+
name: "Delete"
|
|
2581
|
+
}).click();
|
|
2582
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".title").filter({
|
|
2583
|
+
hasText: title
|
|
2584
|
+
})).not.toBeVisible();
|
|
2585
|
+
}
|
|
2586
|
+
async clickCreateNewTemplate() {
|
|
2587
|
+
await this.page.getByTestId("dot-button").click();
|
|
2588
|
+
await this.page.getByRole("menuitem", {
|
|
2589
|
+
name: "Create new template"
|
|
2590
|
+
}).click();
|
|
2591
|
+
}
|
|
2592
|
+
async openTemplateByName(templateName) {
|
|
2593
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
2594
|
+
exact: true
|
|
2595
|
+
}).click();
|
|
2596
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
2597
|
+
exact: true
|
|
2598
|
+
}).fill(templateName);
|
|
2599
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
2600
|
+
exact: true
|
|
2601
|
+
}).press("Enter");
|
|
2602
|
+
await this.page.locator(`.template`).filter({
|
|
2603
|
+
hasText: templateName
|
|
2604
|
+
}).locator(`.raised-link`).waitFor();
|
|
2605
|
+
await this.page.locator(`.template`).filter({
|
|
2606
|
+
hasText: templateName
|
|
2607
|
+
}).locator(`.raised-link`).click();
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
|
|
2146
2612
|
class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
2147
2613
|
constructor(page){
|
|
2148
2614
|
this.page = page;
|
|
@@ -2150,9 +2616,13 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
2150
2616
|
this.settingsMenu = new (0, $7867194f18360347$export$1d7840d5cdc861d5)(page);
|
|
2151
2617
|
this.usersPage = new (0, $3ceab7c613cabfd6$export$107317390f5aa598)(page);
|
|
2152
2618
|
this.applicationPage = new (0, $dc91ece6da6cadfa$export$1533b625ec0c75e2)(page);
|
|
2619
|
+
this.taskListPage = new (0, $ed2d4739e27d43c1$export$60c3bfa6385e2a10)(page);
|
|
2620
|
+
this.templatePage = new (0, $959d38250779aa22$export$8c8e7207254accc2)(page);
|
|
2621
|
+
this.templateListPage = new (0, $8b6ce149dd48e48b$export$7e1d435fa474ee21)(page);
|
|
2153
2622
|
this.taskDetailsPage = new (0, $a642d735048996f9$export$922081b54f2ab994)(page);
|
|
2154
2623
|
this.releaseCalendarPage = new (0, $a8855257f8bb2b12$export$43682cddead1dd78)(page);
|
|
2155
2624
|
this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
|
|
2625
|
+
this.util = new (0, $4efca3d4eadf892b$export$6adb8dd3f0d1e432)(page);
|
|
2156
2626
|
}
|
|
2157
2627
|
async openTemplate(id) {
|
|
2158
2628
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -2252,6 +2722,14 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
2252
2722
|
await this.page.waitForSelector("#release");
|
|
2253
2723
|
return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
|
|
2254
2724
|
}
|
|
2725
|
+
async collapseSideView() {
|
|
2726
|
+
await this.page.locator('.dot-tooltip[aria-label="Collapse"]').click();
|
|
2727
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-tooltip[aria-label="Collapse"]')).not.toBeVisible();
|
|
2728
|
+
}
|
|
2729
|
+
async expandSideView() {
|
|
2730
|
+
await this.page.locator('.dot-tooltip[aria-label="Expand"]').click();
|
|
2731
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-tooltip[aria-label="Expand"]')).not.toBeVisible();
|
|
2732
|
+
}
|
|
2255
2733
|
}
|
|
2256
2734
|
|
|
2257
2735
|
|
|
@@ -3170,15 +3648,27 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
3170
3648
|
getParentId(id) {
|
|
3171
3649
|
return id.substring(0, id.lastIndexOf("/"));
|
|
3172
3650
|
}
|
|
3173
|
-
folder(folder) {
|
|
3651
|
+
async folder(folder) {
|
|
3174
3652
|
const parentId = this.getParentId(folder.id);
|
|
3653
|
+
folder.type = "xlrelease.Folder";
|
|
3175
3654
|
//ToDo: Add system teams
|
|
3176
|
-
|
|
3655
|
+
const teams = folder.teams;
|
|
3177
3656
|
delete folder.teams;
|
|
3178
3657
|
//ToDo: Add Children
|
|
3179
|
-
const children = folder.children || [];
|
|
3658
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
|
|
3180
3659
|
delete folder.children;
|
|
3181
|
-
|
|
3660
|
+
if (teams) return this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
|
|
3661
|
+
return this.doPost(`api/v1/folders/${parentId}`, folder);
|
|
3662
|
+
}
|
|
3663
|
+
createFolder(folderJson) {
|
|
3664
|
+
folderJson.type = "xlrelease.Folder";
|
|
3665
|
+
return this.doPost(`fixtures/folders`, [
|
|
3666
|
+
folderJson
|
|
3667
|
+
]);
|
|
3668
|
+
}
|
|
3669
|
+
trigger(trigger) {
|
|
3670
|
+
this.triggerIds.push(trigger.id);
|
|
3671
|
+
return this.doPost("fixtures/trigger", trigger);
|
|
3182
3672
|
}
|
|
3183
3673
|
deleteArchivedRelease(id) {
|
|
3184
3674
|
const releaseId = id.includes("Applications/") ? id : `Applications/${id}`;
|
|
@@ -3298,6 +3788,16 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
3298
3788
|
const summary = json.fields.summary;
|
|
3299
3789
|
(0, $kKeXs$playwrighttest.expect)(summary).toBe(expectedSummary);
|
|
3300
3790
|
}
|
|
3791
|
+
async expectContainingAttachments(releaseId, tempFile) {
|
|
3792
|
+
if (releaseId.indexOf("Applications/") === -1) releaseId = "Applications/" + releaseId;
|
|
3793
|
+
await (0, $kKeXs$playwrighttest.expect)(async ()=>{
|
|
3794
|
+
const resp = await this.doPost(`fixtures/expectContainingAttachments/${releaseId}`, {
|
|
3795
|
+
name: tempFile,
|
|
3796
|
+
expectedContent: tempFile
|
|
3797
|
+
});
|
|
3798
|
+
(0, $kKeXs$playwrighttest.expect)(resp).toBe(true);
|
|
3799
|
+
}).toPass();
|
|
3800
|
+
}
|
|
3301
3801
|
async waitForReleaseStarted(releaseTitle) {
|
|
3302
3802
|
await (0, $kKeXs$playwrighttest.expect)(async ()=>{
|
|
3303
3803
|
const resp = await this.doPost("releases/search", {
|