@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/dist/module.js
CHANGED
|
@@ -5233,11 +5233,10 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
|
|
|
5233
5233
|
}
|
|
5234
5234
|
async expandFolder(folderName) {
|
|
5235
5235
|
const folderRow = this.page.getByRole('listitem').filter({
|
|
5236
|
-
hasText: folderName
|
|
5236
|
+
hasText: new RegExp(`^${folderName}$`)
|
|
5237
5237
|
});
|
|
5238
5238
|
const expandIcon = folderRow.locator('.arrow-right-icon');
|
|
5239
|
-
await (0
|
|
5240
|
-
await expandIcon.click();
|
|
5239
|
+
if (await expandIcon.count() > 0) await expandIcon.click();
|
|
5241
5240
|
return this;
|
|
5242
5241
|
}
|
|
5243
5242
|
async openFolderByRow(folderName) {
|
|
@@ -5383,6 +5382,12 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
|
|
|
5383
5382
|
await this.page.getByTitle(releaseName).click();
|
|
5384
5383
|
await (0, $hOLA6$expect)(this.page.getByLabel('breadcrumb').getByText('Flow')).toBeVisible();
|
|
5385
5384
|
}
|
|
5385
|
+
async expectBreadcrumbToContain(option) {
|
|
5386
|
+
await (0, $hOLA6$expect)(this.page.getByLabel('breadcrumb').getByText(option)).toBeVisible();
|
|
5387
|
+
}
|
|
5388
|
+
async expectFolderOptionInUrl(option) {
|
|
5389
|
+
await (0, $hOLA6$expect)(this.page).toHaveURL(new RegExp(`#\\/folders\\/Applications\\/(Folder[^/]+\\/)+${option.toLowerCase()}(\\?.*)?$`));
|
|
5390
|
+
}
|
|
5386
5391
|
}
|
|
5387
5392
|
|
|
5388
5393
|
|
|
@@ -5660,6 +5665,12 @@ class $2174535b78371022$export$36d69433c4f81145 extends (0, $9626bc9256ce31f7$ex
|
|
|
5660
5665
|
await (0, $hOLA6$expect)(this.page.getByText('Introducing Analytics')).toBeVisible();
|
|
5661
5666
|
await this.page.getByLabel('Close').click();
|
|
5662
5667
|
}
|
|
5668
|
+
async expectGlobalPageToBe(option) {
|
|
5669
|
+
if (option === 'Home') await (0, $hOLA6$expect)(this.page.getByRole('heading', {
|
|
5670
|
+
name: 'Digital.ai Release Home'
|
|
5671
|
+
})).toBeVisible();
|
|
5672
|
+
else await (0, $hOLA6$expect)(this.page.getByLabel('breadcrumb').getByText(option)).toBeVisible();
|
|
5673
|
+
}
|
|
5663
5674
|
}
|
|
5664
5675
|
|
|
5665
5676
|
|
|
@@ -5885,12 +5896,17 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
5885
5896
|
return this;
|
|
5886
5897
|
}
|
|
5887
5898
|
async clickOnSaveButton() {
|
|
5888
|
-
await this.page.
|
|
5899
|
+
await this.page.getByRole('button', {
|
|
5900
|
+
name: 'Save'
|
|
5901
|
+
}).click();
|
|
5889
5902
|
return this;
|
|
5890
5903
|
}
|
|
5891
5904
|
async save() {
|
|
5892
|
-
|
|
5893
|
-
await (0, $hOLA6$expect)(
|
|
5905
|
+
const saveBtn = this.page.getByTestId('save-button');
|
|
5906
|
+
await (0, $hOLA6$expect)(saveBtn).toBeEnabled({
|
|
5907
|
+
timeout: 5000
|
|
5908
|
+
});
|
|
5909
|
+
await saveBtn.click();
|
|
5894
5910
|
return this;
|
|
5895
5911
|
}
|
|
5896
5912
|
async clearEmailInput() {
|
|
@@ -5958,6 +5974,44 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
5958
5974
|
}).click();
|
|
5959
5975
|
await (0, $hOLA6$expect)(this.page.getByText(tokenName)).not.toBeVisible();
|
|
5960
5976
|
}
|
|
5977
|
+
async setDefaultGlobalPage(option) {
|
|
5978
|
+
const dropdown = this.page.getByRole('combobox', {
|
|
5979
|
+
name: 'Default global page select'
|
|
5980
|
+
});
|
|
5981
|
+
const saveButton = this.page.getByTestId('save-button');
|
|
5982
|
+
const current = (await dropdown.innerText()).trim();
|
|
5983
|
+
if (current === option) {
|
|
5984
|
+
await (0, $hOLA6$expect)(saveButton).toBeDisabled();
|
|
5985
|
+
return;
|
|
5986
|
+
}
|
|
5987
|
+
await dropdown.click();
|
|
5988
|
+
await this.page.locator(`[role="option"][data-value="${option.toLowerCase()}"]`).click();
|
|
5989
|
+
await this.page.keyboard.press('Tab');
|
|
5990
|
+
await (0, $hOLA6$expect)(dropdown).toHaveText(option);
|
|
5991
|
+
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
5992
|
+
await saveButton.click();
|
|
5993
|
+
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
5994
|
+
}
|
|
5995
|
+
async setDefaultFolderPage(option) {
|
|
5996
|
+
const dropdown = this.page.getByRole('combobox', {
|
|
5997
|
+
name: 'Default folder page select'
|
|
5998
|
+
});
|
|
5999
|
+
const saveButton = this.page.getByTestId('save-button');
|
|
6000
|
+
const current = (await dropdown.innerText()).trim();
|
|
6001
|
+
if (current === option) {
|
|
6002
|
+
await (0, $hOLA6$expect)(saveButton).toBeDisabled();
|
|
6003
|
+
return;
|
|
6004
|
+
}
|
|
6005
|
+
await dropdown.click();
|
|
6006
|
+
await this.page.getByRole('option', {
|
|
6007
|
+
name: option
|
|
6008
|
+
}).click();
|
|
6009
|
+
await this.page.keyboard.press('Tab');
|
|
6010
|
+
await (0, $hOLA6$expect)(dropdown).toHaveText(option);
|
|
6011
|
+
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
6012
|
+
await saveButton.click();
|
|
6013
|
+
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
6014
|
+
}
|
|
5961
6015
|
}
|
|
5962
6016
|
|
|
5963
6017
|
|
|
@@ -8257,36 +8311,35 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8257
8311
|
});
|
|
8258
8312
|
await (0, $hOLA6$expect)(this.page.locator('.risk-profile .data-row .ng-binding').first()).toHaveText('Default risk profile');
|
|
8259
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
|
+
}
|
|
8260
8321
|
async openRiskProfile(title) {
|
|
8261
8322
|
await this.page.locator('#risk-profile-table').waitFor({
|
|
8262
8323
|
state: 'visible'
|
|
8263
8324
|
});
|
|
8264
|
-
await this.
|
|
8265
|
-
hasText: title
|
|
8266
|
-
}).click();
|
|
8325
|
+
await this.riskProfileRow(title).click();
|
|
8267
8326
|
return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
|
|
8268
8327
|
}
|
|
8269
8328
|
async shouldHaveCopyButtonEnabledForRiskProfile(title, enabled = true) {
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
}).waitFor({
|
|
8329
|
+
const row = this.riskProfileRow(title);
|
|
8330
|
+
await row.waitFor({
|
|
8273
8331
|
state: 'visible'
|
|
8274
8332
|
});
|
|
8275
|
-
const locator =
|
|
8276
|
-
hasText: title
|
|
8277
|
-
}).locator('.copy-action');
|
|
8333
|
+
const locator = row.locator('.copy-action');
|
|
8278
8334
|
if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
|
|
8279
8335
|
else await (0, $hOLA6$expect)(locator).not.toBeVisible();
|
|
8280
8336
|
}
|
|
8281
8337
|
async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
}).waitFor({
|
|
8338
|
+
const row = this.riskProfileRow(title);
|
|
8339
|
+
await row.waitFor({
|
|
8285
8340
|
state: 'visible'
|
|
8286
8341
|
});
|
|
8287
|
-
const locator =
|
|
8288
|
-
hasText: title
|
|
8289
|
-
}).locator(`.remove-action`);
|
|
8342
|
+
const locator = row.locator(`.remove-action`);
|
|
8290
8343
|
if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
|
|
8291
8344
|
else await (0, $hOLA6$expect)(locator).not.toBeVisible();
|
|
8292
8345
|
}
|
|
@@ -8298,14 +8351,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8298
8351
|
return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
|
|
8299
8352
|
}
|
|
8300
8353
|
async deleteRiskProfile(title) {
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
}).locator('.remove-action').waitFor({
|
|
8354
|
+
const row = this.riskProfileRow(title);
|
|
8355
|
+
await row.locator('.remove-action').waitFor({
|
|
8304
8356
|
state: 'visible'
|
|
8305
8357
|
});
|
|
8306
|
-
await
|
|
8307
|
-
hasText: title
|
|
8308
|
-
}).locator('.remove-action').click();
|
|
8358
|
+
await row.locator('.remove-action').click();
|
|
8309
8359
|
await this.page.locator('.modal-footer .button.save').click();
|
|
8310
8360
|
}
|
|
8311
8361
|
async expectSuccessMessageOnRisksPage() {
|
|
@@ -8316,14 +8366,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
|
|
|
8316
8366
|
await this.closeNotificationBanner();
|
|
8317
8367
|
}
|
|
8318
8368
|
async copyRiskProfile(title) {
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
}).waitFor({
|
|
8369
|
+
const row = this.riskProfileRow(title);
|
|
8370
|
+
await row.waitFor({
|
|
8322
8371
|
state: 'visible'
|
|
8323
8372
|
});
|
|
8324
|
-
await
|
|
8325
|
-
hasText: title
|
|
8326
|
-
}).locator('.copy-action').click();
|
|
8373
|
+
await row.locator('.copy-action').click();
|
|
8327
8374
|
}
|
|
8328
8375
|
async expectSuccessMessageOnUpdateRiskProfile() {
|
|
8329
8376
|
await (0, $hOLA6$expect)(this.page.getByLabel('success')).toBeVisible();
|
|
@@ -9373,6 +9420,63 @@ class $2c3301798e261060$export$8da2fa93430be6ca extends (0, $9626bc9256ce31f7$ex
|
|
|
9373
9420
|
|
|
9374
9421
|
|
|
9375
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
|
+
|
|
9376
9480
|
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
9377
9481
|
constructor(page){
|
|
9378
9482
|
this.page = page;
|
|
@@ -9405,16 +9509,17 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
9405
9509
|
this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
|
|
9406
9510
|
this.workflowCatalogPage = new (0, $2c7e9876d54521fb$export$5628dfd1b9e94785)(page);
|
|
9407
9511
|
this.taskAccessPage = new (0, $2c3301798e261060$export$8da2fa93430be6ca)(page);
|
|
9512
|
+
this.askReleasePage = new (0, $73758afa4dfeb1aa$export$3006749443672de8)(page);
|
|
9408
9513
|
}
|
|
9409
9514
|
async openTemplate(id) {
|
|
9410
9515
|
return this.openReleaseOrTemplate(id, false);
|
|
9411
9516
|
}
|
|
9412
9517
|
async openFolder(id) {
|
|
9413
|
-
await this.page.goto(`./#/folders/${id}
|
|
9414
|
-
await this.page.waitForSelector('#releases-content');
|
|
9518
|
+
await this.page.goto(`./#/folders/${id}`);
|
|
9415
9519
|
return new (0, $50c91328c9110668$export$b453f08936c58edb)(this.page);
|
|
9416
9520
|
}
|
|
9417
9521
|
async openFolderByName(folderName) {
|
|
9522
|
+
await this.page.goto(`./#/folders`);
|
|
9418
9523
|
const folder = this.page.getByTitle(folderName);
|
|
9419
9524
|
await (0, $hOLA6$expect)(folder).toBeVisible({
|
|
9420
9525
|
timeout: 5000
|
|
@@ -9457,6 +9562,11 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
9457
9562
|
name: 'Home'
|
|
9458
9563
|
}).click();
|
|
9459
9564
|
}
|
|
9565
|
+
async gotoHomePageByBreadcrumb() {
|
|
9566
|
+
await this.page.getByLabel('breadcrumb').getByRole('link', {
|
|
9567
|
+
name: 'Home'
|
|
9568
|
+
}).click();
|
|
9569
|
+
}
|
|
9460
9570
|
async gotoFolderPage() {
|
|
9461
9571
|
await this.page.locator('ul.side-nav li').getByLabel('Folders', {
|
|
9462
9572
|
exact: true
|
|
@@ -9599,6 +9709,41 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9599
9709
|
await this.page.waitForTimeout(1000);
|
|
9600
9710
|
await this.closePendoModalWindow();
|
|
9601
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
|
+
}
|
|
9602
9747
|
async loginWithoutReload(userName, password) {
|
|
9603
9748
|
let loadTriggered = false;
|
|
9604
9749
|
this.page.on('load', ()=>{
|
|
@@ -9634,6 +9779,9 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9634
9779
|
async closePendoModalWindow() {
|
|
9635
9780
|
await this.page.waitForTimeout(1000);
|
|
9636
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);
|
|
9637
9785
|
}
|
|
9638
9786
|
async expectUserNotVisible() {
|
|
9639
9787
|
const tooltip = this.page.locator('top-toolbar .avatar-wrapper .dot-tooltip');
|