@digital-ai/devops-page-object-release 0.0.67 → 0.0.69
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 +13 -0
- package/dist/main.js +149 -6
- package/dist/main.js.map +1 -1
- package/dist/module.js +149 -6
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +40 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -48,6 +48,10 @@ class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$ex
|
|
|
48
48
|
exact: true
|
|
49
49
|
}).click();
|
|
50
50
|
}
|
|
51
|
+
async setOwner(ownerName) {
|
|
52
|
+
await this.page.locator(".release-owner").click();
|
|
53
|
+
await this.page.locator('input[name="owner"]').fill(ownerName);
|
|
54
|
+
}
|
|
51
55
|
async create() {
|
|
52
56
|
await this.page.getByRole("button", {
|
|
53
57
|
name: "Create"
|
|
@@ -121,6 +125,9 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
121
125
|
constructor(page){
|
|
122
126
|
super(page);
|
|
123
127
|
this.releaseCreatePage = new (0, $05d91a1d3381a287$export$34addcca3f0ae43f)(page);
|
|
128
|
+
this.buttonNewRelease = page.locator(".action-toolbar-actions button").filter({
|
|
129
|
+
hasText: "New release"
|
|
130
|
+
});
|
|
124
131
|
}
|
|
125
132
|
async expectNumberOfReleases(releaseTitle, amount) {
|
|
126
133
|
await this.filterReleaseByTitle(releaseTitle);
|
|
@@ -177,10 +184,18 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
177
184
|
});
|
|
178
185
|
await (0, $hOLA6$expect)(releaseStatus).toBeVisible();
|
|
179
186
|
}
|
|
187
|
+
async expectRedirectToReleasesList() {
|
|
188
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Releases")).toBeVisible();
|
|
189
|
+
await (0, $hOLA6$expect)(this.page.locator(".release-list")).toBeVisible();
|
|
190
|
+
}
|
|
180
191
|
async filterReleaseByAllStatus() {
|
|
181
192
|
await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
|
|
182
193
|
await this.page.locator(".ci-status .xl-react-link").getByText("Select all").click();
|
|
183
194
|
}
|
|
195
|
+
async filterReleaseByStatus(release_status) {
|
|
196
|
+
await this.page.locator(".react-tagsinput-wrapper .remaining-tags").click();
|
|
197
|
+
await this.page.getByTitle(release_status).locator("i").first().click();
|
|
198
|
+
}
|
|
184
199
|
async openReleaseByName(releaseTitle) {
|
|
185
200
|
await this.page.locator(".release-line .row-wrapper .release-title-wrapper a", {
|
|
186
201
|
hasText: releaseTitle
|
|
@@ -222,6 +237,12 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
222
237
|
await this.releaseCreatePage.create();
|
|
223
238
|
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
224
239
|
}
|
|
240
|
+
async createNewReleaseWithOwner(releaseName, description, ownerName) {
|
|
241
|
+
await this.releaseCreatePage.setName(releaseName);
|
|
242
|
+
await this.releaseCreatePage.setDescription(description);
|
|
243
|
+
await this.releaseCreatePage.setOwner(ownerName);
|
|
244
|
+
await this.releaseCreatePage.create();
|
|
245
|
+
}
|
|
225
246
|
async gotoListView() {
|
|
226
247
|
await this.page.getByRole("tab", {
|
|
227
248
|
name: "release icon List"
|
|
@@ -2835,6 +2856,10 @@ class $96c6280ff1c47b81$export$3bc3e140e0dcb075 extends (0, $9626bc9256ce31f7$ex
|
|
|
2835
2856
|
async expectSaveButtonDisabled() {
|
|
2836
2857
|
(0, $hOLA6$expect)(this.saveButton).toBeDisabled();
|
|
2837
2858
|
}
|
|
2859
|
+
async expectTeamExists(teamName) {
|
|
2860
|
+
const teamLocator = this.page.getByText(teamName).first();
|
|
2861
|
+
await (0, $hOLA6$expect)(teamLocator).toBeVisible();
|
|
2862
|
+
}
|
|
2838
2863
|
}
|
|
2839
2864
|
|
|
2840
2865
|
|
|
@@ -4135,6 +4160,99 @@ class $4cdce1306be47ecd$export$eace2be4de1d3377 extends (0, $9626bc9256ce31f7$ex
|
|
|
4135
4160
|
async expectDeliveryDisplayed(deliveryName) {
|
|
4136
4161
|
(0, $hOLA6$expect)(await this.page.locator(".fc-list-item-title").textContent()).toContain(deliveryName);
|
|
4137
4162
|
}
|
|
4163
|
+
async openDeliveries() {
|
|
4164
|
+
await this.page.goto("./#/deliveries");
|
|
4165
|
+
return;
|
|
4166
|
+
}
|
|
4167
|
+
async resetFilter() {
|
|
4168
|
+
await Promise.all([
|
|
4169
|
+
this.page.waitForResponse((r)=>r.url().includes("/api/v1/deliveries/search")),
|
|
4170
|
+
this.page.locator("navigation-sidebar, .navigation-sidebar").locator("li", {
|
|
4171
|
+
hasText: "Deliveries"
|
|
4172
|
+
}).click()
|
|
4173
|
+
]);
|
|
4174
|
+
const clearAllLink = this.page.locator('a.xl-react-link:has-text("Clear all")');
|
|
4175
|
+
if (await clearAllLink.isVisible() && !await clearAllLink.isDisabled()) await Promise.all([
|
|
4176
|
+
this.page.waitForResponse((r)=>r.url().includes("/api/v1/deliveries/search")),
|
|
4177
|
+
clearAllLink.click()
|
|
4178
|
+
]);
|
|
4179
|
+
await this.page.locator(".xl-react-components-input-full:visible").first().click();
|
|
4180
|
+
const input = this.page.locator(".react-tagsinput-input");
|
|
4181
|
+
await input.fill("In progress");
|
|
4182
|
+
const inputCheckbox = this.page.locator('[title="In progress"] input[type="checkbox"]');
|
|
4183
|
+
if (!await inputCheckbox.isChecked()) await Promise.all([
|
|
4184
|
+
this.page.waitForResponse((r)=>r.url().includes("/api/v1/deliveries/search")),
|
|
4185
|
+
this.page.locator('[title="In progress"] .checkbox').click()
|
|
4186
|
+
]);
|
|
4187
|
+
await this.setOrderBy("Start date");
|
|
4188
|
+
await this.page.waitForSelector(".fc-list-loaded", {
|
|
4189
|
+
state: "visible"
|
|
4190
|
+
});
|
|
4191
|
+
}
|
|
4192
|
+
async setOrderBy(orderBy) {
|
|
4193
|
+
await this.page.locator(".order-by-filter .btn:first-child").click();
|
|
4194
|
+
await this.page.locator(`.order-by-filter .bootstrap-link`, {
|
|
4195
|
+
hasText: orderBy
|
|
4196
|
+
}).click();
|
|
4197
|
+
await this.page.locator(".order-by-filter .btn:first-child").click();
|
|
4198
|
+
await this.page.waitForSelector(".fc-list-loaded", {
|
|
4199
|
+
state: "visible"
|
|
4200
|
+
});
|
|
4201
|
+
}
|
|
4202
|
+
async openDeliveryFlow(title) {
|
|
4203
|
+
await this.filterDeliveryByName(title);
|
|
4204
|
+
await this.page.locator("xlr-delivery-row, .delivery-row").filter({
|
|
4205
|
+
hasText: title
|
|
4206
|
+
}).getByRole("link").first().click();
|
|
4207
|
+
}
|
|
4208
|
+
async completeStage(stageTitle, trackedItems = []) {
|
|
4209
|
+
const popup = this.page.locator(`[data-cy='popup-${stageTitle}']`);
|
|
4210
|
+
await popup.click();
|
|
4211
|
+
const popover = this.page.locator(".ant-popover:not(.ant-popover-hidden)");
|
|
4212
|
+
const completeOption = popover.locator('a:text("Complete")');
|
|
4213
|
+
await completeOption.click();
|
|
4214
|
+
if (trackedItems.length > 0) {
|
|
4215
|
+
const trackedRows = this.page.locator(".tracked-item-row");
|
|
4216
|
+
await (0, $hOLA6$expect)(trackedRows).toHaveCount(trackedItems.length);
|
|
4217
|
+
for (const item of trackedItems)await (0, $hOLA6$expect)(this.page.locator(`.tracked-item-row:has-text("${item}")`)).toBeVisible();
|
|
4218
|
+
}
|
|
4219
|
+
const confirmButton = this.page.locator('.confirmation-dialog button:text("Complete")');
|
|
4220
|
+
await confirmButton.click();
|
|
4221
|
+
await (0, $hOLA6$expect)(this.page.locator(`.label-completed:has-text("Completed")`)).toBeVisible();
|
|
4222
|
+
return this;
|
|
4223
|
+
}
|
|
4224
|
+
async reopenStage(stageTitle) {
|
|
4225
|
+
const popup = this.page.locator(`[data-cy='popup-${stageTitle}']`);
|
|
4226
|
+
await popup.click();
|
|
4227
|
+
const popover = this.page.locator(".ant-popover:not(.ant-popover-hidden)");
|
|
4228
|
+
await popover.locator('a:text("Reopen")').click();
|
|
4229
|
+
await this.page.locator('.confirmation-dialog button:text("Reopen")').click();
|
|
4230
|
+
await (0, $hOLA6$expect)(this.page.locator('.label-completed:has-text("Completed")')).not.toBeVisible();
|
|
4231
|
+
return this;
|
|
4232
|
+
}
|
|
4233
|
+
async verifyStageContextMenuIsPresent(titles) {
|
|
4234
|
+
for (const title of titles){
|
|
4235
|
+
const locator = this.page.locator(`[data-cy='popup-${title}']`);
|
|
4236
|
+
await (0, $hOLA6$expect)(locator).toHaveCount(1);
|
|
4237
|
+
}
|
|
4238
|
+
return;
|
|
4239
|
+
}
|
|
4240
|
+
async openFolderPath(folderPath) {
|
|
4241
|
+
await this.page.goto(`./#/folders/${encodeURIComponent(folderPath)}/releases`);
|
|
4242
|
+
await this.page.waitForSelector(".folder-content, .folder-view", {
|
|
4243
|
+
state: "visible"
|
|
4244
|
+
});
|
|
4245
|
+
return;
|
|
4246
|
+
}
|
|
4247
|
+
async openDeliveryFromFolder(title) {
|
|
4248
|
+
await this.page.locator("xlr-delivery-row, .release-row").filter({
|
|
4249
|
+
hasText: title
|
|
4250
|
+
}).getByRole("link").first().click();
|
|
4251
|
+
await this.page.waitForSelector(".delivery-flow, .flow-container", {
|
|
4252
|
+
state: "visible"
|
|
4253
|
+
});
|
|
4254
|
+
return;
|
|
4255
|
+
}
|
|
4138
4256
|
}
|
|
4139
4257
|
|
|
4140
4258
|
|
|
@@ -4187,6 +4305,8 @@ class $27cd192f30944b0c$export$572f40d328c1d028 extends (0, $9626bc9256ce31f7$ex
|
|
|
4187
4305
|
await this.page.locator("#title").click();
|
|
4188
4306
|
await this.page.locator("#title").clear();
|
|
4189
4307
|
await this.page.locator("#title").fill(newGroupName);
|
|
4308
|
+
await this.page.locator(".modal-footer .button.save").click();
|
|
4309
|
+
await this.expectSuccessMessageOnUpdatingGroup();
|
|
4190
4310
|
}
|
|
4191
4311
|
async enterGroupName(groupName) {
|
|
4192
4312
|
await this.page.locator("#title").click();
|
|
@@ -4214,18 +4334,25 @@ class $27cd192f30944b0c$export$572f40d328c1d028 extends (0, $9626bc9256ce31f7$ex
|
|
|
4214
4334
|
await (0, $hOLA6$expect)(this.page.locator(".success").filter({
|
|
4215
4335
|
hasText: "Created release group successfully"
|
|
4216
4336
|
})).toBeVisible();
|
|
4337
|
+
await this.closeNotificationBanner();
|
|
4217
4338
|
}
|
|
4218
4339
|
async expectSuccessMessageOnAddingReleaseToGroup() {
|
|
4219
4340
|
await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
|
|
4220
4341
|
await (0, $hOLA6$expect)(this.page.locator(".success").filter({
|
|
4221
4342
|
hasText: "Added release to release group successfully"
|
|
4222
4343
|
})).toBeVisible();
|
|
4344
|
+
await this.closeNotificationBanner();
|
|
4223
4345
|
}
|
|
4224
4346
|
async expectSuccessMessageOnUpdatingGroup() {
|
|
4225
4347
|
await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
|
|
4226
4348
|
await (0, $hOLA6$expect)(this.page.locator(".success").filter({
|
|
4227
4349
|
hasText: "Updated release group successfully"
|
|
4228
4350
|
})).toBeVisible();
|
|
4351
|
+
await this.closeNotificationBanner();
|
|
4352
|
+
}
|
|
4353
|
+
async closeNotificationBanner() {
|
|
4354
|
+
const closeIcon = this.page.locator(".dot-alert-banner").getByTestId(`CloseIcon`);
|
|
4355
|
+
if (await closeIcon.isVisible()) await closeIcon.click();
|
|
4229
4356
|
}
|
|
4230
4357
|
async searchReleaseGroupByTitle(title) {
|
|
4231
4358
|
await this.page.getByPlaceholder("Search for groups...", {
|
|
@@ -4246,6 +4373,10 @@ class $27cd192f30944b0c$export$572f40d328c1d028 extends (0, $9626bc9256ce31f7$ex
|
|
|
4246
4373
|
await this.page.getByRole("button", {
|
|
4247
4374
|
name: "Delete"
|
|
4248
4375
|
}).click();
|
|
4376
|
+
await (0, $hOLA6$expect)(this.page.locator(".success").filter({
|
|
4377
|
+
hasText: "Deleted release group successfully"
|
|
4378
|
+
})).toBeVisible();
|
|
4379
|
+
await this.closeNotificationBanner();
|
|
4249
4380
|
}
|
|
4250
4381
|
async clickReleaseGroupEdit(title) {
|
|
4251
4382
|
await this.page.locator(".fc-list-item-line").filter({
|
|
@@ -4296,7 +4427,9 @@ class $d13e78163af94d50$export$9b9454a7f137e99b extends (0, $9626bc9256ce31f7$ex
|
|
|
4296
4427
|
this.addDescription = page.getByPlaceholder("Set description...");
|
|
4297
4428
|
}
|
|
4298
4429
|
async clickNewDeliveryPattern() {
|
|
4299
|
-
await this.page.
|
|
4430
|
+
await this.page.getByRole("button", {
|
|
4431
|
+
name: "New delivery pattern"
|
|
4432
|
+
}).click();
|
|
4300
4433
|
await (0, $hOLA6$expect)(this.page.getByRole("heading", {
|
|
4301
4434
|
name: "Create delivery pattern"
|
|
4302
4435
|
})).toBeVisible();
|
|
@@ -4605,8 +4738,9 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
|
|
|
4605
4738
|
name: existingFolderName
|
|
4606
4739
|
}).hover();
|
|
4607
4740
|
await this.clickFolderOptions(existingFolderName, "edit");
|
|
4608
|
-
await this.page.
|
|
4609
|
-
|
|
4741
|
+
await this.page.getByRole("tab", {
|
|
4742
|
+
name: existingFolderName
|
|
4743
|
+
}).getByRole("textbox").fill(newFolderName);
|
|
4610
4744
|
await this.page.keyboard.press("Enter");
|
|
4611
4745
|
await (0, $hOLA6$expect)(this.page.getByRole("link", {
|
|
4612
4746
|
name: newFolderName
|
|
@@ -5421,8 +5555,12 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
5421
5555
|
async sortByColumn(columnName, columnIndex) {
|
|
5422
5556
|
const table = this.page.getByTestId("users-table");
|
|
5423
5557
|
const column = table.locator(`th[title="${columnName}"]`);
|
|
5424
|
-
const
|
|
5425
|
-
|
|
5558
|
+
const columnClick = this.page.getByRole("button", {
|
|
5559
|
+
name: columnName,
|
|
5560
|
+
exact: true
|
|
5561
|
+
});
|
|
5562
|
+
const originalData = await table.locator(`tr td:nth-child(${columnIndex})`).allTextContents();
|
|
5563
|
+
await columnClick.click();
|
|
5426
5564
|
const sort = await column.getAttribute("aria-sort");
|
|
5427
5565
|
if (sort == "ascending") {
|
|
5428
5566
|
const data = await table.locator(`td:nth-child(${columnIndex})`).allTextContents();
|
|
@@ -5431,7 +5569,9 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
5431
5569
|
}
|
|
5432
5570
|
if (sort == "descending") {
|
|
5433
5571
|
const data = await table.locator(`td:nth-child(${columnIndex})`).allTextContents();
|
|
5434
|
-
(0, $hOLA6$expect)(data).toEqual(
|
|
5572
|
+
(0, $hOLA6$expect)(data).toEqual([
|
|
5573
|
+
...data
|
|
5574
|
+
].sort((a, b)=>a.localeCompare(b)));
|
|
5435
5575
|
}
|
|
5436
5576
|
return this;
|
|
5437
5577
|
}
|
|
@@ -7238,6 +7378,9 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
|
|
|
7238
7378
|
await (0, $hOLA6$expect)(this.page.getByRole("button", {
|
|
7239
7379
|
name: "Close"
|
|
7240
7380
|
})).toBeVisible();
|
|
7381
|
+
await this.page.getByRole("button", {
|
|
7382
|
+
name: "Close"
|
|
7383
|
+
}).click();
|
|
7241
7384
|
}
|
|
7242
7385
|
async expectTemplateVisible(title, expected = true) {
|
|
7243
7386
|
if (expected) {
|