@digital-ai/devops-page-object-release 0.0.120 → 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 +6 -0
- package/dist/main.js +116 -27
- package/dist/main.js.map +1 -1
- package/dist/module.js +116 -27
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +19 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -9245,36 +9245,35 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
|
|
|
9245
9245
|
});
|
|
9246
9246
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.risk-profile .data-row .ng-binding').first()).toHaveText('Default risk profile');
|
|
9247
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
|
+
}
|
|
9248
9255
|
async openRiskProfile(title) {
|
|
9249
9256
|
await this.page.locator('#risk-profile-table').waitFor({
|
|
9250
9257
|
state: 'visible'
|
|
9251
9258
|
});
|
|
9252
|
-
await this.
|
|
9253
|
-
hasText: title
|
|
9254
|
-
}).click();
|
|
9259
|
+
await this.riskProfileRow(title).click();
|
|
9255
9260
|
return new $ea5452748687c9a2$var$RisksProfilePage(this.page);
|
|
9256
9261
|
}
|
|
9257
9262
|
async shouldHaveCopyButtonEnabledForRiskProfile(title, enabled = true) {
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
}).waitFor({
|
|
9263
|
+
const row = this.riskProfileRow(title);
|
|
9264
|
+
await row.waitFor({
|
|
9261
9265
|
state: 'visible'
|
|
9262
9266
|
});
|
|
9263
|
-
const locator =
|
|
9264
|
-
hasText: title
|
|
9265
|
-
}).locator('.copy-action');
|
|
9267
|
+
const locator = row.locator('.copy-action');
|
|
9266
9268
|
if (enabled) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
|
|
9267
9269
|
else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
|
|
9268
9270
|
}
|
|
9269
9271
|
async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
}).waitFor({
|
|
9272
|
+
const row = this.riskProfileRow(title);
|
|
9273
|
+
await row.waitFor({
|
|
9273
9274
|
state: 'visible'
|
|
9274
9275
|
});
|
|
9275
|
-
const locator =
|
|
9276
|
-
hasText: title
|
|
9277
|
-
}).locator(`.remove-action`);
|
|
9276
|
+
const locator = row.locator(`.remove-action`);
|
|
9278
9277
|
if (enabled) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
|
|
9279
9278
|
else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
|
|
9280
9279
|
}
|
|
@@ -9286,14 +9285,11 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
|
|
|
9286
9285
|
return new $ea5452748687c9a2$var$RisksProfilePage(this.page);
|
|
9287
9286
|
}
|
|
9288
9287
|
async deleteRiskProfile(title) {
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
}).locator('.remove-action').waitFor({
|
|
9288
|
+
const row = this.riskProfileRow(title);
|
|
9289
|
+
await row.locator('.remove-action').waitFor({
|
|
9292
9290
|
state: 'visible'
|
|
9293
9291
|
});
|
|
9294
|
-
await
|
|
9295
|
-
hasText: title
|
|
9296
|
-
}).locator('.remove-action').click();
|
|
9292
|
+
await row.locator('.remove-action').click();
|
|
9297
9293
|
await this.page.locator('.modal-footer .button.save').click();
|
|
9298
9294
|
}
|
|
9299
9295
|
async expectSuccessMessageOnRisksPage() {
|
|
@@ -9304,14 +9300,11 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
|
|
|
9304
9300
|
await this.closeNotificationBanner();
|
|
9305
9301
|
}
|
|
9306
9302
|
async copyRiskProfile(title) {
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
}).waitFor({
|
|
9303
|
+
const row = this.riskProfileRow(title);
|
|
9304
|
+
await row.waitFor({
|
|
9310
9305
|
state: 'visible'
|
|
9311
9306
|
});
|
|
9312
|
-
await
|
|
9313
|
-
hasText: title
|
|
9314
|
-
}).locator('.copy-action').click();
|
|
9307
|
+
await row.locator('.copy-action').click();
|
|
9315
9308
|
}
|
|
9316
9309
|
async expectSuccessMessageOnUpdateRiskProfile() {
|
|
9317
9310
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel('success')).toBeVisible();
|
|
@@ -10361,6 +10354,63 @@ class $267ea1f27d28a032$export$8da2fa93430be6ca extends (0, $f8721861c660dd88$ex
|
|
|
10361
10354
|
|
|
10362
10355
|
|
|
10363
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
|
+
|
|
10364
10414
|
class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
10365
10415
|
constructor(page){
|
|
10366
10416
|
this.page = page;
|
|
@@ -10393,6 +10443,7 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
10393
10443
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
10394
10444
|
this.workflowCatalogPage = new (0, $7bcc05352d6debcf$export$5628dfd1b9e94785)(page);
|
|
10395
10445
|
this.taskAccessPage = new (0, $267ea1f27d28a032$export$8da2fa93430be6ca)(page);
|
|
10446
|
+
this.askReleasePage = new (0, $51c942d36af547b6$export$3006749443672de8)(page);
|
|
10396
10447
|
}
|
|
10397
10448
|
async openTemplate(id) {
|
|
10398
10449
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -10592,6 +10643,41 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
10592
10643
|
await this.page.waitForTimeout(1000);
|
|
10593
10644
|
await this.closePendoModalWindow();
|
|
10594
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
|
+
}
|
|
10595
10681
|
async loginWithoutReload(userName, password) {
|
|
10596
10682
|
let loadTriggered = false;
|
|
10597
10683
|
this.page.on('load', ()=>{
|
|
@@ -10627,6 +10713,9 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
10627
10713
|
async closePendoModalWindow() {
|
|
10628
10714
|
await this.page.waitForTimeout(1000);
|
|
10629
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);
|
|
10630
10719
|
}
|
|
10631
10720
|
async expectUserNotVisible() {
|
|
10632
10721
|
const tooltip = this.page.locator('top-toolbar .avatar-wrapper .dot-tooltip');
|