@digital-ai/devops-page-object-release 0.0.68 → 0.0.70
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 +120 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +120 -3
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +37 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
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"
|
|
@@ -180,6 +184,10 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
180
184
|
});
|
|
181
185
|
await (0, $hOLA6$expect)(releaseStatus).toBeVisible();
|
|
182
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
|
+
}
|
|
183
191
|
async filterReleaseByAllStatus() {
|
|
184
192
|
await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
|
|
185
193
|
await this.page.locator(".ci-status .xl-react-link").getByText("Select all").click();
|
|
@@ -229,6 +237,12 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
229
237
|
await this.releaseCreatePage.create();
|
|
230
238
|
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
231
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
|
+
}
|
|
232
246
|
async gotoListView() {
|
|
233
247
|
await this.page.getByRole("tab", {
|
|
234
248
|
name: "release icon List"
|
|
@@ -2842,6 +2856,10 @@ class $96c6280ff1c47b81$export$3bc3e140e0dcb075 extends (0, $9626bc9256ce31f7$ex
|
|
|
2842
2856
|
async expectSaveButtonDisabled() {
|
|
2843
2857
|
(0, $hOLA6$expect)(this.saveButton).toBeDisabled();
|
|
2844
2858
|
}
|
|
2859
|
+
async expectTeamExists(teamName) {
|
|
2860
|
+
const teamLocator = this.page.getByText(teamName).first();
|
|
2861
|
+
await (0, $hOLA6$expect)(teamLocator).toBeVisible();
|
|
2862
|
+
}
|
|
2845
2863
|
}
|
|
2846
2864
|
|
|
2847
2865
|
|
|
@@ -4142,6 +4160,99 @@ class $4cdce1306be47ecd$export$eace2be4de1d3377 extends (0, $9626bc9256ce31f7$ex
|
|
|
4142
4160
|
async expectDeliveryDisplayed(deliveryName) {
|
|
4143
4161
|
(0, $hOLA6$expect)(await this.page.locator(".fc-list-item-title").textContent()).toContain(deliveryName);
|
|
4144
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
|
+
}
|
|
4145
4256
|
}
|
|
4146
4257
|
|
|
4147
4258
|
|
|
@@ -5444,8 +5555,12 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
5444
5555
|
async sortByColumn(columnName, columnIndex) {
|
|
5445
5556
|
const table = this.page.getByTestId("users-table");
|
|
5446
5557
|
const column = table.locator(`th[title="${columnName}"]`);
|
|
5447
|
-
const
|
|
5448
|
-
|
|
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();
|
|
5449
5564
|
const sort = await column.getAttribute("aria-sort");
|
|
5450
5565
|
if (sort == "ascending") {
|
|
5451
5566
|
const data = await table.locator(`td:nth-child(${columnIndex})`).allTextContents();
|
|
@@ -5454,7 +5569,9 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
5454
5569
|
}
|
|
5455
5570
|
if (sort == "descending") {
|
|
5456
5571
|
const data = await table.locator(`td:nth-child(${columnIndex})`).allTextContents();
|
|
5457
|
-
(0, $hOLA6$expect)(data).toEqual(
|
|
5572
|
+
(0, $hOLA6$expect)(data).toEqual([
|
|
5573
|
+
...data
|
|
5574
|
+
].sort((a, b)=>a.localeCompare(b)));
|
|
5458
5575
|
}
|
|
5459
5576
|
return this;
|
|
5460
5577
|
}
|