@digital-ai/devops-page-object-release 0.0.15 → 0.0.17
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 +21 -0
- package/dist/main.js +1437 -274
- package/dist/main.js.map +1 -1
- package/dist/module.js +1438 -275
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +260 -39
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,8 +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
4
|
var $kKeXs$moment = require("moment");
|
|
5
|
+
var $kKeXs$fs = require("fs");
|
|
6
6
|
|
|
7
7
|
var $parcel$global =
|
|
8
8
|
typeof globalThis !== 'undefined'
|
|
@@ -961,7 +961,45 @@ class $f8721861c660dd88$export$2b65d1d97338f32b {
|
|
|
961
961
|
}
|
|
962
962
|
|
|
963
963
|
|
|
964
|
+
|
|
965
|
+
class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
966
|
+
constructor(page){
|
|
967
|
+
super(page);
|
|
968
|
+
}
|
|
969
|
+
async setName(releaseName) {
|
|
970
|
+
await this.page.locator("#release-form-title").click();
|
|
971
|
+
await this.page.locator("#release-form-title").fill(releaseName);
|
|
972
|
+
}
|
|
973
|
+
async setDescription(description) {
|
|
974
|
+
await this.page.locator(".release-description").hover();
|
|
975
|
+
await this.page.locator(".display").filter({
|
|
976
|
+
hasText: "Set description"
|
|
977
|
+
}).locator(".edit-icon").click();
|
|
978
|
+
await this.page.locator("textarea").click();
|
|
979
|
+
await this.page.locator("textarea").clear();
|
|
980
|
+
await this.page.locator("textarea").fill(description);
|
|
981
|
+
await this.page.getByText("Save", {
|
|
982
|
+
exact: true
|
|
983
|
+
}).click();
|
|
984
|
+
}
|
|
985
|
+
async create() {
|
|
986
|
+
await this.page.getByRole("button", {
|
|
987
|
+
name: "Create"
|
|
988
|
+
}).waitFor({
|
|
989
|
+
state: "visible"
|
|
990
|
+
});
|
|
991
|
+
await this.page.getByRole("button", {
|
|
992
|
+
name: "Create"
|
|
993
|
+
}).click();
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
|
|
964
998
|
class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
999
|
+
constructor(page){
|
|
1000
|
+
super(page);
|
|
1001
|
+
this.releaseCreatePage = new (0, $3d3f3946c54f5897$export$34addcca3f0ae43f)(page);
|
|
1002
|
+
}
|
|
965
1003
|
async expectNumberOfReleases(releaseTitle, amount) {
|
|
966
1004
|
await this.filterReleaseByTitle(releaseTitle);
|
|
967
1005
|
if (amount === 1) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
|
|
@@ -969,6 +1007,10 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
|
|
|
969
1007
|
});
|
|
970
1008
|
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
|
|
971
1009
|
}
|
|
1010
|
+
async filterReleaseByAllStatus() {
|
|
1011
|
+
await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
|
|
1012
|
+
await this.page.locator(".ci-status .xl-react-link").getByText("Select all").click();
|
|
1013
|
+
}
|
|
972
1014
|
async openReleaseByName(releaseTitle) {
|
|
973
1015
|
await this.page.locator(".release-line .row-wrapper .release-title-wrapper a", {
|
|
974
1016
|
hasText: releaseTitle
|
|
@@ -981,6 +1023,12 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
|
|
|
981
1023
|
await this.page.locator(".searchFilter").press("Enter");
|
|
982
1024
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
|
|
983
1025
|
}
|
|
1026
|
+
async createNewRelease(releaseName, description) {
|
|
1027
|
+
await this.releaseCreatePage.setName(releaseName);
|
|
1028
|
+
await this.releaseCreatePage.setDescription(description);
|
|
1029
|
+
await this.releaseCreatePage.create();
|
|
1030
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
1031
|
+
}
|
|
984
1032
|
}
|
|
985
1033
|
|
|
986
1034
|
|
|
@@ -1248,7 +1296,7 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1248
1296
|
await this.page.getByTestId("single-action-button").click();
|
|
1249
1297
|
await this.page.getByTestId("task-action-comment").click();
|
|
1250
1298
|
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
1251
|
-
await this.page.getByTestId("
|
|
1299
|
+
await this.page.getByTestId("dot-button").click();
|
|
1252
1300
|
}
|
|
1253
1301
|
async expectDependenciesDisplayed(dependencies) {
|
|
1254
1302
|
await this.railLocator.locator(".gate-task-dependencies").waitFor();
|
|
@@ -1257,24 +1305,19 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1257
1305
|
})).toBeVisible();
|
|
1258
1306
|
}
|
|
1259
1307
|
async expectCanDeleteDependency(title, canDelete = true) {
|
|
1260
|
-
|
|
1261
|
-
const locat = this.page.locator(".dependency").filter({
|
|
1262
|
-
has: this.page.getByRole("link", {
|
|
1263
|
-
name: title,
|
|
1264
|
-
exact: true
|
|
1265
|
-
})
|
|
1266
|
-
}).locator(".icon-options");
|
|
1267
|
-
await locat.isVisible();
|
|
1268
|
-
await locat.click();
|
|
1269
|
-
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByRole("menuitem", {
|
|
1270
|
-
name: "Remove"
|
|
1271
|
-
})).toBeVisible();
|
|
1272
|
-
} else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dependency").filter({
|
|
1308
|
+
const depOptionsIcon = this.page.locator(".dependency").filter({
|
|
1273
1309
|
has: this.page.getByRole("link", {
|
|
1274
1310
|
name: title,
|
|
1275
1311
|
exact: true
|
|
1276
1312
|
})
|
|
1277
|
-
}).locator(".icon-options")
|
|
1313
|
+
}).locator(".icon-options");
|
|
1314
|
+
if (canDelete) {
|
|
1315
|
+
await depOptionsIcon.isVisible();
|
|
1316
|
+
await depOptionsIcon.click();
|
|
1317
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByRole("menuitem", {
|
|
1318
|
+
name: "Remove"
|
|
1319
|
+
})).toBeVisible();
|
|
1320
|
+
} else await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).not.toBeVisible();
|
|
1278
1321
|
}
|
|
1279
1322
|
async getDependencyCount() {
|
|
1280
1323
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
@@ -1293,20 +1336,20 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1293
1336
|
}).first()).toBeVisible();
|
|
1294
1337
|
}
|
|
1295
1338
|
async clickEditDependency(dependencies) {
|
|
1296
|
-
const
|
|
1339
|
+
const depOptionsIcon = this.page.locator(".dependency").filter({
|
|
1297
1340
|
has: this.page.getByRole("link", {
|
|
1298
1341
|
name: dependencies,
|
|
1299
1342
|
exact: true
|
|
1300
1343
|
})
|
|
1301
1344
|
}).locator(".icon-options");
|
|
1302
|
-
await
|
|
1303
|
-
await
|
|
1345
|
+
await depOptionsIcon.isVisible();
|
|
1346
|
+
await depOptionsIcon.click();
|
|
1304
1347
|
const frame = this.page.getByTestId("undefined-menu");
|
|
1305
1348
|
if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
|
|
1306
1349
|
name: "Edit"
|
|
1307
1350
|
}).click();
|
|
1308
1351
|
else {
|
|
1309
|
-
await
|
|
1352
|
+
await depOptionsIcon.click();
|
|
1310
1353
|
await this.railLocator.getByRole("menuitem", {
|
|
1311
1354
|
name: "Edit"
|
|
1312
1355
|
}).click();
|
|
@@ -1339,21 +1382,23 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1339
1382
|
async setRelease(releaseTitle) {
|
|
1340
1383
|
await this.release.click();
|
|
1341
1384
|
await this.release.fill(releaseTitle);
|
|
1385
|
+
await this.page.getByRole("option", {
|
|
1386
|
+
name: releaseTitle
|
|
1387
|
+
}).waitFor();
|
|
1342
1388
|
await this.page.getByRole("option", {
|
|
1343
1389
|
name: releaseTitle
|
|
1344
1390
|
}).click();
|
|
1345
1391
|
}
|
|
1346
1392
|
async save() {
|
|
1347
|
-
await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.
|
|
1348
|
-
|
|
1349
|
-
})).toBeEnabled();
|
|
1350
|
-
await this.dependencyLocator.getByRole("button", {
|
|
1351
|
-
name: "OK"
|
|
1352
|
-
}).click();
|
|
1393
|
+
await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByTestId("save-button")).toBeVisible();
|
|
1394
|
+
await this.dependencyLocator.getByTestId("save-button").click();
|
|
1353
1395
|
}
|
|
1354
1396
|
async setPhase(phaseTitle) {
|
|
1355
1397
|
await this.phase.click();
|
|
1356
1398
|
await this.phase.fill("");
|
|
1399
|
+
await this.page.getByRole("option", {
|
|
1400
|
+
name: phaseTitle
|
|
1401
|
+
}).waitFor();
|
|
1357
1402
|
await this.page.getByRole("option", {
|
|
1358
1403
|
name: phaseTitle
|
|
1359
1404
|
}).click();
|
|
@@ -1374,6 +1419,7 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1374
1419
|
(0, $kKeXs$playwrighttest.expect)(variablemode).toBe("" + mode + "");
|
|
1375
1420
|
}
|
|
1376
1421
|
async clickVariable() {
|
|
1422
|
+
await this.dependencyLocator.getByLabel("input-variable").waitFor();
|
|
1377
1423
|
await this.dependencyLocator.getByLabel("input-variable").click();
|
|
1378
1424
|
}
|
|
1379
1425
|
//TODO: getAttribute('value') is not working as expected. Need to be fixed with better alternative.
|
|
@@ -1440,13 +1486,18 @@ class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$ex
|
|
|
1440
1486
|
hasText: fileName
|
|
1441
1487
|
}).click();
|
|
1442
1488
|
await this.page.getByLabel("delete file").click();
|
|
1489
|
+
await this.page.getByRole("button", {
|
|
1490
|
+
name: "Delete"
|
|
1491
|
+
}).waitFor({
|
|
1492
|
+
state: "visible"
|
|
1493
|
+
});
|
|
1443
1494
|
await this.page.getByRole("button", {
|
|
1444
1495
|
name: "Delete"
|
|
1445
1496
|
}).click();
|
|
1446
1497
|
}
|
|
1447
1498
|
async expectWithNoAttachment(tempFile) {
|
|
1448
|
-
const test = await this.page.locator(".task-attachments-grid .file-item-text").
|
|
1449
|
-
if (test) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
1499
|
+
const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
|
|
1500
|
+
if (test > 0) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
1450
1501
|
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
1451
1502
|
}
|
|
1452
1503
|
}
|
|
@@ -1462,7 +1513,7 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1462
1513
|
});
|
|
1463
1514
|
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
1464
1515
|
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
1465
|
-
this.confirm = this.page.getByTestId("
|
|
1516
|
+
this.confirm = this.page.getByTestId("dot-button");
|
|
1466
1517
|
this.activity = new (0, $6c924a95a765a086$export$15d3f9b095bb5188)(page);
|
|
1467
1518
|
this.attachment = new (0, $f9016705c1a1eb20$export$aa59788fdecae2f2)(page);
|
|
1468
1519
|
this.config = new (0, $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e)(page);
|
|
@@ -1471,6 +1522,13 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1471
1522
|
this.skipMenu = this.page.getByRole("menuitem", {
|
|
1472
1523
|
name: "Skip"
|
|
1473
1524
|
});
|
|
1525
|
+
this.failMenu = this.page.getByRole("menuitem", {
|
|
1526
|
+
name: "Fail"
|
|
1527
|
+
});
|
|
1528
|
+
this.openMenu = this.page.getByRole("button", {
|
|
1529
|
+
name: "arrow-down icon",
|
|
1530
|
+
exact: true
|
|
1531
|
+
});
|
|
1474
1532
|
}
|
|
1475
1533
|
async openOverviewRail() {
|
|
1476
1534
|
await this.openRail("Overview");
|
|
@@ -1500,19 +1558,23 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1500
1558
|
await this.taskDrawerLocator.locator(".task-drawer-header").getByTestId("close-btn").click();
|
|
1501
1559
|
}
|
|
1502
1560
|
async retryTask(comment) {
|
|
1561
|
+
await this.page.waitForTimeout(1000);
|
|
1503
1562
|
await this.retryButton.click();
|
|
1504
1563
|
await this.commentBox.fill(comment);
|
|
1505
1564
|
await this.confirm.click();
|
|
1506
1565
|
}
|
|
1507
1566
|
async skipTask(comment) {
|
|
1508
|
-
await this.
|
|
1509
|
-
name: "arrow-down icon",
|
|
1510
|
-
exact: true
|
|
1511
|
-
}).click();
|
|
1567
|
+
await this.openMenu.click();
|
|
1512
1568
|
await this.skipMenu.click();
|
|
1513
1569
|
await this.commentBox.fill(comment);
|
|
1514
1570
|
await this.confirm.click();
|
|
1515
1571
|
}
|
|
1572
|
+
async failTask(comment) {
|
|
1573
|
+
await this.openMenu.click();
|
|
1574
|
+
await this.failMenu.click();
|
|
1575
|
+
await this.commentBox.fill(comment);
|
|
1576
|
+
await this.confirm.click();
|
|
1577
|
+
}
|
|
1516
1578
|
async expectTaskTitle(taskTitle) {
|
|
1517
1579
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
|
|
1518
1580
|
}
|
|
@@ -1520,18 +1582,64 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1520
1582
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-type").innerText()).toContain(taskType);
|
|
1521
1583
|
}
|
|
1522
1584
|
async clickExpand() {
|
|
1523
|
-
await this.page.
|
|
1524
|
-
|
|
1585
|
+
await this.page.getByRole("tooltip", {
|
|
1586
|
+
name: "Expand"
|
|
1587
|
+
}).getByTestId("expand-btn").click();
|
|
1588
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("tooltip", {
|
|
1589
|
+
name: "Shrink"
|
|
1590
|
+
}).getByTestId("expand-btn")).toBeVisible();
|
|
1525
1591
|
}
|
|
1526
1592
|
async clickShrink() {
|
|
1527
|
-
await this.page.
|
|
1528
|
-
|
|
1593
|
+
await this.page.getByRole("tooltip", {
|
|
1594
|
+
name: "Shrink"
|
|
1595
|
+
}).getByTestId("expand-btn").click();
|
|
1596
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("tooltip", {
|
|
1597
|
+
name: "Expand"
|
|
1598
|
+
}).getByTestId("expand-btn")).toBeVisible();
|
|
1599
|
+
}
|
|
1600
|
+
async expectAssignedTo(username) {
|
|
1601
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
1602
|
+
name: username
|
|
1603
|
+
})).toBeVisible();
|
|
1604
|
+
}
|
|
1605
|
+
async assignToMe(userName, existingUsername) {
|
|
1606
|
+
await this.page.getByRole("button", {
|
|
1607
|
+
name: existingUsername
|
|
1608
|
+
}).click();
|
|
1609
|
+
await this.page.getByTestId(`render-option-${userName}`).click();
|
|
1610
|
+
}
|
|
1611
|
+
async setFlag(flagName, flagComment) {
|
|
1612
|
+
await this.page.getByTestId("flag-btn").click();
|
|
1613
|
+
await this.page.getByLabel(flagName).click();
|
|
1614
|
+
await this.page.getByPlaceholder("Set message").click();
|
|
1615
|
+
await this.page.getByPlaceholder("Set message").fill(flagComment);
|
|
1616
|
+
await this.page.getByPlaceholder("Set message").press("Enter");
|
|
1617
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
1618
|
+
name: `flag icon ${flagComment}`
|
|
1619
|
+
})).toBeVisible();
|
|
1620
|
+
}
|
|
1621
|
+
async expectFlaggedWith(flagName, flagComment) {
|
|
1622
|
+
await this.page.getByRole("button", {
|
|
1623
|
+
name: "flag icon"
|
|
1624
|
+
}).click();
|
|
1625
|
+
const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
|
|
1626
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(regexPattern)).toBeVisible();
|
|
1627
|
+
}
|
|
1628
|
+
async expectStartDateToBeDisplayed() {
|
|
1629
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
|
|
1630
|
+
}
|
|
1631
|
+
async expectEndDateToBeDisplayed() {
|
|
1632
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
|
|
1633
|
+
}
|
|
1634
|
+
async expectStartDateAndEndDateToBeDisplayed() {
|
|
1635
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("month-and-year")).toHaveCount(2);
|
|
1529
1636
|
}
|
|
1530
1637
|
}
|
|
1531
1638
|
|
|
1532
1639
|
|
|
1533
1640
|
|
|
1534
1641
|
|
|
1642
|
+
|
|
1535
1643
|
class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1536
1644
|
constructor(page){
|
|
1537
1645
|
super(page);
|
|
@@ -1564,9 +1672,10 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
1564
1672
|
async save() {
|
|
1565
1673
|
await this.page.getByRole("button", {
|
|
1566
1674
|
name: "Save"
|
|
1567
|
-
}).
|
|
1568
|
-
|
|
1569
|
-
|
|
1675
|
+
}).waitFor();
|
|
1676
|
+
await this.page.getByRole("button", {
|
|
1677
|
+
name: "Save"
|
|
1678
|
+
}).click();
|
|
1570
1679
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
|
|
1571
1680
|
}
|
|
1572
1681
|
async reset() {
|
|
@@ -1612,6 +1721,179 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
1612
1721
|
}).locator("span").click();
|
|
1613
1722
|
await this.page.getByText("Remove").click();
|
|
1614
1723
|
}
|
|
1724
|
+
async expectVariableDisplayed(variable, present) {
|
|
1725
|
+
if (present) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#release-properties .form-group`, {
|
|
1726
|
+
hasText: variable
|
|
1727
|
+
})).toHaveCount(1);
|
|
1728
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#release-properties .form-group`, {
|
|
1729
|
+
hasText: variable
|
|
1730
|
+
})).toHaveCount(0);
|
|
1731
|
+
}
|
|
1732
|
+
async setScheduledStartDate(date, monthYear) {
|
|
1733
|
+
await this.page.locator(`.scheduled-start-date .date`).click();
|
|
1734
|
+
const prev = this.page.locator(".datepicker-days .prev");
|
|
1735
|
+
const next = this.page.locator(".datepicker-days .next");
|
|
1736
|
+
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
1737
|
+
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore();
|
|
1738
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
1739
|
+
else await next.click();
|
|
1740
|
+
await this.page.getByRole("cell", {
|
|
1741
|
+
name: "" + date + ""
|
|
1742
|
+
}).first().click();
|
|
1743
|
+
}
|
|
1744
|
+
async setScheduledStartTime(hrs, mins, meridian) {
|
|
1745
|
+
await this.page.locator(".scheduled-start-date .time-picker-holder").click();
|
|
1746
|
+
if (typeof hrs !== "undefined") {
|
|
1747
|
+
await this.page.locator(".bootstrap-timepicker-hour").click();
|
|
1748
|
+
await this.page.locator(".bootstrap-timepicker-hour").clear();
|
|
1749
|
+
await this.page.locator(".bootstrap-timepicker-hour").fill(hrs);
|
|
1750
|
+
}
|
|
1751
|
+
if (typeof mins !== "undefined") {
|
|
1752
|
+
await this.page.locator(".bootstrap-timepicker-minute").click();
|
|
1753
|
+
await this.page.locator(".bootstrap-timepicker-minute").clear();
|
|
1754
|
+
await this.page.locator(".bootstrap-timepicker-minute").fill(mins);
|
|
1755
|
+
}
|
|
1756
|
+
if (typeof meridian !== "undefined") {
|
|
1757
|
+
await this.page.locator(".bootstrap-timepicker-meridian").click();
|
|
1758
|
+
await this.page.locator(".bootstrap-timepicker-meridian").clear();
|
|
1759
|
+
await this.page.locator(".bootstrap-timepicker-meridian").fill(meridian);
|
|
1760
|
+
}
|
|
1761
|
+
await this.page.keyboard.press("Escape");
|
|
1762
|
+
}
|
|
1763
|
+
async setDuration(days, hours, mins) {
|
|
1764
|
+
await this.page.locator(".duration-editor").click();
|
|
1765
|
+
if (typeof days !== "undefined") {
|
|
1766
|
+
await this.page.locator(".days").click();
|
|
1767
|
+
await this.page.locator(".days").clear();
|
|
1768
|
+
await this.page.locator(".days").fill(days);
|
|
1769
|
+
}
|
|
1770
|
+
if (typeof hours !== "undefined") {
|
|
1771
|
+
await this.page.locator(".hours").click();
|
|
1772
|
+
await this.page.locator(".hours").clear();
|
|
1773
|
+
await this.page.locator(".hours").fill(hours);
|
|
1774
|
+
}
|
|
1775
|
+
if (typeof mins !== "undefined") {
|
|
1776
|
+
await this.page.locator(".minutes").click();
|
|
1777
|
+
await this.page.locator(".minutes").clear();
|
|
1778
|
+
await this.page.locator(".minutes").fill(mins);
|
|
1779
|
+
}
|
|
1780
|
+
await this.page.keyboard.press("Escape");
|
|
1781
|
+
}
|
|
1782
|
+
async expectScheduledStartDateToBe(date) {
|
|
1783
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toContain(date);
|
|
1784
|
+
}
|
|
1785
|
+
async expectScheduledStartTimeToBe(date) {
|
|
1786
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.scheduled-start-date .time input`).getAttribute("value")).toContain(date);
|
|
1787
|
+
}
|
|
1788
|
+
async expectDueDateToBe(date) {
|
|
1789
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .date input").getAttribute("value")).toContain(date);
|
|
1790
|
+
}
|
|
1791
|
+
async expectedDueDateTime(time) {
|
|
1792
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .time input").getAttribute("value")).toContain(time);
|
|
1793
|
+
}
|
|
1794
|
+
async expectDurationToBe(duration) {
|
|
1795
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
1796
|
+
}
|
|
1797
|
+
async setDueDate(hrs, min, meridian) {
|
|
1798
|
+
await this.page.locator(".due-date .time-picker-holder").click();
|
|
1799
|
+
if (typeof hrs !== "undefined") {
|
|
1800
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").click();
|
|
1801
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").clear();
|
|
1802
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").fill(hrs);
|
|
1803
|
+
}
|
|
1804
|
+
if (typeof min !== "undefined") {
|
|
1805
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").click();
|
|
1806
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").clear();
|
|
1807
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").fill(min);
|
|
1808
|
+
}
|
|
1809
|
+
if (typeof meridian !== "undefined") {
|
|
1810
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").click();
|
|
1811
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").clear();
|
|
1812
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").fill(meridian);
|
|
1813
|
+
}
|
|
1814
|
+
await this.page.keyboard.press("Escape");
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
class $880df57ffbf6e614$export$9b575f14aa5e09a1 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1823
|
+
constructor(page){
|
|
1824
|
+
super(page);
|
|
1825
|
+
}
|
|
1826
|
+
async openDatePicker(selector) {
|
|
1827
|
+
await this.page.locator(`${selector} .date`).click();
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Setting date, month and year from calendar picker
|
|
1831
|
+
*/ async setDate(date, monthYear) {
|
|
1832
|
+
const prev = this.page.locator(".datepicker-days .prev");
|
|
1833
|
+
const next = this.page.locator(".datepicker-days .next");
|
|
1834
|
+
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
1835
|
+
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore();
|
|
1836
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
1837
|
+
else await next.click();
|
|
1838
|
+
await this.page.getByRole("cell", {
|
|
1839
|
+
name: "" + date + ""
|
|
1840
|
+
}).first().click();
|
|
1841
|
+
}
|
|
1842
|
+
async expectDurationToBe(duration) {
|
|
1843
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
1844
|
+
}
|
|
1845
|
+
async setDuration(days, hours, mins) {
|
|
1846
|
+
await this.page.locator(".duration-editor").click();
|
|
1847
|
+
if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
|
|
1848
|
+
if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
|
|
1849
|
+
if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
|
|
1850
|
+
await this.page.keyboard.press("Enter");
|
|
1851
|
+
}
|
|
1852
|
+
async expectTimeToBe(selector, format, date) {
|
|
1853
|
+
if (typeof date === "string") date = new Date(date);
|
|
1854
|
+
const formattedDate = (0, ($parcel$interopDefault($kKeXs$moment)))(date).format(format);
|
|
1855
|
+
const input = this.page.locator(`${selector}`);
|
|
1856
|
+
await (0, $kKeXs$playwrighttest.expect)(input).toBeVisible();
|
|
1857
|
+
const value = await input.inputValue();
|
|
1858
|
+
(0, $kKeXs$playwrighttest.expect)(value).toBe(formattedDate);
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1867
|
+
constructor(page){
|
|
1868
|
+
super(page);
|
|
1869
|
+
this.tempDir = "";
|
|
1870
|
+
this.content = "";
|
|
1871
|
+
this.closeIcon = this.page.locator(".xl-icon.close-icon");
|
|
1872
|
+
}
|
|
1873
|
+
async createTempFile(fileName, testInfo) {
|
|
1874
|
+
const content = fileName.toString();
|
|
1875
|
+
const tempDir = testInfo.outputPath(fileName.toString());
|
|
1876
|
+
$kKeXs$fs.promises.writeFile(tempDir, content, "utf8");
|
|
1877
|
+
}
|
|
1878
|
+
async expandAllFolders() {
|
|
1879
|
+
const icExpandTreeview1 = this.page.locator(".rstm-toggle-icon.xl-icon.arrow-right-icon");
|
|
1880
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
1881
|
+
const blnVal = await element.isVisible();
|
|
1882
|
+
if (blnVal) {
|
|
1883
|
+
await element.click();
|
|
1884
|
+
await this.expandAllFolders();
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
await (0, $kKeXs$playwrighttest.expect)(icExpandTreeview1).not.toBeVisible();
|
|
1888
|
+
}
|
|
1889
|
+
async openSideNavMenu(menuItem) {
|
|
1890
|
+
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
1891
|
+
exact: true
|
|
1892
|
+
}).click();
|
|
1893
|
+
}
|
|
1894
|
+
async clickCloseIcon() {
|
|
1895
|
+
await this.closeIcon.click();
|
|
1896
|
+
}
|
|
1615
1897
|
}
|
|
1616
1898
|
|
|
1617
1899
|
|
|
@@ -1619,8 +1901,10 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1619
1901
|
constructor(page){
|
|
1620
1902
|
super(page);
|
|
1621
1903
|
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
1904
|
+
this.phaseTitle = this.page.locator(".phase .phase-title");
|
|
1622
1905
|
this.properties = new (0, $8681d8a3f46f87b7$export$d1077068a9cc9f17)(page);
|
|
1623
1906
|
this.variables = new (0, $fd4eef3ad2b2e612$export$a87f0ae8695e74be)(page);
|
|
1907
|
+
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
1624
1908
|
}
|
|
1625
1909
|
async openTriggers() {
|
|
1626
1910
|
await this.openSubPage("Triggers");
|
|
@@ -1636,6 +1920,16 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1636
1920
|
getPhase(phaseName) {
|
|
1637
1921
|
return new $9b9a8c3da392d020$var$Phase(this.page, phaseName);
|
|
1638
1922
|
}
|
|
1923
|
+
async expectNotFlagged() {
|
|
1924
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flag-none-icon")).toBeHidden();
|
|
1925
|
+
}
|
|
1926
|
+
async expectFlagOnTaskCard() {
|
|
1927
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".risk-flag-icon")).toBeVisible();
|
|
1928
|
+
}
|
|
1929
|
+
async refresh() {
|
|
1930
|
+
await this.page.reload();
|
|
1931
|
+
await this.page.waitForSelector("#release");
|
|
1932
|
+
}
|
|
1639
1933
|
async start() {
|
|
1640
1934
|
await this.page.getByTestId("start-btn").click();
|
|
1641
1935
|
await this.page.getByRole("button", {
|
|
@@ -1654,6 +1948,11 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1654
1948
|
timeout: 10000
|
|
1655
1949
|
});
|
|
1656
1950
|
}
|
|
1951
|
+
async waitForTaskInProgress(taskTitle) {
|
|
1952
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.in_progress").getByText(taskTitle, {
|
|
1953
|
+
exact: true
|
|
1954
|
+
})).toBeVisible();
|
|
1955
|
+
}
|
|
1657
1956
|
async waitForTaskFailed(taskTitle) {
|
|
1658
1957
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.failed").getByText(taskTitle, {
|
|
1659
1958
|
exact: true
|
|
@@ -1668,6 +1967,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1668
1967
|
timeout: 10000
|
|
1669
1968
|
});
|
|
1670
1969
|
}
|
|
1970
|
+
async waitForTaskSkippedInAdvance(taskTitle) {
|
|
1971
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.skipped_in_advance").getByText(taskTitle, {
|
|
1972
|
+
exact: true
|
|
1973
|
+
})).toBeVisible({
|
|
1974
|
+
timeout: 10000
|
|
1975
|
+
});
|
|
1976
|
+
}
|
|
1671
1977
|
async waitForTaskAborted(taskTitle) {
|
|
1672
1978
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
|
|
1673
1979
|
exact: true
|
|
@@ -1689,6 +1995,25 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1689
1995
|
timeout: 10000
|
|
1690
1996
|
});
|
|
1691
1997
|
}
|
|
1998
|
+
async waitForTaskPlanned(title) {
|
|
1999
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible();
|
|
2000
|
+
}
|
|
2001
|
+
async openManualTaskDetails(title) {
|
|
2002
|
+
await this.page.locator(`text=${title}`).click({
|
|
2003
|
+
force: true
|
|
2004
|
+
});
|
|
2005
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("div").filter({
|
|
2006
|
+
hasText: title
|
|
2007
|
+
}).first()).toBeVisible();
|
|
2008
|
+
}
|
|
2009
|
+
async reopenTask(comment) {
|
|
2010
|
+
await this.page.locator("div").filter({
|
|
2011
|
+
hasText: /^Reopen$/
|
|
2012
|
+
}).click();
|
|
2013
|
+
await this.page.getByTestId("task-action-comment").click();
|
|
2014
|
+
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
2015
|
+
await this.page.getByTestId("dot-button").click();
|
|
2016
|
+
}
|
|
1692
2017
|
async openTaskDrawer(taskName) {
|
|
1693
2018
|
await this.page.locator(".task-header").getByText(taskName, {
|
|
1694
2019
|
exact: true
|
|
@@ -1708,25 +2033,32 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1708
2033
|
return this.taskDrawer;
|
|
1709
2034
|
}
|
|
1710
2035
|
async openVariables() {
|
|
1711
|
-
await this.
|
|
2036
|
+
await this.util.openSideNavMenu("Variables");
|
|
2037
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
|
|
1712
2038
|
}
|
|
1713
2039
|
async openProperties() {
|
|
1714
|
-
await this.
|
|
2040
|
+
await this.util.openSideNavMenu("Properties");
|
|
2041
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Properties")).toBeVisible();
|
|
1715
2042
|
}
|
|
1716
2043
|
async openReleaseFlow() {
|
|
1717
|
-
await this.
|
|
2044
|
+
await this.util.openSideNavMenu("Flow");
|
|
2045
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
1718
2046
|
}
|
|
1719
2047
|
async openRelationships() {
|
|
1720
|
-
await this.
|
|
2048
|
+
await this.util.openSideNavMenu("Relationships");
|
|
2049
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Relationships")).toBeVisible();
|
|
1721
2050
|
}
|
|
1722
2051
|
async openTeamsPermissions() {
|
|
1723
|
-
await this.
|
|
2052
|
+
await this.util.openSideNavMenu("Teams & Permissions");
|
|
2053
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Teams & Permissions")).toBeVisible();
|
|
1724
2054
|
}
|
|
1725
2055
|
async openDashboard() {
|
|
1726
|
-
await this.
|
|
2056
|
+
await this.util.openSideNavMenu("Dashboard");
|
|
2057
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
|
|
1727
2058
|
}
|
|
1728
2059
|
async openActivityLogs() {
|
|
1729
|
-
await this.
|
|
2060
|
+
await this.util.openSideNavMenu("Activity logs");
|
|
2061
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
|
|
1730
2062
|
}
|
|
1731
2063
|
async openReleaseMenu(menuItem) {
|
|
1732
2064
|
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
@@ -1763,15 +2095,17 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1763
2095
|
}
|
|
1764
2096
|
}
|
|
1765
2097
|
}
|
|
1766
|
-
async
|
|
1767
|
-
await this.page.locator(".
|
|
2098
|
+
async expectTemplateLabelNotToBePresent() {
|
|
2099
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
|
|
2100
|
+
hasText: "TEMPLATE"
|
|
2101
|
+
})).not.toBeVisible();
|
|
1768
2102
|
}
|
|
1769
2103
|
async openTableView() {
|
|
1770
|
-
await this.
|
|
2104
|
+
await this.util.openSideNavMenu("Table");
|
|
1771
2105
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
1772
2106
|
}
|
|
1773
2107
|
async openPlannerView() {
|
|
1774
|
-
await this.
|
|
2108
|
+
await this.util.openSideNavMenu("Planner");
|
|
1775
2109
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
|
|
1776
2110
|
}
|
|
1777
2111
|
async expandGanttFolder() {
|
|
@@ -1784,11 +2118,54 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
1784
2118
|
}
|
|
1785
2119
|
}
|
|
1786
2120
|
}
|
|
2121
|
+
async backToRelease() {
|
|
2122
|
+
await this.page.locator(".icon-back").click();
|
|
2123
|
+
}
|
|
1787
2124
|
async expectTitleToBeInBreadcrumbLink(title) {
|
|
1788
|
-
(0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-breadcrumbs a", {
|
|
2125
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-breadcrumbs a", {
|
|
2126
|
+
hasText: title
|
|
2127
|
+
})).toBeVisible();
|
|
2128
|
+
}
|
|
2129
|
+
async expectHasPhase(title) {
|
|
2130
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#release-content .phase-title`, {
|
|
1789
2131
|
hasText: title
|
|
1790
2132
|
})).toBeVisible();
|
|
1791
2133
|
}
|
|
2134
|
+
async addNewPhase(phaseName) {
|
|
2135
|
+
await this.page.getByTestId("add-phase-btn").click();
|
|
2136
|
+
if (phaseName) {
|
|
2137
|
+
await this.phaseTitle.getByText("New Phase").click();
|
|
2138
|
+
await this.phaseTitle.getByRole("textbox").clear();
|
|
2139
|
+
await this.phaseTitle.getByRole("textbox").fill(phaseName);
|
|
2140
|
+
await this.page.keyboard.press("Enter");
|
|
2141
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
|
|
2142
|
+
hasText: phaseName
|
|
2143
|
+
})).toBeVisible();
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
async renamePhase(oldPhaseName, newPhaseName) {
|
|
2147
|
+
await this.phaseTitle.getByText(oldPhaseName).click();
|
|
2148
|
+
await this.phaseTitle.filter({
|
|
2149
|
+
hasText: oldPhaseName
|
|
2150
|
+
}).locator(".editable").clear();
|
|
2151
|
+
await this.phaseTitle.filter({
|
|
2152
|
+
hasText: oldPhaseName
|
|
2153
|
+
}).locator(".editable").fill(newPhaseName);
|
|
2154
|
+
await this.page.keyboard.press("Enter");
|
|
2155
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
|
|
2156
|
+
hasText: newPhaseName
|
|
2157
|
+
})).toBeVisible();
|
|
2158
|
+
}
|
|
2159
|
+
async exportRelease() {
|
|
2160
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2161
|
+
this.page.on("download", ()=>{});
|
|
2162
|
+
await this.page.getByTestId("template-export-btn").click();
|
|
2163
|
+
const downloadPromise = this.page.waitForEvent("download");
|
|
2164
|
+
await this.page.getByRole("link", {
|
|
2165
|
+
name: "Audit report (Excel)"
|
|
2166
|
+
}).click();
|
|
2167
|
+
await downloadPromise;
|
|
2168
|
+
}
|
|
1792
2169
|
}
|
|
1793
2170
|
class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1794
2171
|
constructor(page, phaseName){
|
|
@@ -1796,6 +2173,9 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
1796
2173
|
this.phaseLocator = page.locator(".phase", {
|
|
1797
2174
|
hasText: phaseName
|
|
1798
2175
|
});
|
|
2176
|
+
this.commentBox = this.page.locator(`.input-block-level`);
|
|
2177
|
+
this.confirm = this.page.getByTestId("dot-button");
|
|
2178
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
1799
2179
|
}
|
|
1800
2180
|
async setTitle(title) {
|
|
1801
2181
|
await this.phaseLocator.locator(".phase-header .display").click();
|
|
@@ -1806,25 +2186,16 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
1806
2186
|
async expectTaskBorderWithColor(taskName, color) {
|
|
1807
2187
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
|
|
1808
2188
|
}
|
|
1809
|
-
async addTaskInPhase(taskTitle, taskType) {
|
|
2189
|
+
async addTaskInPhase(taskTitle, taskGroup, taskType) {
|
|
1810
2190
|
await this.phaseLocator.getByText("Add task").click();
|
|
1811
|
-
await this.phaseLocator.
|
|
1812
|
-
await this.phaseLocator.getByPlaceholder("Task title...").fill(taskTitle);
|
|
1813
|
-
await this.phaseLocator.locator(".xlr-ctx-menu-toggle").click();
|
|
1814
|
-
const count = taskType.length - 1;
|
|
1815
|
-
for(let i = 0; i < count; i++){
|
|
1816
|
-
await this.page.locator('[data-test="' + taskType[i] + '"]').getByText(taskType[i]).click();
|
|
1817
|
-
await this.page.getByText(taskType[i + 1]).click();
|
|
1818
|
-
}
|
|
1819
|
-
await this.phaseLocator.locator(".quick-controls-container a").getByText("Add", {
|
|
2191
|
+
await this.phaseLocator.getByLabel("Open", {
|
|
1820
2192
|
exact: true
|
|
1821
2193
|
}).click();
|
|
1822
|
-
await this.phaseLocator.
|
|
1823
|
-
await
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
});
|
|
2194
|
+
await this.phaseLocator.getByPlaceholder("Start typing to filter task").fill(taskGroup);
|
|
2195
|
+
await this.page.getByTestId(taskType).click();
|
|
2196
|
+
await this.phaseLocator.locator("#task-title").fill(taskTitle);
|
|
2197
|
+
await this.phaseLocator.getByTestId("save-select-task-btn").click();
|
|
2198
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
|
|
1828
2199
|
}
|
|
1829
2200
|
async getNumberOfTasks() {
|
|
1830
2201
|
return await this.phaseLocator.locator(".task").count();
|
|
@@ -1840,30 +2211,114 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
1840
2211
|
hasText: "TEMPLATE"
|
|
1841
2212
|
})).not.toBeVisible();
|
|
1842
2213
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
class $dc91ece6da6cadfa$export$1533b625ec0c75e2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1849
|
-
async goToApplicationsPage() {
|
|
1850
|
-
await this.page.goto("./#/applications");
|
|
1851
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveTitle("Applications - Digital.ai Release");
|
|
1852
|
-
return this;
|
|
2214
|
+
async openContextMenuForTask(taskTitle) {
|
|
2215
|
+
await this.phaseLocator.locator(".task").filter({
|
|
2216
|
+
hasText: taskTitle
|
|
2217
|
+
}).locator(".context-menu-button").click();
|
|
1853
2218
|
}
|
|
1854
|
-
async
|
|
1855
|
-
await this.
|
|
1856
|
-
await this.page.locator(
|
|
1857
|
-
await this.
|
|
1858
|
-
|
|
2219
|
+
async skipFromContextMenu(comment, taskTitle) {
|
|
2220
|
+
await this.openContextMenuForTask(taskTitle);
|
|
2221
|
+
await this.page.locator(".dropdown-menu li").getByText("Skip").click();
|
|
2222
|
+
await this.commentBox.fill(comment);
|
|
2223
|
+
await this.page.getByRole("button", {
|
|
2224
|
+
name: "Skip",
|
|
2225
|
+
exact: true
|
|
2226
|
+
}).click();
|
|
1859
2227
|
}
|
|
1860
|
-
async
|
|
1861
|
-
await this.
|
|
1862
|
-
return this;
|
|
2228
|
+
async openPhaseDetails() {
|
|
2229
|
+
await this.phaseLocator.locator(".phase-details").click();
|
|
1863
2230
|
}
|
|
1864
|
-
async
|
|
1865
|
-
await this.page.locator(
|
|
1866
|
-
|
|
2231
|
+
async close() {
|
|
2232
|
+
await this.page.locator("button[type='button'] i[class='xl-icon close-icon']").click();
|
|
2233
|
+
}
|
|
2234
|
+
async expectStartDateToBeDisplayed() {
|
|
2235
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal .start-date")).toBeVisible();
|
|
2236
|
+
}
|
|
2237
|
+
async expectDueDateToBeDisplayed() {
|
|
2238
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal .due-date")).toBeVisible();
|
|
2239
|
+
}
|
|
2240
|
+
async expectEndDateToBeDisplayed() {
|
|
2241
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal .end-date")).toBeVisible();
|
|
2242
|
+
}
|
|
2243
|
+
async setTitleFromPhaseDetails(title) {
|
|
2244
|
+
await this.page.locator("h4.phase-title").click();
|
|
2245
|
+
await this.page.locator("h4.phase-title input").fill(title);
|
|
2246
|
+
await this.page.locator("h4.phase-title input").press("Enter");
|
|
2247
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("h4.phase-title")).toContainText(title);
|
|
2248
|
+
}
|
|
2249
|
+
async setDueDateFromPhaseDetails(date, monthYear) {
|
|
2250
|
+
await this.dateUtil.openDatePicker(".modal .due-date .date-editor");
|
|
2251
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2252
|
+
}
|
|
2253
|
+
async setScheduledStartDateFromPhaseDetails(date, monthYear) {
|
|
2254
|
+
await this.dateUtil.openDatePicker(".modal .scheduled-start-date .date-editor");
|
|
2255
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2256
|
+
}
|
|
2257
|
+
async expectDurationToBe(duration) {
|
|
2258
|
+
await this.dateUtil.expectDurationToBe(duration);
|
|
2259
|
+
}
|
|
2260
|
+
async setDurationFromPhaseDetails(days, hours, mins) {
|
|
2261
|
+
await this.dateUtil.setDuration(days, hours, mins);
|
|
2262
|
+
}
|
|
2263
|
+
async expectDueTimeToBe(format, date) {
|
|
2264
|
+
await this.dateUtil.expectTimeToBe(".modal .due-date .time-picker-holder input", format, date);
|
|
2265
|
+
}
|
|
2266
|
+
async deleteTaskInPhase(taskName) {
|
|
2267
|
+
await this.page.locator(".task").filter({
|
|
2268
|
+
hasText: taskName
|
|
2269
|
+
}).locator(".xl-icon.options-icon").click();
|
|
2270
|
+
await this.page.locator(".remove-task-button").click();
|
|
2271
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
2272
|
+
name: "Delete Task"
|
|
2273
|
+
})).toBeVisible();
|
|
2274
|
+
await this.page.getByRole("button", {
|
|
2275
|
+
name: "Delete"
|
|
2276
|
+
}).click();
|
|
2277
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator("li").filter({
|
|
2278
|
+
hasText: taskName
|
|
2279
|
+
})).not.toBeVisible();
|
|
2280
|
+
}
|
|
2281
|
+
async deletePhase(phaseName) {
|
|
2282
|
+
await this.phaseLocator.locator(".phase-header").filter({
|
|
2283
|
+
hasText: phaseName
|
|
2284
|
+
}).locator(".actions").hover();
|
|
2285
|
+
await this.phaseLocator.locator(".phase-header").filter({
|
|
2286
|
+
hasText: phaseName
|
|
2287
|
+
}).locator(".delete-icon").click();
|
|
2288
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
2289
|
+
name: "Delete Phase"
|
|
2290
|
+
})).toBeVisible();
|
|
2291
|
+
await this.page.getByRole("button", {
|
|
2292
|
+
name: "Delete"
|
|
2293
|
+
}).click();
|
|
2294
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-header").filter({
|
|
2295
|
+
hasText: phaseName
|
|
2296
|
+
})).not.toBeVisible();
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
class $dc91ece6da6cadfa$export$1533b625ec0c75e2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2304
|
+
async goToApplicationsPage() {
|
|
2305
|
+
await this.page.goto("./#/applications");
|
|
2306
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveTitle("Applications - Digital.ai Release");
|
|
2307
|
+
return this;
|
|
2308
|
+
}
|
|
2309
|
+
async addNewApplication(applicationName) {
|
|
2310
|
+
await this.page.locator(`//button[normalize-space()='New application']`).click();
|
|
2311
|
+
await this.page.locator(`input[placeholder='Add name...']`).type(applicationName);
|
|
2312
|
+
await this.page.locator(`//button[normalize-space()='Save']`).click();
|
|
2313
|
+
return this;
|
|
2314
|
+
}
|
|
2315
|
+
async verifyApplicationisCreated(applicationName) {
|
|
2316
|
+
await this.page.waitForSelector(`div[title='${applicationName}'] strong`);
|
|
2317
|
+
return this;
|
|
2318
|
+
}
|
|
2319
|
+
async createApplicationAndLinkEnvironment(environmentName, applicationName) {
|
|
2320
|
+
await this.page.locator(`//button[normalize-space()='New application']`).click();
|
|
2321
|
+
await this.page.locator(`input[placeholder='Add name...']`).type(applicationName);
|
|
1867
2322
|
await this.page.locator("input[placeholder='Filter environment name...']").type(environmentName);
|
|
1868
2323
|
await this.page.locator(`div[title='${environmentName}']`).click();
|
|
1869
2324
|
await this.page.locator(`//button[normalize-space()='Save']`).click();
|
|
@@ -1873,6 +2328,435 @@ class $dc91ece6da6cadfa$export$1533b625ec0c75e2 extends (0, $f8721861c660dd88$ex
|
|
|
1873
2328
|
}
|
|
1874
2329
|
|
|
1875
2330
|
|
|
2331
|
+
class $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89 {
|
|
2332
|
+
static codePointA = 65;
|
|
2333
|
+
static codePointZ = 90;
|
|
2334
|
+
static getString() {
|
|
2335
|
+
return Math.random().toString(36).substring(2);
|
|
2336
|
+
}
|
|
2337
|
+
static getNumber(min, max) {
|
|
2338
|
+
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
2339
|
+
}
|
|
2340
|
+
static getAlphabetsString(length) {
|
|
2341
|
+
let alphabets = "";
|
|
2342
|
+
for(let i = 0; i < length; i++)alphabets += String.fromCharCode($ce55a4fc3c0aa96a$export$e40b5d3c74b04c89.getNumber($ce55a4fc3c0aa96a$export$e40b5d3c74b04c89.codePointA, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89.codePointZ));
|
|
2343
|
+
return alphabets;
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
|
|
2354
|
+
class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2355
|
+
constructor(page){
|
|
2356
|
+
super(page);
|
|
2357
|
+
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
2358
|
+
this.addName = page.locator('.xl-react-components input[placeholder="Add..."]');
|
|
2359
|
+
this.addDescription = page.getByPlaceholder("Set description...");
|
|
2360
|
+
}
|
|
2361
|
+
async clickNewDeliveryPattern() {
|
|
2362
|
+
await this.page.getByTestId("dot-button").click();
|
|
2363
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
2364
|
+
name: "Create delivery pattern"
|
|
2365
|
+
})).toBeVisible();
|
|
2366
|
+
}
|
|
2367
|
+
async setPatternName(patternName) {
|
|
2368
|
+
await this.addName.click();
|
|
2369
|
+
await this.addName.clear();
|
|
2370
|
+
await this.addName.fill(patternName);
|
|
2371
|
+
}
|
|
2372
|
+
async setPatternDescription(patternDescription) {
|
|
2373
|
+
await this.page.getByPlaceholder("Set description...").click();
|
|
2374
|
+
await this.page.getByPlaceholder("Set description...").clear();
|
|
2375
|
+
await this.page.getByPlaceholder("Set description...").fill(patternDescription);
|
|
2376
|
+
}
|
|
2377
|
+
async enableAutoComplete() {
|
|
2378
|
+
await this.page.getByRole("checkbox").check();
|
|
2379
|
+
}
|
|
2380
|
+
async disableAutoComplete() {
|
|
2381
|
+
await this.page.getByRole("checkbox").uncheck();
|
|
2382
|
+
}
|
|
2383
|
+
async setDuration(month, days, hours) {
|
|
2384
|
+
await this.page.getByRole("group", {
|
|
2385
|
+
name: "Pattern details"
|
|
2386
|
+
}).getByRole("textbox").click();
|
|
2387
|
+
await this.page.locator('input[name="months"]').click();
|
|
2388
|
+
await this.page.locator('input[name="months"]').fill(month.toString());
|
|
2389
|
+
await this.page.locator('input[name="days"]').click();
|
|
2390
|
+
await this.page.locator('input[name="days"]').fill(days.toString());
|
|
2391
|
+
await this.page.locator('input[name="hours"]').click();
|
|
2392
|
+
await this.page.locator('input[name="hours"]').fill(hours.toString());
|
|
2393
|
+
}
|
|
2394
|
+
async createNewPattern(patternName, patternDescription) {
|
|
2395
|
+
await this.clickNewDeliveryPattern();
|
|
2396
|
+
await this.setPatternName(patternName);
|
|
2397
|
+
await this.setPatternDescription(patternDescription);
|
|
2398
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#action-toolbar").filter({
|
|
2399
|
+
hasText: "Create"
|
|
2400
|
+
})).toBeEnabled();
|
|
2401
|
+
await this.page.locator("#action-toolbar").filter({
|
|
2402
|
+
hasText: "Create"
|
|
2403
|
+
}).dblclick();
|
|
2404
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
|
|
2405
|
+
}
|
|
2406
|
+
async clickEditPatternIcon(patternName) {
|
|
2407
|
+
await this.page.locator(".delivery-pattern-row").filter({
|
|
2408
|
+
hasText: patternName
|
|
2409
|
+
}).locator(".edit").click();
|
|
2410
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
|
|
2411
|
+
}
|
|
2412
|
+
async clickCopyPatternIcon(patternName) {
|
|
2413
|
+
await this.page.locator(".delivery-pattern-row").filter({
|
|
2414
|
+
hasText: patternName
|
|
2415
|
+
}).locator(".copy").click();
|
|
2416
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Copy delivery pattern")).toBeVisible();
|
|
2417
|
+
}
|
|
2418
|
+
async filterPatternByName(patternName) {
|
|
2419
|
+
await this.page.getByPlaceholder("Filter by name...").click();
|
|
2420
|
+
await this.page.getByPlaceholder("Filter by name...").clear();
|
|
2421
|
+
await this.page.getByPlaceholder("Filter by name...").fill(patternName);
|
|
2422
|
+
await this.page.getByPlaceholder("Filter by name...").press("Enter");
|
|
2423
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".delivery-pattern-row").filter({
|
|
2424
|
+
hasText: patternName
|
|
2425
|
+
})).toBeVisible();
|
|
2426
|
+
}
|
|
2427
|
+
async openProperties() {
|
|
2428
|
+
await this.util.openSideNavMenu("Properties");
|
|
2429
|
+
return new $ceb2e9e08e1837c2$var$Properties(this.page);
|
|
2430
|
+
}
|
|
2431
|
+
async back() {
|
|
2432
|
+
await this.page.getByTestId("back-button").click();
|
|
2433
|
+
}
|
|
2434
|
+
async copyPattern(existingPatternName, NewPatternName) {
|
|
2435
|
+
await this.clickCopyPatternIcon(existingPatternName);
|
|
2436
|
+
await this.page.locator('.confirmation-content .xl-react-component-input-wrapper input[placeholder="Add..."]').click();
|
|
2437
|
+
await this.page.locator(".confirmation-content .close-icon").click();
|
|
2438
|
+
await this.addName.fill(NewPatternName);
|
|
2439
|
+
await this.page.getByRole("button", {
|
|
2440
|
+
name: "Continue"
|
|
2441
|
+
}).click();
|
|
2442
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
|
|
2443
|
+
}
|
|
2444
|
+
async clickDeletePattern(patternName) {
|
|
2445
|
+
await this.page.locator(".delivery-pattern-row").filter({
|
|
2446
|
+
hasText: patternName
|
|
2447
|
+
}).locator(".delete").click();
|
|
2448
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Delete delivery pattern", {
|
|
2449
|
+
exact: true
|
|
2450
|
+
})).toBeVisible();
|
|
2451
|
+
await this.page.getByRole("button", {
|
|
2452
|
+
name: "Delete"
|
|
2453
|
+
}).click();
|
|
2454
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".delivery-pattern-row").filter({
|
|
2455
|
+
hasText: patternName
|
|
2456
|
+
})).not.toBeVisible();
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
class $ceb2e9e08e1837c2$var$Properties extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2460
|
+
constructor(page){
|
|
2461
|
+
super(page);
|
|
2462
|
+
this.addName = page.locator('.xl-react-components input[placeholder="Add..."]');
|
|
2463
|
+
this.addDescription = page.getByPlaceholder("Set description...");
|
|
2464
|
+
}
|
|
2465
|
+
async editName(name) {
|
|
2466
|
+
await this.addName.click();
|
|
2467
|
+
await this.addName.clear();
|
|
2468
|
+
await this.addName.fill(name);
|
|
2469
|
+
}
|
|
2470
|
+
async editDescription(description) {
|
|
2471
|
+
await this.page.getByPlaceholder("Set description...").click();
|
|
2472
|
+
await this.page.getByPlaceholder("Set description...").clear();
|
|
2473
|
+
await this.page.getByPlaceholder("Set description...").fill(description);
|
|
2474
|
+
}
|
|
2475
|
+
async editDuration(month, days, hours) {
|
|
2476
|
+
await this.page.getByRole("group", {
|
|
2477
|
+
name: "Pattern details"
|
|
2478
|
+
}).getByRole("textbox").click();
|
|
2479
|
+
await this.page.locator('input[name="months"]').click();
|
|
2480
|
+
await this.page.locator('input[name="months"]').fill(month.toString());
|
|
2481
|
+
await this.page.locator('input[name="days"]').click();
|
|
2482
|
+
await this.page.locator('input[name="days"]').fill(days.toString());
|
|
2483
|
+
await this.page.locator('input[name="hours"]').click();
|
|
2484
|
+
await this.page.locator('input[name="hours"]').fill(hours.toString());
|
|
2485
|
+
}
|
|
2486
|
+
async save() {
|
|
2487
|
+
await this.page.getByRole("button", {
|
|
2488
|
+
name: "Save"
|
|
2489
|
+
}).click();
|
|
2490
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".saved-text").textContent()).toContain("Last saved on ");
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2496
|
+
constructor(page){
|
|
2497
|
+
super(page);
|
|
2498
|
+
this.patternPage = new (0, $ceb2e9e08e1837c2$export$9b9454a7f137e99b)(page);
|
|
2499
|
+
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
2500
|
+
this.expandButton = this.page.getByRole("button", {
|
|
2501
|
+
name: " Expand"
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2504
|
+
async openFoldersPage() {
|
|
2505
|
+
await this.page.goto("./#/folders");
|
|
2506
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
|
|
2507
|
+
return this;
|
|
2508
|
+
}
|
|
2509
|
+
async backToAllFolders() {
|
|
2510
|
+
await this.page.locator(".icon-back.dot-i").click();
|
|
2511
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
|
|
2512
|
+
await this.page.locator("button.btn-add-folder").isVisible();
|
|
2513
|
+
return this;
|
|
2514
|
+
}
|
|
2515
|
+
async createFolder(folderName) {
|
|
2516
|
+
await this.page.locator("button.btn-add-folder").click();
|
|
2517
|
+
await this.page.locator("div.xl-react-component-input-wrapper").type(folderName);
|
|
2518
|
+
await this.page.locator("button.xl-react-button.button.primary").click();
|
|
2519
|
+
await this.page.locator(`//button[normalize-space()='Add release']`).isVisible();
|
|
2520
|
+
return this;
|
|
2521
|
+
}
|
|
2522
|
+
async openFolder(folderName) {
|
|
2523
|
+
await this.page.locator(`.folder-row-wrapper span:text-is('${folderName}')`).click();
|
|
2524
|
+
return this;
|
|
2525
|
+
}
|
|
2526
|
+
async openGroups() {
|
|
2527
|
+
await this.util.openSideNavMenu("Groups");
|
|
2528
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Groups")).toBeVisible();
|
|
2529
|
+
return this;
|
|
2530
|
+
}
|
|
2531
|
+
async createGroup(groupName) {
|
|
2532
|
+
await this.page.locator("//button[normalize-space()='New release group']").click();
|
|
2533
|
+
await this.page.locator("#title").type(groupName);
|
|
2534
|
+
await this.page.locator("button[type='submit']").click();
|
|
2535
|
+
return this;
|
|
2536
|
+
}
|
|
2537
|
+
async selectPlannedStatus() {
|
|
2538
|
+
await this.page.locator(".remaining-tags").click();
|
|
2539
|
+
await this.page.locator('.xl-react-link:text-is("Clear all")').click();
|
|
2540
|
+
await this.page.locator(".react-tagsinput").click();
|
|
2541
|
+
await this.page.locator(`.yt-option[title=Planned]`).click();
|
|
2542
|
+
await this.page.locator("//span[normalize-space()='Status']").click();
|
|
2543
|
+
return this;
|
|
2544
|
+
}
|
|
2545
|
+
async expectReleaseGroupisDisplayed(title) {
|
|
2546
|
+
//await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
|
|
2547
|
+
await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
|
|
2548
|
+
return this;
|
|
2549
|
+
}
|
|
2550
|
+
async createSubFolder(parentFolder, subFolderName) {
|
|
2551
|
+
await this.expandButton.click();
|
|
2552
|
+
await this.page.getByRole("link", {
|
|
2553
|
+
name: parentFolder
|
|
2554
|
+
}).hover();
|
|
2555
|
+
await this.clickFolderOptions(parentFolder, "add");
|
|
2556
|
+
await this.page.getByRole("textbox").fill(subFolderName);
|
|
2557
|
+
await this.page.getByRole("button", {
|
|
2558
|
+
name: "Create"
|
|
2559
|
+
}).click();
|
|
2560
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2561
|
+
name: subFolderName
|
|
2562
|
+
})).toBeVisible();
|
|
2563
|
+
}
|
|
2564
|
+
async renameFolder(existingFolderName, newFolderName) {
|
|
2565
|
+
await this.expandButton.click();
|
|
2566
|
+
await this.page.getByRole("link", {
|
|
2567
|
+
name: existingFolderName
|
|
2568
|
+
}).hover();
|
|
2569
|
+
await this.clickFolderOptions(existingFolderName, "edit");
|
|
2570
|
+
await this.page.locator(".folder-row-wrapper input").click();
|
|
2571
|
+
await this.page.locator(".folder-row-wrapper input").fill(newFolderName);
|
|
2572
|
+
await this.page.keyboard.press("Enter");
|
|
2573
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2574
|
+
name: newFolderName
|
|
2575
|
+
})).toBeVisible();
|
|
2576
|
+
}
|
|
2577
|
+
async deleteFolder(folderName) {
|
|
2578
|
+
await this.expandButton.click();
|
|
2579
|
+
await this.page.getByRole("link", {
|
|
2580
|
+
name: folderName
|
|
2581
|
+
}).hover();
|
|
2582
|
+
await this.clickFolderOptions(folderName, "delete");
|
|
2583
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
2584
|
+
name: "Delete folder"
|
|
2585
|
+
}).locator("span")).toBeVisible();
|
|
2586
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".xl-react-modal .confirmation-content").getByText("You are about to delete the folder " + folderName + ". Folders nested in " + folderName + " will also be deleted.")).toBeVisible();
|
|
2587
|
+
await this.page.getByRole("button", {
|
|
2588
|
+
name: "Delete"
|
|
2589
|
+
}).click();
|
|
2590
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2591
|
+
name: folderName
|
|
2592
|
+
})).not.toBeVisible();
|
|
2593
|
+
}
|
|
2594
|
+
async searchFolderByName(folderName) {
|
|
2595
|
+
await this.page.getByPlaceholder("Search folder...").click();
|
|
2596
|
+
await this.page.getByPlaceholder("Search folder...").clear();
|
|
2597
|
+
await this.page.getByPlaceholder("Search folder...").fill(folderName);
|
|
2598
|
+
await this.page.getByPlaceholder("Search folder...").press("Enter");
|
|
2599
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2600
|
+
name: folderName
|
|
2601
|
+
})).toBeVisible();
|
|
2602
|
+
}
|
|
2603
|
+
async openPatterns() {
|
|
2604
|
+
await this.util.openSideNavMenu("Patterns");
|
|
2605
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Patterns")).toBeVisible();
|
|
2606
|
+
return this.patternPage;
|
|
2607
|
+
}
|
|
2608
|
+
async clickFolderOptions(folderName, option) {
|
|
2609
|
+
await this.page.locator(".folder-row-wrapper", {
|
|
2610
|
+
hasText: folderName
|
|
2611
|
+
}).locator(`.xl-icon.${option}-icon`).click();
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
class $506d511737b3ea46$export$74ca1eaaa9a0054 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2620
|
+
constructor(page){
|
|
2621
|
+
super(page);
|
|
2622
|
+
this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
|
|
2623
|
+
this.addVariableValue = this.page.locator(".variable-value .xl-components-input-full input");
|
|
2624
|
+
this.addVariablelabel = this.page.locator(".variable-label input");
|
|
2625
|
+
this.listAddButton = this.page.getByRole("button", {
|
|
2626
|
+
name: "Add"
|
|
2627
|
+
});
|
|
2628
|
+
}
|
|
2629
|
+
async addVariableText(valuename) {
|
|
2630
|
+
await this.page.getByRole("combobox").selectOption("StringVariable");
|
|
2631
|
+
await this.page.locator(".variable-value").type(valuename);
|
|
2632
|
+
await this.submitTheVariable();
|
|
2633
|
+
}
|
|
2634
|
+
async addVariableListbox(possiblevalue) {
|
|
2635
|
+
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
2636
|
+
await this.addListValue.fill(possiblevalue);
|
|
2637
|
+
await this.listAddButton.click();
|
|
2638
|
+
await this.page.getByRole("combobox").nth(1).selectOption(possiblevalue);
|
|
2639
|
+
await this.submitTheVariable();
|
|
2640
|
+
}
|
|
2641
|
+
async addVariablePassword(possiblevalue) {
|
|
2642
|
+
await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
|
|
2643
|
+
await this.page.locator('input[type="password"]').type(possiblevalue);
|
|
2644
|
+
await this.submitTheVariable();
|
|
2645
|
+
}
|
|
2646
|
+
async addVariableCheckbox() {
|
|
2647
|
+
await this.page.getByRole("combobox").selectOption("BooleanVariable");
|
|
2648
|
+
await this.page.getByRole("checkbox").check();
|
|
2649
|
+
await this.submitTheVariable();
|
|
2650
|
+
}
|
|
2651
|
+
async addVariableNumber(possiblevalue) {
|
|
2652
|
+
await this.page.getByRole("combobox").selectOption("IntegerVariable");
|
|
2653
|
+
await this.page.locator('input[ng-model="var.value"]').fill(possiblevalue);
|
|
2654
|
+
await this.submitTheVariable();
|
|
2655
|
+
}
|
|
2656
|
+
async addVariableList(possiblevalue1, possiblevalue2) {
|
|
2657
|
+
await this.page.getByRole("combobox").selectOption("ListStringVariable");
|
|
2658
|
+
await this.addVariableValue.fill(possiblevalue1);
|
|
2659
|
+
await this.listAddButton.click();
|
|
2660
|
+
await this.addVariableValue.fill(possiblevalue2);
|
|
2661
|
+
await this.listAddButton.click();
|
|
2662
|
+
await this.submitTheVariable();
|
|
2663
|
+
}
|
|
2664
|
+
async addVariableMultiList(possiblevalue1, possiblevalue2) {
|
|
2665
|
+
await this.page.getByRole("combobox").selectOption("MultiSelectListBox");
|
|
2666
|
+
await this.addListValue.fill(possiblevalue1);
|
|
2667
|
+
await this.listAddButton.click();
|
|
2668
|
+
await this.addListValue.fill(possiblevalue2);
|
|
2669
|
+
await this.listAddButton.click();
|
|
2670
|
+
await this.page.locator(".react-tagsinput").click();
|
|
2671
|
+
await this.page.getByText("Select all", {
|
|
2672
|
+
exact: true
|
|
2673
|
+
}).click();
|
|
2674
|
+
await this.submitTheVariable();
|
|
2675
|
+
}
|
|
2676
|
+
async addVariableDate() {
|
|
2677
|
+
await this.page.getByRole("combobox").selectOption("DateVariable");
|
|
2678
|
+
await this.page.getByText("Select date").click();
|
|
2679
|
+
}
|
|
2680
|
+
async setDate(date, monthYear) {
|
|
2681
|
+
const dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(this.page);
|
|
2682
|
+
await dateUtil.setDate(date, monthYear);
|
|
2683
|
+
}
|
|
2684
|
+
async addVariableKeyValueMap(keys1, values1) {
|
|
2685
|
+
await this.page.getByRole("combobox").selectOption("MapStringStringVariable");
|
|
2686
|
+
await this.page.getByPlaceholder("key").fill(keys1);
|
|
2687
|
+
await this.page.getByPlaceholder("Value").fill(values1);
|
|
2688
|
+
await this.listAddButton.click();
|
|
2689
|
+
await this.page.locator(".xl-map-string-string-div-buttons .search-icon").click();
|
|
2690
|
+
await this.page.getByRole("row", {
|
|
2691
|
+
name: "Search"
|
|
2692
|
+
}).getByRole("textbox").fill(keys1);
|
|
2693
|
+
const detail = await this.page.locator("table.table-condensed span").allInnerTexts();
|
|
2694
|
+
await (0, $kKeXs$playwrighttest.expect)(detail[0]).toEqual(keys1);
|
|
2695
|
+
await (0, $kKeXs$playwrighttest.expect)(detail[1]).toEqual(values1);
|
|
2696
|
+
await this.submitTheVariable();
|
|
2697
|
+
}
|
|
2698
|
+
async addVariableSet(possiblevalue1) {
|
|
2699
|
+
await this.page.getByRole("combobox").selectOption("SetStringVariable");
|
|
2700
|
+
await this.page.locator(".dip-input input").fill(possiblevalue1);
|
|
2701
|
+
await this.listAddButton.click();
|
|
2702
|
+
await this.submitTheVariable();
|
|
2703
|
+
}
|
|
2704
|
+
async addNewVariable(variableName, labelname, description) {
|
|
2705
|
+
await this.page.getByRole("button", {
|
|
2706
|
+
name: "New global variable"
|
|
2707
|
+
}).click();
|
|
2708
|
+
await this.page.locator(`div.input-group > input`).type(variableName);
|
|
2709
|
+
await this.addVariablelabel.fill(labelname);
|
|
2710
|
+
await this.page.locator(".variable-description input").fill(description);
|
|
2711
|
+
}
|
|
2712
|
+
async verifyGlobalVariableCreation(variableName) {
|
|
2713
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
2714
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable.ui-sortable-handle").filter({
|
|
2715
|
+
hasText: variableName
|
|
2716
|
+
})).toBeVisible();
|
|
2717
|
+
}
|
|
2718
|
+
async submitTheVariable() {
|
|
2719
|
+
const pagesubmit = await this.page.locator(".button.save");
|
|
2720
|
+
await pagesubmit.hover();
|
|
2721
|
+
await pagesubmit.click();
|
|
2722
|
+
}
|
|
2723
|
+
async deleteGlobalVariable(variableName) {
|
|
2724
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
2725
|
+
await this.page.getByText("Delete").click();
|
|
2726
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("h4.ng-binding")).toContainText(variableName);
|
|
2727
|
+
await this.page.getByRole("button", {
|
|
2728
|
+
name: "Cancel"
|
|
2729
|
+
}).click();
|
|
2730
|
+
await this.verifyGlobalVariableCreation(variableName);
|
|
2731
|
+
await this.page.getByText("Delete").click();
|
|
2732
|
+
await this.page.getByRole("button", {
|
|
2733
|
+
name: "Delete"
|
|
2734
|
+
}).click();
|
|
2735
|
+
await this.page.locator("alert.notice.ng-scope").isVisible();
|
|
2736
|
+
}
|
|
2737
|
+
async editVariable(variableName, editedvariabletext) {
|
|
2738
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
2739
|
+
await this.page.getByText("Edit").click();
|
|
2740
|
+
await this.addVariablelabel.clear();
|
|
2741
|
+
await this.addVariablelabel.fill(editedvariabletext);
|
|
2742
|
+
await this.page.getByRole("button", {
|
|
2743
|
+
name: "Save"
|
|
2744
|
+
}).click();
|
|
2745
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable.ui-sortable-handle").getByText(editedvariabletext, {
|
|
2746
|
+
exact: true
|
|
2747
|
+
})).toBeVisible();
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
|
+
class $9ef669cf95557cb5$export$36d69433c4f81145 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2754
|
+
constructor(page){
|
|
2755
|
+
super(page);
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
|
|
1876
2760
|
|
|
1877
2761
|
|
|
1878
2762
|
class $be4dd73206d8e76b$export$3cac5fd37ae64b91 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
@@ -1942,11 +2826,13 @@ class $bb5572a48b31014a$export$e2e2e1ffdce20c30 extends (0, $f8721861c660dd88$ex
|
|
|
1942
2826
|
}
|
|
1943
2827
|
|
|
1944
2828
|
|
|
2829
|
+
|
|
1945
2830
|
class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1946
2831
|
constructor(page){
|
|
1947
2832
|
super(page);
|
|
1948
2833
|
this.page = page;
|
|
1949
2834
|
this.modal = new (0, $bb5572a48b31014a$export$e2e2e1ffdce20c30)(page);
|
|
2835
|
+
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
1950
2836
|
}
|
|
1951
2837
|
async openUsersPage() {
|
|
1952
2838
|
this.page.goto("./#/users", {
|
|
@@ -1983,6 +2869,18 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
|
|
|
1983
2869
|
}).locator("i").nth(1).click();
|
|
1984
2870
|
await this.modal.delete();
|
|
1985
2871
|
}
|
|
2872
|
+
async openRoles() {
|
|
2873
|
+
await this.util.openSideNavMenu("Roles");
|
|
2874
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Roles")).toBeVisible();
|
|
2875
|
+
}
|
|
2876
|
+
async openPermissions() {
|
|
2877
|
+
await this.util.openSideNavMenu("Permissions");
|
|
2878
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".permissions-table-v2")).toBeVisible();
|
|
2879
|
+
}
|
|
2880
|
+
async openTaskAccess() {
|
|
2881
|
+
await this.util.openSideNavMenu("Task access");
|
|
2882
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Task access")).toBeVisible();
|
|
2883
|
+
}
|
|
1986
2884
|
}
|
|
1987
2885
|
|
|
1988
2886
|
|
|
@@ -2232,16 +3130,186 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
|
|
|
2232
3130
|
|
|
2233
3131
|
|
|
2234
3132
|
|
|
3133
|
+
class $a6a3c1345fc4767e$export$b6fbc3e67030138f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3134
|
+
async setStatus(status) {
|
|
3135
|
+
await this.page.locator(".react-tagsinput").click({
|
|
3136
|
+
force: true
|
|
3137
|
+
});
|
|
3138
|
+
await this.page.getByText("Clear all").click();
|
|
3139
|
+
await this.page.locator(".react-tagsinput").click({
|
|
3140
|
+
force: true
|
|
3141
|
+
});
|
|
3142
|
+
if (status === "Select all") await this.page.getByText(status).click();
|
|
3143
|
+
else await this.page.getByTitle(status).locator("i").first().click();
|
|
3144
|
+
}
|
|
3145
|
+
async openReleaseGroup(title) {
|
|
3146
|
+
await this.page.locator("xlr-release-group-row").filter({
|
|
3147
|
+
hasText: title
|
|
3148
|
+
}).getByRole("link").click();
|
|
3149
|
+
await this.page.getByTitle(title).click();
|
|
3150
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveURL(/.*ReleaseGroup/);
|
|
3151
|
+
}
|
|
3152
|
+
async expectReleaseGroupStatus(status) {
|
|
3153
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-status")).toContainText(status);
|
|
3154
|
+
}
|
|
3155
|
+
async expectReleaseGroupDisplayed(title) {
|
|
3156
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
3157
|
+
exact: true
|
|
3158
|
+
})).toBeVisible();
|
|
3159
|
+
}
|
|
3160
|
+
async expectReleaseGroupNotDisplayed(title) {
|
|
3161
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
3162
|
+
exact: true
|
|
3163
|
+
})).not.toBeVisible();
|
|
3164
|
+
}
|
|
3165
|
+
async searchReleaseGroupByTitle(title) {
|
|
3166
|
+
await this.page.getByPlaceholder("Search for groups...", {
|
|
3167
|
+
exact: true
|
|
3168
|
+
}).click();
|
|
3169
|
+
await this.page.getByPlaceholder("Search for groups...", {
|
|
3170
|
+
exact: true
|
|
3171
|
+
}).fill(title);
|
|
3172
|
+
await this.page.getByPlaceholder("Search for groups...", {
|
|
3173
|
+
exact: true
|
|
3174
|
+
}).press("Enter");
|
|
3175
|
+
}
|
|
3176
|
+
async deleteReleaseGroup(title) {
|
|
3177
|
+
await this.page.locator(".fc-list-item-line").filter({
|
|
3178
|
+
hasText: title
|
|
3179
|
+
}).locator(".fc-item-delete").click();
|
|
3180
|
+
await this.page.getByRole("button", {
|
|
3181
|
+
name: "Delete"
|
|
3182
|
+
}).click();
|
|
3183
|
+
}
|
|
3184
|
+
async clickReleaseGroupEdit(title) {
|
|
3185
|
+
await this.page.locator(".fc-list-item-line").filter({
|
|
3186
|
+
hasText: title
|
|
3187
|
+
}).locator(".fc-item-update").click();
|
|
3188
|
+
}
|
|
3189
|
+
async enterReleaseGroupDetails(new_title) {
|
|
3190
|
+
await this.page.locator(".modal-body").locator("#title").fill(new_title);
|
|
3191
|
+
}
|
|
3192
|
+
async clickSaveButton() {
|
|
3193
|
+
await this.page.locator(".modal-footer").getByRole("button", {
|
|
3194
|
+
name: "Save"
|
|
3195
|
+
}).click();
|
|
3196
|
+
}
|
|
3197
|
+
async clickCancelButton() {
|
|
3198
|
+
await this.page.locator(".modal-footer").getByRole("button", {
|
|
3199
|
+
name: "Cancel"
|
|
3200
|
+
}).click();
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
|
|
3205
|
+
|
|
3206
|
+
|
|
3207
|
+
class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3208
|
+
async expectReleaseDisplayed(title) {
|
|
3209
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
3210
|
+
exact: true
|
|
3211
|
+
})).toBeVisible();
|
|
3212
|
+
}
|
|
3213
|
+
async expectReleaseNotDisplayed(title) {
|
|
3214
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
3215
|
+
exact: true
|
|
3216
|
+
})).not.toBeVisible({
|
|
3217
|
+
timeout: 10000
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
async expectPhaseDisplayed(title) {
|
|
3221
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
3222
|
+
exact: true
|
|
3223
|
+
})).toBeVisible();
|
|
3224
|
+
}
|
|
3225
|
+
async openContextMenu(title) {
|
|
3226
|
+
await this.page.locator(".timeline-row-name").filter({
|
|
3227
|
+
hasText: title
|
|
3228
|
+
}).locator(".options-icon").click();
|
|
3229
|
+
}
|
|
3230
|
+
async removeFromReleaseGroup() {
|
|
3231
|
+
await this.page.getByRole("menuitem", {
|
|
3232
|
+
name: "Remove from group"
|
|
3233
|
+
}).locator("a").click();
|
|
3234
|
+
await this.page.getByRole("button", {
|
|
3235
|
+
name: "Remove"
|
|
3236
|
+
}).click();
|
|
3237
|
+
}
|
|
3238
|
+
async expectNumberOfReleases(num_of_release) {
|
|
3239
|
+
const elementCount = await this.page.locator(".timeline-row-name-release").count();
|
|
3240
|
+
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
3241
|
+
}
|
|
3242
|
+
async openAddReleaseList() {
|
|
3243
|
+
await this.page.getByRole("button", {
|
|
3244
|
+
name: "Add release"
|
|
3245
|
+
}).click();
|
|
3246
|
+
}
|
|
3247
|
+
async filterReleases(title) {
|
|
3248
|
+
await this.page.getByPlaceholder("Search for a release...").click();
|
|
3249
|
+
await this.page.getByPlaceholder("Search for a release...").fill(title);
|
|
3250
|
+
await this.page.waitForTimeout(5000);
|
|
3251
|
+
await this.page.getByPlaceholder("Search for a release...").press("Enter");
|
|
3252
|
+
}
|
|
3253
|
+
async expectNumberOfReleasesOnModal(num_of_release) {
|
|
3254
|
+
const elementCount = await this.page.locator(".release-modal-line").count();
|
|
3255
|
+
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
3256
|
+
}
|
|
3257
|
+
async selectAllReleaseCheckbox() {
|
|
3258
|
+
await this.page.getByLabel("Select all").check();
|
|
3259
|
+
}
|
|
3260
|
+
async addReleasesToGroup() {
|
|
3261
|
+
await this.page.getByRole("button", {
|
|
3262
|
+
name: "Add"
|
|
3263
|
+
}).click();
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
|
|
3268
|
+
|
|
3269
|
+
|
|
2235
3270
|
|
|
2236
3271
|
|
|
2237
3272
|
class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2238
3273
|
constructor(page){
|
|
2239
3274
|
super(page);
|
|
2240
3275
|
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
3276
|
+
this.commentBox = this.page.locator(`.input-block-level`);
|
|
2241
3277
|
}
|
|
2242
3278
|
async openTask(taskName) {
|
|
2243
3279
|
await this.filterTaskByTitle(taskName);
|
|
2244
|
-
await this.page.getByText(taskName).click();
|
|
3280
|
+
await this.page.getByText(taskName).first().click();
|
|
3281
|
+
}
|
|
3282
|
+
async skip(taskName, comment) {
|
|
3283
|
+
await this.page.locator(`.row.task-inner`, {
|
|
3284
|
+
hasText: taskName
|
|
3285
|
+
}).locator("span.skip").click();
|
|
3286
|
+
await this.commentBox.click();
|
|
3287
|
+
await this.commentBox.fill(comment);
|
|
3288
|
+
await this.page.getByRole("button", {
|
|
3289
|
+
name: "Skip",
|
|
3290
|
+
exact: true
|
|
3291
|
+
}).click();
|
|
3292
|
+
}
|
|
3293
|
+
async fail(taskName, comment) {
|
|
3294
|
+
await this.page.locator(`.row.task-inner`, {
|
|
3295
|
+
hasText: taskName
|
|
3296
|
+
}).locator("span.fail").click();
|
|
3297
|
+
await this.commentBox.click();
|
|
3298
|
+
await this.commentBox.fill(comment);
|
|
3299
|
+
await this.page.getByRole("button", {
|
|
3300
|
+
name: "Fail",
|
|
3301
|
+
exact: true
|
|
3302
|
+
}).click();
|
|
3303
|
+
}
|
|
3304
|
+
async waitForTaskFailed(taskName) {
|
|
3305
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`, {
|
|
3306
|
+
hasText: taskName
|
|
3307
|
+
}).getByText("Failed")).toBeVisible();
|
|
3308
|
+
}
|
|
3309
|
+
async waitForTaskInProgress(taskName) {
|
|
3310
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`, {
|
|
3311
|
+
hasText: taskName
|
|
3312
|
+
}).getByText("In progress")).toBeVisible();
|
|
2245
3313
|
}
|
|
2246
3314
|
async openTaskInReleaseView(taskName) {
|
|
2247
3315
|
await this.page.locator(`.row.task-inner`, {
|
|
@@ -2253,13 +3321,18 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
|
|
|
2253
3321
|
hasText: taskName
|
|
2254
3322
|
}).locator(`.calendar-link a`).click();
|
|
2255
3323
|
}
|
|
3324
|
+
async openTaskDrawer(taskName) {
|
|
3325
|
+
await this.page.locator(`.row.task-inner`, {
|
|
3326
|
+
hasText: taskName
|
|
3327
|
+
}).getByText(taskName).click();
|
|
3328
|
+
}
|
|
2256
3329
|
async filterTaskByTitle(taskname) {
|
|
2257
|
-
await this.page.locator(".
|
|
3330
|
+
await this.page.locator(".searchFilter").click();
|
|
2258
3331
|
await this.page.locator(".searchFilter").fill(taskname);
|
|
2259
3332
|
await this.page.locator(".searchFilter").press("Enter");
|
|
2260
3333
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("//div[@data-task-title]").filter({
|
|
2261
3334
|
hasText: taskname
|
|
2262
|
-
})).toBeVisible();
|
|
3335
|
+
}).first()).toBeVisible();
|
|
2263
3336
|
}
|
|
2264
3337
|
async filterTasksByTag(tag, taskTitleForValidation) {
|
|
2265
3338
|
await this.page.locator(".toggle-search-filter").click();
|
|
@@ -2294,38 +3367,72 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
|
|
|
2294
3367
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".view-in-release")).not.toBeVisible();
|
|
2295
3368
|
}
|
|
2296
3369
|
}
|
|
3370
|
+
async openTaskList() {
|
|
3371
|
+
await this.page.goto("./#/tasks");
|
|
3372
|
+
}
|
|
3373
|
+
async clickOnAssigneeButton(title) {
|
|
3374
|
+
await this.page.locator(`.btn-group-filter.btn-group button.btn.btn-flat[title="${title}"]`).click();
|
|
3375
|
+
}
|
|
3376
|
+
async expectTaskNotDisplayed(taskTitle) {
|
|
3377
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`).filter({
|
|
3378
|
+
hasText: taskTitle
|
|
3379
|
+
}).getByText(taskTitle)).toHaveCount(0);
|
|
3380
|
+
}
|
|
3381
|
+
async clickOnStatusField() {
|
|
3382
|
+
await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
|
|
3383
|
+
}
|
|
3384
|
+
async clickOnStatus(statusNames) {
|
|
3385
|
+
await this.clickOnStatusClearAll();
|
|
3386
|
+
await this.clickOnStatusField();
|
|
3387
|
+
for(let i = 0; i < statusNames.length; i++)await this.page.locator(`i.xl-icon.icon-s.checkbox[data='${statusNames[i]}']`).click();
|
|
3388
|
+
// Clicking outside to close the grid dropdown
|
|
3389
|
+
await this.clickOnTasksLabel();
|
|
3390
|
+
}
|
|
3391
|
+
async clickOnStatusClearAll() {
|
|
3392
|
+
await this.clickOnStatusField();
|
|
3393
|
+
await this.page.locator("a.xl-react-link", {
|
|
3394
|
+
hasText: "Clear all"
|
|
3395
|
+
}).click();
|
|
3396
|
+
await this.clickOnTasksLabel();
|
|
3397
|
+
}
|
|
3398
|
+
async clickOnStatusSelectAll() {
|
|
3399
|
+
await this.clickOnStatusField();
|
|
3400
|
+
await this.page.locator("a.xl-react-link", {
|
|
3401
|
+
hasText: "Select all"
|
|
3402
|
+
}).click();
|
|
3403
|
+
await this.clickOnTasksLabel();
|
|
3404
|
+
}
|
|
3405
|
+
async assignTaskToMe(title) {
|
|
3406
|
+
await this.page.locator(`.task-line`).filter({
|
|
3407
|
+
hasText: title
|
|
3408
|
+
}).locator(`.assign-to-me`).click();
|
|
3409
|
+
await this.page.locator('.modal:visible >> text="Assign to me"').click();
|
|
3410
|
+
}
|
|
3411
|
+
async expectTaskAssignedToMe(title) {
|
|
3412
|
+
await this.expectTaskAssignedTo(title, "me");
|
|
3413
|
+
}
|
|
3414
|
+
async expectTaskAssignedTo(title, user) {
|
|
3415
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task-line:has-text("${title}") >> text="${user}"`).first()).toHaveCount(1);
|
|
3416
|
+
}
|
|
2297
3417
|
async expectTaskTitle(taskTitle) {
|
|
2298
3418
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
|
|
2299
3419
|
}
|
|
3420
|
+
async clickOnTasksLabel() {
|
|
3421
|
+
await this.page.getByLabel("breadcrumb").getByText("Tasks").click();
|
|
3422
|
+
}
|
|
2300
3423
|
async expectGroupView(expected = true) {
|
|
2301
3424
|
if (expected) {
|
|
2302
3425
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#group-tasks-by-release")).toBeChecked();
|
|
2303
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).toBeVisible();
|
|
2304
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).not.toBeVisible();
|
|
2305
|
-
} else {
|
|
2306
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#group-tasks-by-release")).not.toBeChecked();
|
|
2307
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).not.toBeVisible();
|
|
2308
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).toBeVisible();
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
async changeGroupView() {
|
|
2312
|
-
await this.page.locator("#group-tasks-by-release").click();
|
|
2313
|
-
}
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
class $4efca3d4eadf892b$export$6adb8dd3f0d1e432 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2320
|
-
constructor(page){
|
|
2321
|
-
super(page);
|
|
2322
|
-
this.tempDir = "";
|
|
2323
|
-
this.content = "";
|
|
3426
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).toBeVisible();
|
|
3427
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).not.toBeVisible();
|
|
3428
|
+
} else {
|
|
3429
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#group-tasks-by-release")).not.toBeChecked();
|
|
3430
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).not.toBeVisible();
|
|
3431
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).toBeVisible();
|
|
3432
|
+
}
|
|
2324
3433
|
}
|
|
2325
|
-
async
|
|
2326
|
-
|
|
2327
|
-
const tempDir = testInfo.outputPath(fileName.toString());
|
|
2328
|
-
$kKeXs$fs.promises.writeFile(tempDir, content, "utf8");
|
|
3434
|
+
async changeGroupView() {
|
|
3435
|
+
await this.page.locator("#group-tasks-by-release").click();
|
|
2329
3436
|
}
|
|
2330
3437
|
}
|
|
2331
3438
|
|
|
@@ -2452,11 +3559,12 @@ class $3048f12d9d777352$export$98de9bca7d44fc1a extends (0, $f8721861c660dd88$ex
|
|
|
2452
3559
|
await this.page.locator("#release-form-title").fill(name);
|
|
2453
3560
|
}
|
|
2454
3561
|
async setDescription(description) {
|
|
2455
|
-
await this.page.getByText("Set description...").
|
|
2456
|
-
await this.page.locator("
|
|
2457
|
-
hasText: "Set description
|
|
2458
|
-
}).locator("
|
|
3562
|
+
await this.page.getByText("Set description...").hover();
|
|
3563
|
+
await this.page.locator(".display").filter({
|
|
3564
|
+
hasText: "Set description"
|
|
3565
|
+
}).locator(".edit-icon").click();
|
|
2459
3566
|
await this.page.locator("textarea").click();
|
|
3567
|
+
await this.page.locator("textarea").clear();
|
|
2460
3568
|
await this.page.locator("textarea").fill(description);
|
|
2461
3569
|
await this.page.getByText("Save", {
|
|
2462
3570
|
exact: true
|
|
@@ -2504,13 +3612,16 @@ class $b12db2561a3bf785$export$899a7095bab1879d extends (0, $f8721861c660dd88$ex
|
|
|
2504
3612
|
}
|
|
2505
3613
|
|
|
2506
3614
|
|
|
3615
|
+
|
|
2507
3616
|
class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2508
3617
|
constructor(page){
|
|
2509
3618
|
super(page);
|
|
2510
3619
|
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
3620
|
+
this.phaseTitle = page.locator(".phase .phase-title");
|
|
2511
3621
|
this.properties = new (0, $f4ca0e32f2cf5291$export$ccf2756779bad715)(page);
|
|
2512
3622
|
this.createTemplatePage = new (0, $3048f12d9d777352$export$98de9bca7d44fc1a)(page);
|
|
2513
3623
|
this.triggers = new (0, $b12db2561a3bf785$export$899a7095bab1879d)(page);
|
|
3624
|
+
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
2514
3625
|
}
|
|
2515
3626
|
async openTemplateMenu(menuItem) {
|
|
2516
3627
|
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
@@ -2523,6 +3634,12 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
|
|
|
2523
3634
|
}).click();
|
|
2524
3635
|
return this.taskDrawer;
|
|
2525
3636
|
}
|
|
3637
|
+
async openTaskDrawerFromTableView(taskName) {
|
|
3638
|
+
await this.page.locator(".name-cell-title").getByText(taskName, {
|
|
3639
|
+
exact: true
|
|
3640
|
+
}).click();
|
|
3641
|
+
return this.taskDrawer;
|
|
3642
|
+
}
|
|
2526
3643
|
async openTaskDrawerFromGrantt(taskName) {
|
|
2527
3644
|
await this.page.locator(".gantt_tree_content").getByText(taskName, {
|
|
2528
3645
|
exact: true
|
|
@@ -2530,19 +3647,39 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
|
|
|
2530
3647
|
return this.taskDrawer;
|
|
2531
3648
|
}
|
|
2532
3649
|
async openProperties() {
|
|
2533
|
-
await this.
|
|
3650
|
+
await this.util.openSideNavMenu("Properties");
|
|
3651
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Properties")).toBeVisible();
|
|
3652
|
+
}
|
|
3653
|
+
async openVariables() {
|
|
3654
|
+
await this.util.openSideNavMenu("Variables");
|
|
3655
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
|
|
3656
|
+
}
|
|
3657
|
+
async openRelationships() {
|
|
3658
|
+
await this.util.openSideNavMenu("Relationships");
|
|
3659
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Relationships")).toBeVisible();
|
|
3660
|
+
}
|
|
3661
|
+
async openTeamsPermissions() {
|
|
3662
|
+
await this.util.openSideNavMenu("Teams & Permissions");
|
|
3663
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Teams & Permissions")).toBeVisible();
|
|
3664
|
+
}
|
|
3665
|
+
async openDashboard() {
|
|
3666
|
+
await this.util.openSideNavMenu("Dashboard");
|
|
3667
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
|
|
3668
|
+
}
|
|
3669
|
+
async openActivityLogs() {
|
|
3670
|
+
await this.util.openSideNavMenu("Activity logs");
|
|
3671
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
|
|
2534
3672
|
}
|
|
2535
3673
|
async openTriggers() {
|
|
2536
3674
|
await this.openTemplateMenu("Triggers");
|
|
3675
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Triggers")).toBeVisible();
|
|
2537
3676
|
}
|
|
2538
3677
|
async backToTemplate() {
|
|
2539
3678
|
await this.page.locator(".icon-back").click();
|
|
2540
3679
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
|
|
2541
3680
|
}
|
|
2542
3681
|
async expectTemplateLabelToBePresent() {
|
|
2543
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.
|
|
2544
|
-
hasText: "TEMPLATE"
|
|
2545
|
-
})).toBeVisible();
|
|
3682
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("template-workflow-pill").getByText("Template")).toBeVisible();
|
|
2546
3683
|
}
|
|
2547
3684
|
async expectSubPage(menuItem, toBePresent) {
|
|
2548
3685
|
if (toBePresent) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
@@ -2553,20 +3690,20 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
|
|
|
2553
3690
|
})).not.toBeVisible();
|
|
2554
3691
|
}
|
|
2555
3692
|
async openFlowView() {
|
|
2556
|
-
await this.
|
|
3693
|
+
await this.util.openSideNavMenu("Flow");
|
|
2557
3694
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content")).toBeVisible();
|
|
2558
3695
|
}
|
|
2559
3696
|
async openTableView() {
|
|
2560
|
-
await this.
|
|
3697
|
+
await this.util.openSideNavMenu("Table");
|
|
2561
3698
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
2562
3699
|
}
|
|
2563
3700
|
async openPlannerView() {
|
|
2564
|
-
await this.
|
|
3701
|
+
await this.util.openSideNavMenu("Planner");
|
|
2565
3702
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
|
|
2566
3703
|
}
|
|
2567
3704
|
async openCodeView() {
|
|
2568
|
-
await this.
|
|
2569
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.
|
|
3705
|
+
await this.util.openSideNavMenu("Code");
|
|
3706
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Code")).toBeVisible();
|
|
2570
3707
|
}
|
|
2571
3708
|
async expandGanttFolder() {
|
|
2572
3709
|
const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
|
|
@@ -2578,6 +3715,108 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
|
|
|
2578
3715
|
}
|
|
2579
3716
|
}
|
|
2580
3717
|
}
|
|
3718
|
+
async addNewPhase(phaseName) {
|
|
3719
|
+
await this.page.getByTestId("add-phase-btn").click();
|
|
3720
|
+
if (phaseName) {
|
|
3721
|
+
await this.phaseTitle.getByText("New Phase").click();
|
|
3722
|
+
await this.phaseTitle.getByRole("textbox").clear();
|
|
3723
|
+
await this.phaseTitle.getByRole("textbox").fill(phaseName);
|
|
3724
|
+
await this.page.keyboard.press("Enter");
|
|
3725
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
|
|
3726
|
+
hasText: phaseName
|
|
3727
|
+
})).toBeVisible();
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
async renamePhase(oldPhaseName, newPhaseName) {
|
|
3731
|
+
await this.phaseTitle.getByText(oldPhaseName).click();
|
|
3732
|
+
await this.phaseTitle.filter({
|
|
3733
|
+
hasText: oldPhaseName
|
|
3734
|
+
}).locator(".editable").clear();
|
|
3735
|
+
await this.phaseTitle.filter({
|
|
3736
|
+
hasText: oldPhaseName
|
|
3737
|
+
}).locator(".editable").fill(newPhaseName);
|
|
3738
|
+
await this.page.keyboard.press("Enter");
|
|
3739
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
|
|
3740
|
+
hasText: newPhaseName
|
|
3741
|
+
})).toBeVisible();
|
|
3742
|
+
}
|
|
3743
|
+
getPhase(phaseName) {
|
|
3744
|
+
return new $959d38250779aa22$var$Phase(this.page, phaseName);
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
class $959d38250779aa22$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3748
|
+
constructor(page, phaseName){
|
|
3749
|
+
super(page);
|
|
3750
|
+
this.phaseLocator = page.locator(".phase", {
|
|
3751
|
+
hasText: phaseName
|
|
3752
|
+
});
|
|
3753
|
+
}
|
|
3754
|
+
async setTitle(title) {
|
|
3755
|
+
await this.phaseLocator.locator(".phase-header .display").click();
|
|
3756
|
+
await this.phaseLocator.locator(".phase-header input").clear();
|
|
3757
|
+
await this.phaseLocator.locator(".phase-header input").fill(title);
|
|
3758
|
+
await this.phaseLocator.locator(".phase-header input").blur();
|
|
3759
|
+
}
|
|
3760
|
+
async expectTaskBorderWithColor(taskName, color) {
|
|
3761
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
|
|
3762
|
+
}
|
|
3763
|
+
/**
|
|
3764
|
+
*
|
|
3765
|
+
* @param taskTitle Title of the task
|
|
3766
|
+
* @param taskType : Type of the task
|
|
3767
|
+
* @param taskTypeSelector : Selector of the task
|
|
3768
|
+
*/ async addTaskInPhase(taskTitle, taskGroup, taskType) {
|
|
3769
|
+
await this.phaseLocator.getByText("Add task").click();
|
|
3770
|
+
await this.phaseLocator.getByLabel("Open", {
|
|
3771
|
+
exact: true
|
|
3772
|
+
}).click();
|
|
3773
|
+
await this.phaseLocator.getByPlaceholder("Start typing to filter task").fill(taskGroup);
|
|
3774
|
+
await this.page.getByTestId(taskType).click();
|
|
3775
|
+
await this.phaseLocator.locator("#task-title").fill(taskTitle);
|
|
3776
|
+
await this.phaseLocator.getByTestId("save-select-task-btn").click();
|
|
3777
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
|
|
3778
|
+
}
|
|
3779
|
+
async getNumberOfTasks() {
|
|
3780
|
+
return await this.phaseLocator.locator(".task").count();
|
|
3781
|
+
}
|
|
3782
|
+
async expectToHaveNoneditableTitle(phaseTitle) {
|
|
3783
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title > span")).toContainText(phaseTitle);
|
|
3784
|
+
}
|
|
3785
|
+
async expectToHaveTitle(phaseTitle) {
|
|
3786
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
|
|
3787
|
+
}
|
|
3788
|
+
async deleteTaskInPhase(taskName) {
|
|
3789
|
+
await this.page.locator(".task").filter({
|
|
3790
|
+
hasText: taskName
|
|
3791
|
+
}).locator(".xl-icon.options-icon").click();
|
|
3792
|
+
await this.page.locator(".remove-task-button").click();
|
|
3793
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
3794
|
+
name: "Delete Task"
|
|
3795
|
+
})).toBeVisible();
|
|
3796
|
+
await this.page.getByRole("button", {
|
|
3797
|
+
name: "Delete"
|
|
3798
|
+
}).click();
|
|
3799
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator("li").filter({
|
|
3800
|
+
hasText: taskName
|
|
3801
|
+
})).not.toBeVisible();
|
|
3802
|
+
}
|
|
3803
|
+
async deletePhase(phaseName) {
|
|
3804
|
+
await this.page.locator(".phase-header").filter({
|
|
3805
|
+
hasText: phaseName
|
|
3806
|
+
}).locator(".actions").hover();
|
|
3807
|
+
await this.page.locator(".phase-header").filter({
|
|
3808
|
+
hasText: phaseName
|
|
3809
|
+
}).locator(".delete-icon").click();
|
|
3810
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
3811
|
+
name: "Delete Phase"
|
|
3812
|
+
})).toBeVisible();
|
|
3813
|
+
await this.page.getByRole("button", {
|
|
3814
|
+
name: "Delete"
|
|
3815
|
+
}).click();
|
|
3816
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".phase-header").filter({
|
|
3817
|
+
hasText: phaseName
|
|
3818
|
+
})).not.toBeVisible();
|
|
3819
|
+
}
|
|
2581
3820
|
}
|
|
2582
3821
|
|
|
2583
3822
|
|
|
@@ -2611,6 +3850,45 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
|
|
|
2611
3850
|
hasText: "TEMPLATE"
|
|
2612
3851
|
})).toBeVisible();
|
|
2613
3852
|
}
|
|
3853
|
+
async move(templateName, targetFolder) {
|
|
3854
|
+
await this.page.locator(".title").filter({
|
|
3855
|
+
hasText: templateName
|
|
3856
|
+
}).locator(".move").click();
|
|
3857
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Move template to")).toBeVisible();
|
|
3858
|
+
await this.page.getByRole("button", {
|
|
3859
|
+
name: "Expand"
|
|
3860
|
+
}).click();
|
|
3861
|
+
await this.page.getByPlaceholder("Search folder...").click();
|
|
3862
|
+
await this.page.getByPlaceholder("Search folder...").fill(targetFolder);
|
|
3863
|
+
await this.page.getByRole("button", {
|
|
3864
|
+
name: targetFolder
|
|
3865
|
+
}).click();
|
|
3866
|
+
await this.page.getByRole("button", {
|
|
3867
|
+
name: "Move"
|
|
3868
|
+
}).click();
|
|
3869
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Add", {
|
|
3870
|
+
exact: true
|
|
3871
|
+
})).toBeVisible();
|
|
3872
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Remove")).toBeVisible();
|
|
3873
|
+
await this.page.getByRole("button", {
|
|
3874
|
+
name: "Move"
|
|
3875
|
+
}).click();
|
|
3876
|
+
}
|
|
3877
|
+
async metaInformation(templateName, validationMsg) {
|
|
3878
|
+
await this.page.locator(".title").filter({
|
|
3879
|
+
hasText: templateName
|
|
3880
|
+
}).locator(".template-context-menu").click();
|
|
3881
|
+
await this.page.getByRole("menuitem", {
|
|
3882
|
+
name: "Meta information"
|
|
3883
|
+
}).locator("a").click();
|
|
3884
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
3885
|
+
name: "Meta information - " + templateName
|
|
3886
|
+
})).toBeVisible();
|
|
3887
|
+
if (validationMsg) await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(validationMsg)).toBeVisible();
|
|
3888
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
3889
|
+
name: "Close"
|
|
3890
|
+
})).toBeVisible();
|
|
3891
|
+
}
|
|
2614
3892
|
async expectTemplateVisible(title, expected = true) {
|
|
2615
3893
|
if (expected) {
|
|
2616
3894
|
await this.page.locator(".template").filter({
|
|
@@ -2629,6 +3907,7 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
|
|
|
2629
3907
|
}
|
|
2630
3908
|
}
|
|
2631
3909
|
async delete(title) {
|
|
3910
|
+
await this.searchBy(title);
|
|
2632
3911
|
await this.page.locator(".title").filter({
|
|
2633
3912
|
hasText: title
|
|
2634
3913
|
}).locator(".delete").waitFor();
|
|
@@ -2649,15 +3928,7 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
|
|
|
2649
3928
|
}).click();
|
|
2650
3929
|
}
|
|
2651
3930
|
async openTemplateByName(templateName) {
|
|
2652
|
-
await this.
|
|
2653
|
-
exact: true
|
|
2654
|
-
}).click();
|
|
2655
|
-
await this.page.getByPlaceholder("Filter by title...", {
|
|
2656
|
-
exact: true
|
|
2657
|
-
}).fill(templateName);
|
|
2658
|
-
await this.page.getByPlaceholder("Filter by title...", {
|
|
2659
|
-
exact: true
|
|
2660
|
-
}).press("Enter");
|
|
3931
|
+
await this.filterByTitle(templateName);
|
|
2661
3932
|
await this.page.locator(`.template`).filter({
|
|
2662
3933
|
hasText: templateName
|
|
2663
3934
|
}).locator(`.raised-link`).waitFor();
|
|
@@ -2665,162 +3936,49 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
|
|
|
2665
3936
|
hasText: templateName
|
|
2666
3937
|
}).locator(`.raised-link`).click();
|
|
2667
3938
|
}
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
async setStatus(status) {
|
|
2675
|
-
await this.page.locator(".react-tagsinput").click({
|
|
2676
|
-
force: true
|
|
2677
|
-
});
|
|
2678
|
-
await this.page.getByText("Clear all").click();
|
|
2679
|
-
await this.page.locator(".react-tagsinput").click({
|
|
2680
|
-
force: true
|
|
2681
|
-
});
|
|
2682
|
-
if (status === "Select all") await this.page.getByText(status).click();
|
|
2683
|
-
else await this.page.getByTitle(status).locator("i").first().click();
|
|
2684
|
-
}
|
|
2685
|
-
async openReleaseGroup(title) {
|
|
2686
|
-
await this.page.locator("xlr-release-group-row").filter({
|
|
2687
|
-
hasText: title
|
|
2688
|
-
}).getByRole("link").click();
|
|
2689
|
-
await this.page.getByTitle(title).click();
|
|
2690
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveURL(/.*ReleaseGroup/);
|
|
2691
|
-
}
|
|
2692
|
-
async expectReleaseGroupStatus(status) {
|
|
2693
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-status")).toContainText(status);
|
|
2694
|
-
}
|
|
2695
|
-
async expectReleaseGroupDisplayed(title) {
|
|
2696
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
2697
|
-
exact: true
|
|
3939
|
+
async clickNewReleaseIcon(templateName) {
|
|
3940
|
+
await this.page.locator("xlr-template-row-component").filter({
|
|
3941
|
+
hasText: templateName
|
|
3942
|
+
}).locator(".link .add-icon").click();
|
|
3943
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
3944
|
+
name: "Create new release"
|
|
2698
3945
|
})).toBeVisible();
|
|
2699
3946
|
}
|
|
2700
|
-
async
|
|
2701
|
-
await
|
|
2702
|
-
exact: true
|
|
2703
|
-
})).not.toBeVisible();
|
|
2704
|
-
}
|
|
2705
|
-
async searchReleaseGroupByTitle(title) {
|
|
2706
|
-
await this.page.getByPlaceholder("Search for groups...", {
|
|
3947
|
+
async filterByTitle(templateName) {
|
|
3948
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
2707
3949
|
exact: true
|
|
2708
3950
|
}).click();
|
|
2709
|
-
await this.page.getByPlaceholder("
|
|
3951
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
2710
3952
|
exact: true
|
|
2711
|
-
}).fill(
|
|
2712
|
-
await this.page.getByPlaceholder("
|
|
3953
|
+
}).fill(templateName);
|
|
3954
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
2713
3955
|
exact: true
|
|
2714
3956
|
}).press("Enter");
|
|
2715
3957
|
}
|
|
2716
|
-
async deleteReleaseGroup(title) {
|
|
2717
|
-
await this.page.locator(".fc-list-item-line").filter({
|
|
2718
|
-
hasText: title
|
|
2719
|
-
}).locator(".fc-item-delete").click();
|
|
2720
|
-
await this.page.getByRole("button", {
|
|
2721
|
-
name: "Delete"
|
|
2722
|
-
}).click();
|
|
2723
|
-
}
|
|
2724
|
-
async clickReleaseGroupEdit(title) {
|
|
2725
|
-
await this.page.locator(".fc-list-item-line").filter({
|
|
2726
|
-
hasText: title
|
|
2727
|
-
}).locator(".fc-item-update").click();
|
|
2728
|
-
}
|
|
2729
|
-
async enterReleaseGroupDetails(new_title) {
|
|
2730
|
-
await this.page.locator(".modal-body").locator("#title").fill(new_title);
|
|
2731
|
-
}
|
|
2732
|
-
async clickSaveButton() {
|
|
2733
|
-
await this.page.locator(".modal-footer").getByRole("button", {
|
|
2734
|
-
name: "Save"
|
|
2735
|
-
}).click();
|
|
2736
|
-
}
|
|
2737
|
-
async clickCancelButton() {
|
|
2738
|
-
await this.page.locator(".modal-footer").getByRole("button", {
|
|
2739
|
-
name: "Cancel"
|
|
2740
|
-
}).click();
|
|
2741
|
-
}
|
|
2742
3958
|
}
|
|
2743
3959
|
|
|
2744
3960
|
|
|
2745
3961
|
|
|
2746
|
-
|
|
2747
|
-
class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2748
|
-
async expectReleaseDisplayed(title) {
|
|
2749
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
2750
|
-
exact: true
|
|
2751
|
-
})).toBeVisible();
|
|
2752
|
-
}
|
|
2753
|
-
async expectReleaseNotDisplayed(title) {
|
|
2754
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
2755
|
-
exact: true
|
|
2756
|
-
})).not.toBeVisible({
|
|
2757
|
-
timeout: 10000
|
|
2758
|
-
});
|
|
2759
|
-
}
|
|
2760
|
-
async expectPhaseDisplayed(title) {
|
|
2761
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
2762
|
-
exact: true
|
|
2763
|
-
})).toBeVisible();
|
|
2764
|
-
}
|
|
2765
|
-
async openContextMenu(title) {
|
|
2766
|
-
await this.page.locator(".timeline-row-name").filter({
|
|
2767
|
-
hasText: title
|
|
2768
|
-
}).locator(".options-icon").click();
|
|
2769
|
-
}
|
|
2770
|
-
async removeFromReleaseGroup() {
|
|
2771
|
-
await this.page.getByRole("menuitem", {
|
|
2772
|
-
name: "Remove from group"
|
|
2773
|
-
}).locator("a").click();
|
|
2774
|
-
await this.page.getByRole("button", {
|
|
2775
|
-
name: "Remove"
|
|
2776
|
-
}).click();
|
|
2777
|
-
}
|
|
2778
|
-
async expectNumberOfReleases(num_of_release) {
|
|
2779
|
-
const elementCount = await this.page.locator(".timeline-row-name-release").count();
|
|
2780
|
-
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
2781
|
-
}
|
|
2782
|
-
async openAddReleaseList() {
|
|
2783
|
-
await this.page.getByRole("button", {
|
|
2784
|
-
name: "Add release"
|
|
2785
|
-
}).click();
|
|
2786
|
-
}
|
|
2787
|
-
async filterReleases(title) {
|
|
2788
|
-
await this.page.getByPlaceholder("Search for a release...").click();
|
|
2789
|
-
await this.page.getByPlaceholder("Search for a release...").fill(title);
|
|
2790
|
-
await this.page.waitForTimeout(5000);
|
|
2791
|
-
await this.page.getByPlaceholder("Search for a release...").press("Enter");
|
|
2792
|
-
}
|
|
2793
|
-
async expectNumberOfReleasesOnModal(num_of_release) {
|
|
2794
|
-
const elementCount = await this.page.locator(".release-modal-line").count();
|
|
2795
|
-
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
2796
|
-
}
|
|
2797
|
-
async selectAllReleaseCheckbox() {
|
|
2798
|
-
await this.page.getByLabel("Select all").check();
|
|
2799
|
-
}
|
|
2800
|
-
async addReleasesToGroup() {
|
|
2801
|
-
await this.page.getByRole("button", {
|
|
2802
|
-
name: "Add"
|
|
2803
|
-
}).click();
|
|
2804
|
-
}
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
3962
|
class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
2809
3963
|
constructor(page){
|
|
2810
3964
|
this.page = page;
|
|
3965
|
+
this.folderPage = new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(page);
|
|
3966
|
+
this.globalvariable = new (0, $506d511737b3ea46$export$74ca1eaaa9a0054)(page);
|
|
3967
|
+
this.homePage = new (0, $9ef669cf95557cb5$export$36d69433c4f81145)(page);
|
|
2811
3968
|
this.releasePage = new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(page);
|
|
2812
3969
|
this.settingsMenu = new (0, $7867194f18360347$export$1d7840d5cdc861d5)(page);
|
|
2813
3970
|
this.usersPage = new (0, $3ceab7c613cabfd6$export$107317390f5aa598)(page);
|
|
2814
3971
|
this.applicationPage = new (0, $dc91ece6da6cadfa$export$1533b625ec0c75e2)(page);
|
|
3972
|
+
this.taskDetailsPage = new (0, $a642d735048996f9$export$922081b54f2ab994)(page);
|
|
2815
3973
|
this.taskListPage = new (0, $ed2d4739e27d43c1$export$60c3bfa6385e2a10)(page);
|
|
2816
3974
|
this.templatePage = new (0, $959d38250779aa22$export$8c8e7207254accc2)(page);
|
|
2817
3975
|
this.templateListPage = new (0, $8b6ce149dd48e48b$export$7e1d435fa474ee21)(page);
|
|
2818
|
-
this.
|
|
3976
|
+
this.randomString = new (0, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89)();
|
|
2819
3977
|
this.releaseCalendarPage = new (0, $a8855257f8bb2b12$export$43682cddead1dd78)(page);
|
|
2820
|
-
this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
|
|
2821
3978
|
this.releaseGroupPage = new (0, $a6a3c1345fc4767e$export$b6fbc3e67030138f)(page);
|
|
2822
3979
|
this.releaseGroupTimelinePage = new (0, $3fad6a9449b6416f$export$1a0994e9c202d529)(page);
|
|
2823
|
-
this.
|
|
3980
|
+
this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
|
|
3981
|
+
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
2824
3982
|
}
|
|
2825
3983
|
async openTemplate(id) {
|
|
2826
3984
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -2921,12 +4079,12 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
2921
4079
|
return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
|
|
2922
4080
|
}
|
|
2923
4081
|
async collapseSideView() {
|
|
2924
|
-
await this.page.locator(
|
|
2925
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(
|
|
4082
|
+
await this.page.locator(".icon-collapse").click();
|
|
4083
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-collapse")).not.toBeVisible();
|
|
2926
4084
|
}
|
|
2927
4085
|
async expandSideView() {
|
|
2928
|
-
await this.page.locator(
|
|
2929
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(
|
|
4086
|
+
await this.page.locator(".icon-expand").click();
|
|
4087
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-expand")).not.toBeVisible();
|
|
2930
4088
|
}
|
|
2931
4089
|
}
|
|
2932
4090
|
|
|
@@ -2953,6 +4111,7 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
2953
4111
|
timeout: 10000
|
|
2954
4112
|
});
|
|
2955
4113
|
await this.page.waitForTimeout(1000);
|
|
4114
|
+
await this.closePendoModalWindow();
|
|
2956
4115
|
}
|
|
2957
4116
|
/**
|
|
2958
4117
|
* Logout as authenticated user
|
|
@@ -2975,6 +4134,10 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
2975
4134
|
const val = await this.page.locator("top-toolbar .avatar-wrapper span.dot-tooltip").getAttribute("aria-label");
|
|
2976
4135
|
(0, $kKeXs$playwrighttest.expect)(val).toContain(username);
|
|
2977
4136
|
}
|
|
4137
|
+
async closePendoModalWindow() {
|
|
4138
|
+
await this.page.waitForTimeout(1000);
|
|
4139
|
+
if (await this.page.locator("._pendo-close-guide").count() > 0) await this.page.locator("._pendo-close-guide").click();
|
|
4140
|
+
}
|
|
2978
4141
|
}
|
|
2979
4142
|
|
|
2980
4143
|
|