@digital-ai/devops-page-object-release 0.0.120 → 1.0.1
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 +131 -32
- package/dist/main.js.map +1 -1
- package/dist/module.js +131 -32
- 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
|
@@ -5902,11 +5902,21 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
5902
5902
|
return this;
|
|
5903
5903
|
}
|
|
5904
5904
|
async save() {
|
|
5905
|
-
const
|
|
5906
|
-
await
|
|
5905
|
+
const saveButton = this.page.getByTestId('save-button');
|
|
5906
|
+
await saveButton.waitFor({
|
|
5907
|
+
state: 'visible',
|
|
5907
5908
|
timeout: 5000
|
|
5908
5909
|
});
|
|
5909
|
-
await
|
|
5910
|
+
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
5911
|
+
await saveButton.click();
|
|
5912
|
+
// Wait for the toast or saved text to appear
|
|
5913
|
+
const toast = this.page.getByText('Changes saved successfully').first();
|
|
5914
|
+
await toast.waitFor({
|
|
5915
|
+
state: 'visible',
|
|
5916
|
+
timeout: 5000
|
|
5917
|
+
}).catch(()=>{
|
|
5918
|
+
undefined;
|
|
5919
|
+
});
|
|
5910
5920
|
return this;
|
|
5911
5921
|
}
|
|
5912
5922
|
async clearEmailInput() {
|
|
@@ -5990,7 +6000,7 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
5990
6000
|
await (0, $hOLA6$expect)(dropdown).toHaveText(option);
|
|
5991
6001
|
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
5992
6002
|
await saveButton.click();
|
|
5993
|
-
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
6003
|
+
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully').first()).toBeVisible();
|
|
5994
6004
|
}
|
|
5995
6005
|
async setDefaultFolderPage(option) {
|
|
5996
6006
|
const dropdown = this.page.getByRole('combobox', {
|
|
@@ -6010,7 +6020,7 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
6010
6020
|
await (0, $hOLA6$expect)(dropdown).toHaveText(option);
|
|
6011
6021
|
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
6012
6022
|
await saveButton.click();
|
|
6013
|
-
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
6023
|
+
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully').first()).toBeVisible();
|
|
6014
6024
|
}
|
|
6015
6025
|
}
|
|
6016
6026
|
|
|
@@ -8311,36 +8321,35 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8311
8321
|
});
|
|
8312
8322
|
await (0, $hOLA6$expect)(this.page.locator('.risk-profile .data-row .ng-binding').first()).toHaveText('Default risk profile');
|
|
8313
8323
|
}
|
|
8324
|
+
riskProfileRow(title) {
|
|
8325
|
+
return this.page.locator('.risk-profile .data-row').filter({
|
|
8326
|
+
has: this.page.getByText(title, {
|
|
8327
|
+
exact: true
|
|
8328
|
+
})
|
|
8329
|
+
});
|
|
8330
|
+
}
|
|
8314
8331
|
async openRiskProfile(title) {
|
|
8315
8332
|
await this.page.locator('#risk-profile-table').waitFor({
|
|
8316
8333
|
state: 'visible'
|
|
8317
8334
|
});
|
|
8318
|
-
await this.
|
|
8319
|
-
hasText: title
|
|
8320
|
-
}).click();
|
|
8335
|
+
await this.riskProfileRow(title).click();
|
|
8321
8336
|
return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
|
|
8322
8337
|
}
|
|
8323
8338
|
async shouldHaveCopyButtonEnabledForRiskProfile(title, enabled = true) {
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
}).waitFor({
|
|
8339
|
+
const row = this.riskProfileRow(title);
|
|
8340
|
+
await row.waitFor({
|
|
8327
8341
|
state: 'visible'
|
|
8328
8342
|
});
|
|
8329
|
-
const locator =
|
|
8330
|
-
hasText: title
|
|
8331
|
-
}).locator('.copy-action');
|
|
8343
|
+
const locator = row.locator('.copy-action');
|
|
8332
8344
|
if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
|
|
8333
8345
|
else await (0, $hOLA6$expect)(locator).not.toBeVisible();
|
|
8334
8346
|
}
|
|
8335
8347
|
async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
}).waitFor({
|
|
8348
|
+
const row = this.riskProfileRow(title);
|
|
8349
|
+
await row.waitFor({
|
|
8339
8350
|
state: 'visible'
|
|
8340
8351
|
});
|
|
8341
|
-
const locator =
|
|
8342
|
-
hasText: title
|
|
8343
|
-
}).locator(`.remove-action`);
|
|
8352
|
+
const locator = row.locator(`.remove-action`);
|
|
8344
8353
|
if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
|
|
8345
8354
|
else await (0, $hOLA6$expect)(locator).not.toBeVisible();
|
|
8346
8355
|
}
|
|
@@ -8352,14 +8361,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8352
8361
|
return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
|
|
8353
8362
|
}
|
|
8354
8363
|
async deleteRiskProfile(title) {
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
}).locator('.remove-action').waitFor({
|
|
8364
|
+
const row = this.riskProfileRow(title);
|
|
8365
|
+
await row.locator('.remove-action').waitFor({
|
|
8358
8366
|
state: 'visible'
|
|
8359
8367
|
});
|
|
8360
|
-
await
|
|
8361
|
-
hasText: title
|
|
8362
|
-
}).locator('.remove-action').click();
|
|
8368
|
+
await row.locator('.remove-action').click();
|
|
8363
8369
|
await this.page.locator('.modal-footer .button.save').click();
|
|
8364
8370
|
}
|
|
8365
8371
|
async expectSuccessMessageOnRisksPage() {
|
|
@@ -8370,14 +8376,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8370
8376
|
await this.closeNotificationBanner();
|
|
8371
8377
|
}
|
|
8372
8378
|
async copyRiskProfile(title) {
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
}).waitFor({
|
|
8379
|
+
const row = this.riskProfileRow(title);
|
|
8380
|
+
await row.waitFor({
|
|
8376
8381
|
state: 'visible'
|
|
8377
8382
|
});
|
|
8378
|
-
await
|
|
8379
|
-
hasText: title
|
|
8380
|
-
}).locator('.copy-action').click();
|
|
8383
|
+
await row.locator('.copy-action').click();
|
|
8381
8384
|
}
|
|
8382
8385
|
async expectSuccessMessageOnUpdateRiskProfile() {
|
|
8383
8386
|
await (0, $hOLA6$expect)(this.page.getByLabel('success')).toBeVisible();
|
|
@@ -9427,6 +9430,63 @@ class $2c3301798e261060$export$8da2fa93430be6ca extends (0, $9626bc9256ce31f7$ex
|
|
|
9427
9430
|
|
|
9428
9431
|
|
|
9429
9432
|
|
|
9433
|
+
|
|
9434
|
+
|
|
9435
|
+
class $73758afa4dfeb1aa$export$3006749443672de8 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
9436
|
+
constructor(page){
|
|
9437
|
+
super(page);
|
|
9438
|
+
this.AskReleaseButton = this.page.getByRole('button', {
|
|
9439
|
+
name: 'Ask Release'
|
|
9440
|
+
});
|
|
9441
|
+
}
|
|
9442
|
+
async clickAskReleaseButton() {
|
|
9443
|
+
await this.AskReleaseButton.click();
|
|
9444
|
+
}
|
|
9445
|
+
async clickNewChatButton() {
|
|
9446
|
+
await (0, $hOLA6$expect)(this.page.getByRole('button', {
|
|
9447
|
+
name: 'New chat'
|
|
9448
|
+
})).toBeVisible();
|
|
9449
|
+
await this.page.getByRole('button', {
|
|
9450
|
+
name: 'New chat'
|
|
9451
|
+
}).click();
|
|
9452
|
+
}
|
|
9453
|
+
async clickHistory() {
|
|
9454
|
+
await (0, $hOLA6$expect)(this.page.getByTestId('rail-item-1')).toBeVisible();
|
|
9455
|
+
await this.page.getByTestId('rail-item-1').first().click();
|
|
9456
|
+
}
|
|
9457
|
+
async expectAskReleaseChatWindowToBeOpen() {
|
|
9458
|
+
await (0, $hOLA6$expect)(this.page.getByRole('heading', {
|
|
9459
|
+
name: 'Ask release'
|
|
9460
|
+
})).toBeVisible();
|
|
9461
|
+
}
|
|
9462
|
+
async expectAskReleaseChatWindowToBeClosed() {
|
|
9463
|
+
await (0, $hOLA6$expect)(this.page.getByRole('heading', {
|
|
9464
|
+
name: 'Ask release'
|
|
9465
|
+
})).not.toBeVisible();
|
|
9466
|
+
}
|
|
9467
|
+
async expectCorrectResponse(response, timeout = 360000) {
|
|
9468
|
+
await (0, $hOLA6$expect)(this.page.getByText(response, {
|
|
9469
|
+
exact: false
|
|
9470
|
+
})).toBeVisible({
|
|
9471
|
+
timeout: timeout
|
|
9472
|
+
});
|
|
9473
|
+
}
|
|
9474
|
+
async expectChatInputDrawerToBeEnabled() {
|
|
9475
|
+
await (0, $hOLA6$expect)(this.page.getByRole('textbox', {
|
|
9476
|
+
name: 'Ask your question...'
|
|
9477
|
+
})).toBeVisible();
|
|
9478
|
+
}
|
|
9479
|
+
async feedYourQuestion(question) {
|
|
9480
|
+
await this.page.getByRole('textbox', {
|
|
9481
|
+
name: 'Ask your question...'
|
|
9482
|
+
}).fill(question);
|
|
9483
|
+
await this.page.getByRole('button', {
|
|
9484
|
+
name: 'Send'
|
|
9485
|
+
}).click();
|
|
9486
|
+
}
|
|
9487
|
+
}
|
|
9488
|
+
|
|
9489
|
+
|
|
9430
9490
|
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
9431
9491
|
constructor(page){
|
|
9432
9492
|
this.page = page;
|
|
@@ -9459,6 +9519,7 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
9459
9519
|
this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
|
|
9460
9520
|
this.workflowCatalogPage = new (0, $2c7e9876d54521fb$export$5628dfd1b9e94785)(page);
|
|
9461
9521
|
this.taskAccessPage = new (0, $2c3301798e261060$export$8da2fa93430be6ca)(page);
|
|
9522
|
+
this.askReleasePage = new (0, $73758afa4dfeb1aa$export$3006749443672de8)(page);
|
|
9462
9523
|
}
|
|
9463
9524
|
async openTemplate(id) {
|
|
9464
9525
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -9658,6 +9719,41 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9658
9719
|
await this.page.waitForTimeout(1000);
|
|
9659
9720
|
await this.closePendoModalWindow();
|
|
9660
9721
|
}
|
|
9722
|
+
/**
|
|
9723
|
+
* Login via SaaS (Keycloak SSO) with username and password
|
|
9724
|
+
* @param userName
|
|
9725
|
+
* @param password
|
|
9726
|
+
*/ async loginSaas(userName, password) {
|
|
9727
|
+
await this.page.goto('/#home', {
|
|
9728
|
+
waitUntil: 'domcontentloaded'
|
|
9729
|
+
});
|
|
9730
|
+
// Wait for either OIDC login page or already-authenticated app page
|
|
9731
|
+
await this.page.waitForURL(/(auth\/realms|#\/(home|default))/, {
|
|
9732
|
+
timeout: 60000,
|
|
9733
|
+
waitUntil: 'domcontentloaded'
|
|
9734
|
+
});
|
|
9735
|
+
// If redirected to OIDC login page, fill credentials
|
|
9736
|
+
if (this.page.url().includes('auth/realms')) {
|
|
9737
|
+
await this.page.getByRole('textbox', {
|
|
9738
|
+
name: 'Username or email'
|
|
9739
|
+
}).fill(userName, {
|
|
9740
|
+
timeout: 10000
|
|
9741
|
+
});
|
|
9742
|
+
await this.page.locator('#password').fill(password, {
|
|
9743
|
+
timeout: 10000
|
|
9744
|
+
});
|
|
9745
|
+
await this.page.getByRole('button', {
|
|
9746
|
+
name: 'Sign In'
|
|
9747
|
+
}).click({
|
|
9748
|
+
timeout: 30000
|
|
9749
|
+
});
|
|
9750
|
+
await this.page.waitForURL(/#\/(home|default)/, {
|
|
9751
|
+
timeout: 60000,
|
|
9752
|
+
waitUntil: 'domcontentloaded'
|
|
9753
|
+
});
|
|
9754
|
+
}
|
|
9755
|
+
await this.closePendoModalWindow();
|
|
9756
|
+
}
|
|
9661
9757
|
async loginWithoutReload(userName, password) {
|
|
9662
9758
|
let loadTriggered = false;
|
|
9663
9759
|
this.page.on('load', ()=>{
|
|
@@ -9693,6 +9789,9 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9693
9789
|
async closePendoModalWindow() {
|
|
9694
9790
|
await this.page.waitForTimeout(1000);
|
|
9695
9791
|
if (await this.page.locator('._pendo-close-guide').count() > 0) await this.page.locator('._pendo-close-guide').click();
|
|
9792
|
+
await this.page.locator('button.close').first().click({
|
|
9793
|
+
timeout: 2000
|
|
9794
|
+
}).catch((_)=>undefined);
|
|
9696
9795
|
}
|
|
9697
9796
|
async expectUserNotVisible() {
|
|
9698
9797
|
const tooltip = this.page.locator('top-toolbar .avatar-wrapper .dot-tooltip');
|