@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/dist/module.js
CHANGED
|
@@ -8311,36 +8311,35 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8311
8311
|
});
|
|
8312
8312
|
await (0, $hOLA6$expect)(this.page.locator('.risk-profile .data-row .ng-binding').first()).toHaveText('Default risk profile');
|
|
8313
8313
|
}
|
|
8314
|
+
riskProfileRow(title) {
|
|
8315
|
+
return this.page.locator('.risk-profile .data-row').filter({
|
|
8316
|
+
has: this.page.getByText(title, {
|
|
8317
|
+
exact: true
|
|
8318
|
+
})
|
|
8319
|
+
});
|
|
8320
|
+
}
|
|
8314
8321
|
async openRiskProfile(title) {
|
|
8315
8322
|
await this.page.locator('#risk-profile-table').waitFor({
|
|
8316
8323
|
state: 'visible'
|
|
8317
8324
|
});
|
|
8318
|
-
await this.
|
|
8319
|
-
hasText: title
|
|
8320
|
-
}).click();
|
|
8325
|
+
await this.riskProfileRow(title).click();
|
|
8321
8326
|
return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
|
|
8322
8327
|
}
|
|
8323
8328
|
async shouldHaveCopyButtonEnabledForRiskProfile(title, enabled = true) {
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
}).waitFor({
|
|
8329
|
+
const row = this.riskProfileRow(title);
|
|
8330
|
+
await row.waitFor({
|
|
8327
8331
|
state: 'visible'
|
|
8328
8332
|
});
|
|
8329
|
-
const locator =
|
|
8330
|
-
hasText: title
|
|
8331
|
-
}).locator('.copy-action');
|
|
8333
|
+
const locator = row.locator('.copy-action');
|
|
8332
8334
|
if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
|
|
8333
8335
|
else await (0, $hOLA6$expect)(locator).not.toBeVisible();
|
|
8334
8336
|
}
|
|
8335
8337
|
async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
}).waitFor({
|
|
8338
|
+
const row = this.riskProfileRow(title);
|
|
8339
|
+
await row.waitFor({
|
|
8339
8340
|
state: 'visible'
|
|
8340
8341
|
});
|
|
8341
|
-
const locator =
|
|
8342
|
-
hasText: title
|
|
8343
|
-
}).locator(`.remove-action`);
|
|
8342
|
+
const locator = row.locator(`.remove-action`);
|
|
8344
8343
|
if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
|
|
8345
8344
|
else await (0, $hOLA6$expect)(locator).not.toBeVisible();
|
|
8346
8345
|
}
|
|
@@ -8352,14 +8351,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8352
8351
|
return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
|
|
8353
8352
|
}
|
|
8354
8353
|
async deleteRiskProfile(title) {
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
}).locator('.remove-action').waitFor({
|
|
8354
|
+
const row = this.riskProfileRow(title);
|
|
8355
|
+
await row.locator('.remove-action').waitFor({
|
|
8358
8356
|
state: 'visible'
|
|
8359
8357
|
});
|
|
8360
|
-
await
|
|
8361
|
-
hasText: title
|
|
8362
|
-
}).locator('.remove-action').click();
|
|
8358
|
+
await row.locator('.remove-action').click();
|
|
8363
8359
|
await this.page.locator('.modal-footer .button.save').click();
|
|
8364
8360
|
}
|
|
8365
8361
|
async expectSuccessMessageOnRisksPage() {
|
|
@@ -8370,14 +8366,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8370
8366
|
await this.closeNotificationBanner();
|
|
8371
8367
|
}
|
|
8372
8368
|
async copyRiskProfile(title) {
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
}).waitFor({
|
|
8369
|
+
const row = this.riskProfileRow(title);
|
|
8370
|
+
await row.waitFor({
|
|
8376
8371
|
state: 'visible'
|
|
8377
8372
|
});
|
|
8378
|
-
await
|
|
8379
|
-
hasText: title
|
|
8380
|
-
}).locator('.copy-action').click();
|
|
8373
|
+
await row.locator('.copy-action').click();
|
|
8381
8374
|
}
|
|
8382
8375
|
async expectSuccessMessageOnUpdateRiskProfile() {
|
|
8383
8376
|
await (0, $hOLA6$expect)(this.page.getByLabel('success')).toBeVisible();
|
|
@@ -9427,6 +9420,63 @@ class $2c3301798e261060$export$8da2fa93430be6ca extends (0, $9626bc9256ce31f7$ex
|
|
|
9427
9420
|
|
|
9428
9421
|
|
|
9429
9422
|
|
|
9423
|
+
|
|
9424
|
+
|
|
9425
|
+
class $73758afa4dfeb1aa$export$3006749443672de8 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
9426
|
+
constructor(page){
|
|
9427
|
+
super(page);
|
|
9428
|
+
this.AskReleaseButton = this.page.getByRole('button', {
|
|
9429
|
+
name: 'Ask Release'
|
|
9430
|
+
});
|
|
9431
|
+
}
|
|
9432
|
+
async clickAskReleaseButton() {
|
|
9433
|
+
await this.AskReleaseButton.click();
|
|
9434
|
+
}
|
|
9435
|
+
async clickNewChatButton() {
|
|
9436
|
+
await (0, $hOLA6$expect)(this.page.getByRole('button', {
|
|
9437
|
+
name: 'New chat'
|
|
9438
|
+
})).toBeVisible();
|
|
9439
|
+
await this.page.getByRole('button', {
|
|
9440
|
+
name: 'New chat'
|
|
9441
|
+
}).click();
|
|
9442
|
+
}
|
|
9443
|
+
async clickHistory() {
|
|
9444
|
+
await (0, $hOLA6$expect)(this.page.getByTestId('rail-item-1')).toBeVisible();
|
|
9445
|
+
await this.page.getByTestId('rail-item-1').first().click();
|
|
9446
|
+
}
|
|
9447
|
+
async expectAskReleaseChatWindowToBeOpen() {
|
|
9448
|
+
await (0, $hOLA6$expect)(this.page.getByRole('heading', {
|
|
9449
|
+
name: 'Ask release'
|
|
9450
|
+
})).toBeVisible();
|
|
9451
|
+
}
|
|
9452
|
+
async expectAskReleaseChatWindowToBeClosed() {
|
|
9453
|
+
await (0, $hOLA6$expect)(this.page.getByRole('heading', {
|
|
9454
|
+
name: 'Ask release'
|
|
9455
|
+
})).not.toBeVisible();
|
|
9456
|
+
}
|
|
9457
|
+
async expectCorrectResponse(response, timeout = 360000) {
|
|
9458
|
+
await (0, $hOLA6$expect)(this.page.getByText(response, {
|
|
9459
|
+
exact: false
|
|
9460
|
+
})).toBeVisible({
|
|
9461
|
+
timeout: timeout
|
|
9462
|
+
});
|
|
9463
|
+
}
|
|
9464
|
+
async expectChatInputDrawerToBeEnabled() {
|
|
9465
|
+
await (0, $hOLA6$expect)(this.page.getByRole('textbox', {
|
|
9466
|
+
name: 'Ask your question...'
|
|
9467
|
+
})).toBeVisible();
|
|
9468
|
+
}
|
|
9469
|
+
async feedYourQuestion(question) {
|
|
9470
|
+
await this.page.getByRole('textbox', {
|
|
9471
|
+
name: 'Ask your question...'
|
|
9472
|
+
}).fill(question);
|
|
9473
|
+
await this.page.getByRole('button', {
|
|
9474
|
+
name: 'Send'
|
|
9475
|
+
}).click();
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9478
|
+
|
|
9479
|
+
|
|
9430
9480
|
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
9431
9481
|
constructor(page){
|
|
9432
9482
|
this.page = page;
|
|
@@ -9459,6 +9509,7 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
9459
9509
|
this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
|
|
9460
9510
|
this.workflowCatalogPage = new (0, $2c7e9876d54521fb$export$5628dfd1b9e94785)(page);
|
|
9461
9511
|
this.taskAccessPage = new (0, $2c3301798e261060$export$8da2fa93430be6ca)(page);
|
|
9512
|
+
this.askReleasePage = new (0, $73758afa4dfeb1aa$export$3006749443672de8)(page);
|
|
9462
9513
|
}
|
|
9463
9514
|
async openTemplate(id) {
|
|
9464
9515
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -9658,6 +9709,41 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9658
9709
|
await this.page.waitForTimeout(1000);
|
|
9659
9710
|
await this.closePendoModalWindow();
|
|
9660
9711
|
}
|
|
9712
|
+
/**
|
|
9713
|
+
* Login via SaaS (Keycloak SSO) with username and password
|
|
9714
|
+
* @param userName
|
|
9715
|
+
* @param password
|
|
9716
|
+
*/ async loginSaas(userName, password) {
|
|
9717
|
+
await this.page.goto('/#home', {
|
|
9718
|
+
waitUntil: 'domcontentloaded'
|
|
9719
|
+
});
|
|
9720
|
+
// Wait for either OIDC login page or already-authenticated app page
|
|
9721
|
+
await this.page.waitForURL(/(auth\/realms|#\/(home|default))/, {
|
|
9722
|
+
timeout: 60000,
|
|
9723
|
+
waitUntil: 'domcontentloaded'
|
|
9724
|
+
});
|
|
9725
|
+
// If redirected to OIDC login page, fill credentials
|
|
9726
|
+
if (this.page.url().includes('auth/realms')) {
|
|
9727
|
+
await this.page.getByRole('textbox', {
|
|
9728
|
+
name: 'Username or email'
|
|
9729
|
+
}).fill(userName, {
|
|
9730
|
+
timeout: 10000
|
|
9731
|
+
});
|
|
9732
|
+
await this.page.locator('#password').fill(password, {
|
|
9733
|
+
timeout: 10000
|
|
9734
|
+
});
|
|
9735
|
+
await this.page.getByRole('button', {
|
|
9736
|
+
name: 'Sign In'
|
|
9737
|
+
}).click({
|
|
9738
|
+
timeout: 30000
|
|
9739
|
+
});
|
|
9740
|
+
await this.page.waitForURL(/#\/(home|default)/, {
|
|
9741
|
+
timeout: 60000,
|
|
9742
|
+
waitUntil: 'domcontentloaded'
|
|
9743
|
+
});
|
|
9744
|
+
}
|
|
9745
|
+
await this.closePendoModalWindow();
|
|
9746
|
+
}
|
|
9661
9747
|
async loginWithoutReload(userName, password) {
|
|
9662
9748
|
let loadTriggered = false;
|
|
9663
9749
|
this.page.on('load', ()=>{
|
|
@@ -9693,6 +9779,9 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9693
9779
|
async closePendoModalWindow() {
|
|
9694
9780
|
await this.page.waitForTimeout(1000);
|
|
9695
9781
|
if (await this.page.locator('._pendo-close-guide').count() > 0) await this.page.locator('._pendo-close-guide').click();
|
|
9782
|
+
await this.page.locator('button.close').first().click({
|
|
9783
|
+
timeout: 2000
|
|
9784
|
+
}).catch((_)=>undefined);
|
|
9696
9785
|
}
|
|
9697
9786
|
async expectUserNotVisible() {
|
|
9698
9787
|
const tooltip = this.page.locator('top-toolbar .avatar-wrapper .dot-tooltip');
|