@digital-ai/devops-page-object-release 0.0.119 → 1.0.0
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 +12 -0
- package/dist/main.js +183 -35
- package/dist/main.js.map +1 -1
- package/dist/module.js +183 -35
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +27 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @digital-ai/devops-page-object-release
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 95453e3: Implemented new SAAS login method
|
|
8
|
+
|
|
9
|
+
## 0.0.120
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 8902706: S-127174: The page object changes for the default Home and Folder Page options in user profile page.
|
|
14
|
+
|
|
3
15
|
## 0.0.119
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -6167,11 +6167,10 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
|
|
|
6167
6167
|
}
|
|
6168
6168
|
async expandFolder(folderName) {
|
|
6169
6169
|
const folderRow = this.page.getByRole('listitem').filter({
|
|
6170
|
-
hasText: folderName
|
|
6170
|
+
hasText: new RegExp(`^${folderName}$`)
|
|
6171
6171
|
});
|
|
6172
6172
|
const expandIcon = folderRow.locator('.arrow-right-icon');
|
|
6173
|
-
await (0
|
|
6174
|
-
await expandIcon.click();
|
|
6173
|
+
if (await expandIcon.count() > 0) await expandIcon.click();
|
|
6175
6174
|
return this;
|
|
6176
6175
|
}
|
|
6177
6176
|
async openFolderByRow(folderName) {
|
|
@@ -6317,6 +6316,12 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
|
|
|
6317
6316
|
await this.page.getByTitle(releaseName).click();
|
|
6318
6317
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel('breadcrumb').getByText('Flow')).toBeVisible();
|
|
6319
6318
|
}
|
|
6319
|
+
async expectBreadcrumbToContain(option) {
|
|
6320
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel('breadcrumb').getByText(option)).toBeVisible();
|
|
6321
|
+
}
|
|
6322
|
+
async expectFolderOptionInUrl(option) {
|
|
6323
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveURL(new RegExp(`#\\/folders\\/Applications\\/(Folder[^/]+\\/)+${option.toLowerCase()}(\\?.*)?$`));
|
|
6324
|
+
}
|
|
6320
6325
|
}
|
|
6321
6326
|
|
|
6322
6327
|
|
|
@@ -6594,6 +6599,12 @@ class $9ef669cf95557cb5$export$36d69433c4f81145 extends (0, $f8721861c660dd88$ex
|
|
|
6594
6599
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText('Introducing Analytics')).toBeVisible();
|
|
6595
6600
|
await this.page.getByLabel('Close').click();
|
|
6596
6601
|
}
|
|
6602
|
+
async expectGlobalPageToBe(option) {
|
|
6603
|
+
if (option === 'Home') await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole('heading', {
|
|
6604
|
+
name: 'Digital.ai Release Home'
|
|
6605
|
+
})).toBeVisible();
|
|
6606
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel('breadcrumb').getByText(option)).toBeVisible();
|
|
6607
|
+
}
|
|
6597
6608
|
}
|
|
6598
6609
|
|
|
6599
6610
|
|
|
@@ -6819,12 +6830,17 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
6819
6830
|
return this;
|
|
6820
6831
|
}
|
|
6821
6832
|
async clickOnSaveButton() {
|
|
6822
|
-
await this.page.
|
|
6833
|
+
await this.page.getByRole('button', {
|
|
6834
|
+
name: 'Save'
|
|
6835
|
+
}).click();
|
|
6823
6836
|
return this;
|
|
6824
6837
|
}
|
|
6825
6838
|
async save() {
|
|
6826
|
-
|
|
6827
|
-
await (0, $kKeXs$playwrighttest.expect)(
|
|
6839
|
+
const saveBtn = this.page.getByTestId('save-button');
|
|
6840
|
+
await (0, $kKeXs$playwrighttest.expect)(saveBtn).toBeEnabled({
|
|
6841
|
+
timeout: 5000
|
|
6842
|
+
});
|
|
6843
|
+
await saveBtn.click();
|
|
6828
6844
|
return this;
|
|
6829
6845
|
}
|
|
6830
6846
|
async clearEmailInput() {
|
|
@@ -6892,6 +6908,44 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
6892
6908
|
}).click();
|
|
6893
6909
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(tokenName)).not.toBeVisible();
|
|
6894
6910
|
}
|
|
6911
|
+
async setDefaultGlobalPage(option) {
|
|
6912
|
+
const dropdown = this.page.getByRole('combobox', {
|
|
6913
|
+
name: 'Default global page select'
|
|
6914
|
+
});
|
|
6915
|
+
const saveButton = this.page.getByTestId('save-button');
|
|
6916
|
+
const current = (await dropdown.innerText()).trim();
|
|
6917
|
+
if (current === option) {
|
|
6918
|
+
await (0, $kKeXs$playwrighttest.expect)(saveButton).toBeDisabled();
|
|
6919
|
+
return;
|
|
6920
|
+
}
|
|
6921
|
+
await dropdown.click();
|
|
6922
|
+
await this.page.locator(`[role="option"][data-value="${option.toLowerCase()}"]`).click();
|
|
6923
|
+
await this.page.keyboard.press('Tab');
|
|
6924
|
+
await (0, $kKeXs$playwrighttest.expect)(dropdown).toHaveText(option);
|
|
6925
|
+
await (0, $kKeXs$playwrighttest.expect)(saveButton).toBeEnabled();
|
|
6926
|
+
await saveButton.click();
|
|
6927
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
6928
|
+
}
|
|
6929
|
+
async setDefaultFolderPage(option) {
|
|
6930
|
+
const dropdown = this.page.getByRole('combobox', {
|
|
6931
|
+
name: 'Default folder page select'
|
|
6932
|
+
});
|
|
6933
|
+
const saveButton = this.page.getByTestId('save-button');
|
|
6934
|
+
const current = (await dropdown.innerText()).trim();
|
|
6935
|
+
if (current === option) {
|
|
6936
|
+
await (0, $kKeXs$playwrighttest.expect)(saveButton).toBeDisabled();
|
|
6937
|
+
return;
|
|
6938
|
+
}
|
|
6939
|
+
await dropdown.click();
|
|
6940
|
+
await this.page.getByRole('option', {
|
|
6941
|
+
name: option
|
|
6942
|
+
}).click();
|
|
6943
|
+
await this.page.keyboard.press('Tab');
|
|
6944
|
+
await (0, $kKeXs$playwrighttest.expect)(dropdown).toHaveText(option);
|
|
6945
|
+
await (0, $kKeXs$playwrighttest.expect)(saveButton).toBeEnabled();
|
|
6946
|
+
await saveButton.click();
|
|
6947
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
6948
|
+
}
|
|
6895
6949
|
}
|
|
6896
6950
|
|
|
6897
6951
|
|
|
@@ -9191,36 +9245,35 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
|
|
|
9191
9245
|
});
|
|
9192
9246
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.risk-profile .data-row .ng-binding').first()).toHaveText('Default risk profile');
|
|
9193
9247
|
}
|
|
9248
|
+
riskProfileRow(title) {
|
|
9249
|
+
return this.page.locator('.risk-profile .data-row').filter({
|
|
9250
|
+
has: this.page.getByText(title, {
|
|
9251
|
+
exact: true
|
|
9252
|
+
})
|
|
9253
|
+
});
|
|
9254
|
+
}
|
|
9194
9255
|
async openRiskProfile(title) {
|
|
9195
9256
|
await this.page.locator('#risk-profile-table').waitFor({
|
|
9196
9257
|
state: 'visible'
|
|
9197
9258
|
});
|
|
9198
|
-
await this.
|
|
9199
|
-
hasText: title
|
|
9200
|
-
}).click();
|
|
9259
|
+
await this.riskProfileRow(title).click();
|
|
9201
9260
|
return new $ea5452748687c9a2$var$RisksProfilePage(this.page);
|
|
9202
9261
|
}
|
|
9203
9262
|
async shouldHaveCopyButtonEnabledForRiskProfile(title, enabled = true) {
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
}).waitFor({
|
|
9263
|
+
const row = this.riskProfileRow(title);
|
|
9264
|
+
await row.waitFor({
|
|
9207
9265
|
state: 'visible'
|
|
9208
9266
|
});
|
|
9209
|
-
const locator =
|
|
9210
|
-
hasText: title
|
|
9211
|
-
}).locator('.copy-action');
|
|
9267
|
+
const locator = row.locator('.copy-action');
|
|
9212
9268
|
if (enabled) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
|
|
9213
9269
|
else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
|
|
9214
9270
|
}
|
|
9215
9271
|
async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
}).waitFor({
|
|
9272
|
+
const row = this.riskProfileRow(title);
|
|
9273
|
+
await row.waitFor({
|
|
9219
9274
|
state: 'visible'
|
|
9220
9275
|
});
|
|
9221
|
-
const locator =
|
|
9222
|
-
hasText: title
|
|
9223
|
-
}).locator(`.remove-action`);
|
|
9276
|
+
const locator = row.locator(`.remove-action`);
|
|
9224
9277
|
if (enabled) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
|
|
9225
9278
|
else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
|
|
9226
9279
|
}
|
|
@@ -9232,14 +9285,11 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
|
|
|
9232
9285
|
return new $ea5452748687c9a2$var$RisksProfilePage(this.page);
|
|
9233
9286
|
}
|
|
9234
9287
|
async deleteRiskProfile(title) {
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
}).locator('.remove-action').waitFor({
|
|
9288
|
+
const row = this.riskProfileRow(title);
|
|
9289
|
+
await row.locator('.remove-action').waitFor({
|
|
9238
9290
|
state: 'visible'
|
|
9239
9291
|
});
|
|
9240
|
-
await
|
|
9241
|
-
hasText: title
|
|
9242
|
-
}).locator('.remove-action').click();
|
|
9292
|
+
await row.locator('.remove-action').click();
|
|
9243
9293
|
await this.page.locator('.modal-footer .button.save').click();
|
|
9244
9294
|
}
|
|
9245
9295
|
async expectSuccessMessageOnRisksPage() {
|
|
@@ -9250,14 +9300,11 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
|
|
|
9250
9300
|
await this.closeNotificationBanner();
|
|
9251
9301
|
}
|
|
9252
9302
|
async copyRiskProfile(title) {
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
}).waitFor({
|
|
9303
|
+
const row = this.riskProfileRow(title);
|
|
9304
|
+
await row.waitFor({
|
|
9256
9305
|
state: 'visible'
|
|
9257
9306
|
});
|
|
9258
|
-
await
|
|
9259
|
-
hasText: title
|
|
9260
|
-
}).locator('.copy-action').click();
|
|
9307
|
+
await row.locator('.copy-action').click();
|
|
9261
9308
|
}
|
|
9262
9309
|
async expectSuccessMessageOnUpdateRiskProfile() {
|
|
9263
9310
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel('success')).toBeVisible();
|
|
@@ -10307,6 +10354,63 @@ class $267ea1f27d28a032$export$8da2fa93430be6ca extends (0, $f8721861c660dd88$ex
|
|
|
10307
10354
|
|
|
10308
10355
|
|
|
10309
10356
|
|
|
10357
|
+
|
|
10358
|
+
|
|
10359
|
+
class $51c942d36af547b6$export$3006749443672de8 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
10360
|
+
constructor(page){
|
|
10361
|
+
super(page);
|
|
10362
|
+
this.AskReleaseButton = this.page.getByRole('button', {
|
|
10363
|
+
name: 'Ask Release'
|
|
10364
|
+
});
|
|
10365
|
+
}
|
|
10366
|
+
async clickAskReleaseButton() {
|
|
10367
|
+
await this.AskReleaseButton.click();
|
|
10368
|
+
}
|
|
10369
|
+
async clickNewChatButton() {
|
|
10370
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole('button', {
|
|
10371
|
+
name: 'New chat'
|
|
10372
|
+
})).toBeVisible();
|
|
10373
|
+
await this.page.getByRole('button', {
|
|
10374
|
+
name: 'New chat'
|
|
10375
|
+
}).click();
|
|
10376
|
+
}
|
|
10377
|
+
async clickHistory() {
|
|
10378
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId('rail-item-1')).toBeVisible();
|
|
10379
|
+
await this.page.getByTestId('rail-item-1').first().click();
|
|
10380
|
+
}
|
|
10381
|
+
async expectAskReleaseChatWindowToBeOpen() {
|
|
10382
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole('heading', {
|
|
10383
|
+
name: 'Ask release'
|
|
10384
|
+
})).toBeVisible();
|
|
10385
|
+
}
|
|
10386
|
+
async expectAskReleaseChatWindowToBeClosed() {
|
|
10387
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole('heading', {
|
|
10388
|
+
name: 'Ask release'
|
|
10389
|
+
})).not.toBeVisible();
|
|
10390
|
+
}
|
|
10391
|
+
async expectCorrectResponse(response, timeout = 360000) {
|
|
10392
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(response, {
|
|
10393
|
+
exact: false
|
|
10394
|
+
})).toBeVisible({
|
|
10395
|
+
timeout: timeout
|
|
10396
|
+
});
|
|
10397
|
+
}
|
|
10398
|
+
async expectChatInputDrawerToBeEnabled() {
|
|
10399
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole('textbox', {
|
|
10400
|
+
name: 'Ask your question...'
|
|
10401
|
+
})).toBeVisible();
|
|
10402
|
+
}
|
|
10403
|
+
async feedYourQuestion(question) {
|
|
10404
|
+
await this.page.getByRole('textbox', {
|
|
10405
|
+
name: 'Ask your question...'
|
|
10406
|
+
}).fill(question);
|
|
10407
|
+
await this.page.getByRole('button', {
|
|
10408
|
+
name: 'Send'
|
|
10409
|
+
}).click();
|
|
10410
|
+
}
|
|
10411
|
+
}
|
|
10412
|
+
|
|
10413
|
+
|
|
10310
10414
|
class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
10311
10415
|
constructor(page){
|
|
10312
10416
|
this.page = page;
|
|
@@ -10339,16 +10443,17 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
10339
10443
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
10340
10444
|
this.workflowCatalogPage = new (0, $7bcc05352d6debcf$export$5628dfd1b9e94785)(page);
|
|
10341
10445
|
this.taskAccessPage = new (0, $267ea1f27d28a032$export$8da2fa93430be6ca)(page);
|
|
10446
|
+
this.askReleasePage = new (0, $51c942d36af547b6$export$3006749443672de8)(page);
|
|
10342
10447
|
}
|
|
10343
10448
|
async openTemplate(id) {
|
|
10344
10449
|
return this.openReleaseOrTemplate(id, false);
|
|
10345
10450
|
}
|
|
10346
10451
|
async openFolder(id) {
|
|
10347
|
-
await this.page.goto(`./#/folders/${id}
|
|
10348
|
-
await this.page.waitForSelector('#releases-content');
|
|
10452
|
+
await this.page.goto(`./#/folders/${id}`);
|
|
10349
10453
|
return new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(this.page);
|
|
10350
10454
|
}
|
|
10351
10455
|
async openFolderByName(folderName) {
|
|
10456
|
+
await this.page.goto(`./#/folders`);
|
|
10352
10457
|
const folder = this.page.getByTitle(folderName);
|
|
10353
10458
|
await (0, $kKeXs$playwrighttest.expect)(folder).toBeVisible({
|
|
10354
10459
|
timeout: 5000
|
|
@@ -10391,6 +10496,11 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
10391
10496
|
name: 'Home'
|
|
10392
10497
|
}).click();
|
|
10393
10498
|
}
|
|
10499
|
+
async gotoHomePageByBreadcrumb() {
|
|
10500
|
+
await this.page.getByLabel('breadcrumb').getByRole('link', {
|
|
10501
|
+
name: 'Home'
|
|
10502
|
+
}).click();
|
|
10503
|
+
}
|
|
10394
10504
|
async gotoFolderPage() {
|
|
10395
10505
|
await this.page.locator('ul.side-nav li').getByLabel('Folders', {
|
|
10396
10506
|
exact: true
|
|
@@ -10533,6 +10643,41 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
10533
10643
|
await this.page.waitForTimeout(1000);
|
|
10534
10644
|
await this.closePendoModalWindow();
|
|
10535
10645
|
}
|
|
10646
|
+
/**
|
|
10647
|
+
* Login via SaaS (Keycloak SSO) with username and password
|
|
10648
|
+
* @param userName
|
|
10649
|
+
* @param password
|
|
10650
|
+
*/ async loginSaas(userName, password) {
|
|
10651
|
+
await this.page.goto('/#home', {
|
|
10652
|
+
waitUntil: 'domcontentloaded'
|
|
10653
|
+
});
|
|
10654
|
+
// Wait for either OIDC login page or already-authenticated app page
|
|
10655
|
+
await this.page.waitForURL(/(auth\/realms|#\/(home|default))/, {
|
|
10656
|
+
timeout: 60000,
|
|
10657
|
+
waitUntil: 'domcontentloaded'
|
|
10658
|
+
});
|
|
10659
|
+
// If redirected to OIDC login page, fill credentials
|
|
10660
|
+
if (this.page.url().includes('auth/realms')) {
|
|
10661
|
+
await this.page.getByRole('textbox', {
|
|
10662
|
+
name: 'Username or email'
|
|
10663
|
+
}).fill(userName, {
|
|
10664
|
+
timeout: 10000
|
|
10665
|
+
});
|
|
10666
|
+
await this.page.locator('#password').fill(password, {
|
|
10667
|
+
timeout: 10000
|
|
10668
|
+
});
|
|
10669
|
+
await this.page.getByRole('button', {
|
|
10670
|
+
name: 'Sign In'
|
|
10671
|
+
}).click({
|
|
10672
|
+
timeout: 30000
|
|
10673
|
+
});
|
|
10674
|
+
await this.page.waitForURL(/#\/(home|default)/, {
|
|
10675
|
+
timeout: 60000,
|
|
10676
|
+
waitUntil: 'domcontentloaded'
|
|
10677
|
+
});
|
|
10678
|
+
}
|
|
10679
|
+
await this.closePendoModalWindow();
|
|
10680
|
+
}
|
|
10536
10681
|
async loginWithoutReload(userName, password) {
|
|
10537
10682
|
let loadTriggered = false;
|
|
10538
10683
|
this.page.on('load', ()=>{
|
|
@@ -10568,6 +10713,9 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
10568
10713
|
async closePendoModalWindow() {
|
|
10569
10714
|
await this.page.waitForTimeout(1000);
|
|
10570
10715
|
if (await this.page.locator('._pendo-close-guide').count() > 0) await this.page.locator('._pendo-close-guide').click();
|
|
10716
|
+
await this.page.locator('button.close').first().click({
|
|
10717
|
+
timeout: 2000
|
|
10718
|
+
}).catch((_)=>undefined);
|
|
10571
10719
|
}
|
|
10572
10720
|
async expectUserNotVisible() {
|
|
10573
10721
|
const tooltip = this.page.locator('top-toolbar .avatar-wrapper .dot-tooltip');
|