@digital-ai/devops-page-object-release 1.0.13 → 1.0.15
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 +14319 -33
- package/dist/main.js.map +1 -1
- package/dist/module.js +79 -33
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -4,6 +4,7 @@ import $hOLA6$lodashisNil from "lodash/isNil";
|
|
|
4
4
|
import {env as $hOLA6$env} from "process";
|
|
5
5
|
import $hOLA6$moment from "moment";
|
|
6
6
|
import {promises as $hOLA6$promises} from "fs";
|
|
7
|
+
import {camelCase as $hOLA6$camelCase} from "lodash";
|
|
7
8
|
import $hOLA6$lodashisUndefined from "lodash/isUndefined";
|
|
8
9
|
import $hOLA6$lodasheach from "lodash/each";
|
|
9
10
|
import $hOLA6$lodashforEach from "lodash/forEach";
|
|
@@ -680,7 +681,7 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
680
681
|
}
|
|
681
682
|
async addNewVariable(variableName, labelname, description) {
|
|
682
683
|
await this.page.locator('button', {
|
|
683
|
-
hasText: 'New variable'
|
|
684
|
+
hasText: 'New release variable'
|
|
684
685
|
}).click();
|
|
685
686
|
await this.page.fill(`[name="fieldKey"]`, variableName);
|
|
686
687
|
await this.page.locator('.variable-label input').fill(labelname);
|
|
@@ -819,10 +820,10 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
819
820
|
await this.page.locator('#multiline').click();
|
|
820
821
|
}
|
|
821
822
|
async searchFolderVariable(variableName) {
|
|
822
|
-
await this.page.locator('
|
|
823
|
+
await this.page.locator('input#variables-filter').fill(variableName);
|
|
823
824
|
}
|
|
824
825
|
async clearFolderVarSearch() {
|
|
825
|
-
await this.page.locator('
|
|
826
|
+
await this.page.locator('input#variables-filter').clear();
|
|
826
827
|
}
|
|
827
828
|
async clickFolderVariableButton() {
|
|
828
829
|
await this.page.getByText('Folder variables').click();
|
|
@@ -5028,9 +5029,9 @@ class $d13e78163af94d50$export$9b9454a7f137e99b extends (0, $9626bc9256ce31f7$ex
|
|
|
5028
5029
|
}
|
|
5029
5030
|
async createNewPattern(patternName, patternDescription, duration) {
|
|
5030
5031
|
await this.clickNewDeliveryPattern();
|
|
5031
|
-
await this.setPatternName(patternName);
|
|
5032
5032
|
await this.setPatternDescription(patternDescription);
|
|
5033
5033
|
if (duration) await this.setDuration(duration);
|
|
5034
|
+
await this.setPatternName(patternName);
|
|
5034
5035
|
await (0, $hOLA6$expect)(this.page.locator('.action-toolbar-actions button').filter({
|
|
5035
5036
|
hasText: 'Create'
|
|
5036
5037
|
})).toBeEnabled();
|
|
@@ -5143,11 +5144,11 @@ class $d13e78163af94d50$export$9b9454a7f137e99b extends (0, $9626bc9256ce31f7$ex
|
|
|
5143
5144
|
await this.page.getByRole('button', {
|
|
5144
5145
|
name: 'New delivery'
|
|
5145
5146
|
}).click();
|
|
5146
|
-
await this.addName.fill(deliveryName);
|
|
5147
5147
|
await this.addDescription.click();
|
|
5148
5148
|
if (deliveryDes) await this.addDescription.fill(deliveryDes);
|
|
5149
5149
|
else await this.addDescription.fill('Description');
|
|
5150
5150
|
if (setAutoComplete) await this.page.getByRole('checkbox').check();
|
|
5151
|
+
await this.addName.fill(deliveryName);
|
|
5151
5152
|
await (0, $hOLA6$expect)(this.page.locator('.action-toolbar-actions button').filter({
|
|
5152
5153
|
hasText: 'Create'
|
|
5153
5154
|
})).toBeEnabled();
|
|
@@ -6927,17 +6928,40 @@ class $3a340a3f4fd8f04d$export$61be9a231bfbe7b9 extends (0, $9626bc9256ce31f7$ex
|
|
|
6927
6928
|
|
|
6928
6929
|
|
|
6929
6930
|
|
|
6931
|
+
|
|
6930
6932
|
class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
6931
6933
|
async setStatus(status) {
|
|
6934
|
+
try {
|
|
6935
|
+
// do not try to change status while we have a possible pending request
|
|
6936
|
+
await this.page.waitForResponse((r)=>r.url().includes(this.apiPath), {
|
|
6937
|
+
timeout: 5000
|
|
6938
|
+
});
|
|
6939
|
+
} catch {
|
|
6940
|
+
// nothing to do, no request was pending
|
|
6941
|
+
}
|
|
6932
6942
|
await this.page.locator('.react-tagsinput').click({
|
|
6933
6943
|
force: true
|
|
6934
6944
|
});
|
|
6935
|
-
await
|
|
6945
|
+
await Promise.all([
|
|
6946
|
+
this.page.getByText('Clear all').click(),
|
|
6947
|
+
this.page.waitForResponse((r)=>r.url().includes(this.apiPath))
|
|
6948
|
+
]);
|
|
6936
6949
|
await this.page.locator('.react-tagsinput').click({
|
|
6937
6950
|
force: true
|
|
6938
6951
|
});
|
|
6939
|
-
if (status === 'Select all') await
|
|
6940
|
-
|
|
6952
|
+
if (status === 'Select all') await Promise.all([
|
|
6953
|
+
this.page.getByText(status).click(),
|
|
6954
|
+
this.page.waitForResponse((r)=>r.url().includes(this.apiPath))
|
|
6955
|
+
]);
|
|
6956
|
+
else // retry the click until the url matches the state selected
|
|
6957
|
+
await (0, $hOLA6$expect)(async ()=>{
|
|
6958
|
+
await this.page.getByTitle(status).locator('i').first().click({
|
|
6959
|
+
timeout: 1000
|
|
6960
|
+
});
|
|
6961
|
+
await this.page.waitForURL((url)=>url.hash.toLowerCase().includes((0, $hOLA6$camelCase)(status).toLowerCase()), {
|
|
6962
|
+
timeout: 1000
|
|
6963
|
+
});
|
|
6964
|
+
}).toPass();
|
|
6941
6965
|
}
|
|
6942
6966
|
async openReleaseGroup(title) {
|
|
6943
6967
|
await this.page.locator('xlr-release-group-row').filter({
|
|
@@ -6962,13 +6986,10 @@ class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$ex
|
|
|
6962
6986
|
async searchReleaseGroupByTitle(title) {
|
|
6963
6987
|
await this.page.getByPlaceholder('Search for groups...', {
|
|
6964
6988
|
exact: true
|
|
6965
|
-
}).
|
|
6989
|
+
}).clear();
|
|
6966
6990
|
await this.page.getByPlaceholder('Search for groups...', {
|
|
6967
6991
|
exact: true
|
|
6968
6992
|
}).fill(title);
|
|
6969
|
-
await this.page.getByPlaceholder('Search for groups...', {
|
|
6970
|
-
exact: true
|
|
6971
|
-
}).press('Enter');
|
|
6972
6993
|
}
|
|
6973
6994
|
async deleteReleaseGroup(title) {
|
|
6974
6995
|
await this.page.locator('.fc-list-item-line').filter({
|
|
@@ -6996,6 +7017,9 @@ class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$ex
|
|
|
6996
7017
|
name: 'Cancel'
|
|
6997
7018
|
}).click();
|
|
6998
7019
|
}
|
|
7020
|
+
constructor(...args){
|
|
7021
|
+
super(...args), this.apiPath = '/api/v1/release-groups';
|
|
7022
|
+
}
|
|
6999
7023
|
}
|
|
7000
7024
|
|
|
7001
7025
|
|
|
@@ -7082,6 +7106,12 @@ class $7de643aea2396373$export$3a6aeb461146cd7c extends (0, $9626bc9256ce31f7$ex
|
|
|
7082
7106
|
async expectFirstVariableWithName(name) {
|
|
7083
7107
|
await (0, $hOLA6$expect)(this.page.locator('.variable .data-row').first()).toContainText(name);
|
|
7084
7108
|
}
|
|
7109
|
+
async expectEmptyStatePresent(titleText, subtitleText, buttonText) {
|
|
7110
|
+
await (0, $hOLA6$expect)(this.page.locator('.dot-empty-state')).toBeVisible();
|
|
7111
|
+
await (0, $hOLA6$expect)(this.page.locator('.dot-empty-state h2')).toHaveText(titleText);
|
|
7112
|
+
await (0, $hOLA6$expect)(this.page.locator('.dot-empty-state p')).toHaveText(subtitleText);
|
|
7113
|
+
await (0, $hOLA6$expect)(this.page.locator('.dot-empty-state button')).toHaveText(buttonText);
|
|
7114
|
+
}
|
|
7085
7115
|
async searchForVariable(variableName) {
|
|
7086
7116
|
await this.page.locator(this.getVariableSearchInputSelector()).fill(variableName);
|
|
7087
7117
|
await this.expectVariablesCountToBe(1);
|
|
@@ -7150,7 +7180,7 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $7de643aea2396373$ex
|
|
|
7150
7180
|
return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
|
|
7151
7181
|
}
|
|
7152
7182
|
async addNewVariable(variableName, labelname, description) {
|
|
7153
|
-
await this.page.locator('#action-toolbar').getByText('New variable').click();
|
|
7183
|
+
await this.page.locator('#action-toolbar').getByText('New release variable').click();
|
|
7154
7184
|
await this.page.fill(`[name="fieldKey"]`, variableName);
|
|
7155
7185
|
await this.page.locator('.variable-label input').fill(labelname);
|
|
7156
7186
|
if (description) await this.page.locator('.variable-description input').fill(description);
|
|
@@ -8338,28 +8368,34 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
|
|
|
8338
8368
|
await (0, $hOLA6$expect)(this.page.getByTestId('template-workflow-pill').getByText('Template')).toBeVisible();
|
|
8339
8369
|
}
|
|
8340
8370
|
async move(templateName, targetFolder) {
|
|
8371
|
+
const dialog = this.page.getByRole('dialog');
|
|
8341
8372
|
await this.page.locator('.template').filter({
|
|
8342
8373
|
hasText: templateName
|
|
8343
8374
|
}).locator('.template-actions .move').click();
|
|
8344
|
-
await (0, $hOLA6$expect)(
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8375
|
+
await (0, $hOLA6$expect)(dialog.getByText('Move template to')).toBeVisible();
|
|
8376
|
+
try {
|
|
8377
|
+
await dialog.getByRole('button', {
|
|
8378
|
+
name: 'Expand'
|
|
8379
|
+
}).click({
|
|
8380
|
+
timeout: 5000
|
|
8381
|
+
});
|
|
8382
|
+
} catch {
|
|
8383
|
+
// it might be that can't expand anything
|
|
8384
|
+
// so we ignore the error
|
|
8385
|
+
}
|
|
8386
|
+
await dialog.getByPlaceholder('Search folder...').click();
|
|
8387
|
+
await dialog.getByPlaceholder('Search folder...').fill(targetFolder);
|
|
8388
|
+
await dialog.getByRole('button', {
|
|
8353
8389
|
name: targetFolder
|
|
8354
8390
|
}).click();
|
|
8355
|
-
await
|
|
8391
|
+
await dialog.getByRole('button', {
|
|
8356
8392
|
name: 'Move'
|
|
8357
8393
|
}).click();
|
|
8358
|
-
await (0, $hOLA6$expect)(
|
|
8394
|
+
await (0, $hOLA6$expect)(dialog.getByText('Add', {
|
|
8359
8395
|
exact: true
|
|
8360
8396
|
})).toBeVisible();
|
|
8361
|
-
await (0, $hOLA6$expect)(
|
|
8362
|
-
await
|
|
8397
|
+
await (0, $hOLA6$expect)(dialog.getByText('Remove')).toBeVisible();
|
|
8398
|
+
await dialog.getByRole('button', {
|
|
8363
8399
|
name: 'Move'
|
|
8364
8400
|
}).click();
|
|
8365
8401
|
}
|
|
@@ -8421,17 +8457,21 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
|
|
|
8421
8457
|
name: 'New template'
|
|
8422
8458
|
});
|
|
8423
8459
|
await (0, $hOLA6$expect)(async ()=>{
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8460
|
+
try {
|
|
8461
|
+
// wait for new template button from toolbar is visible
|
|
8462
|
+
await (0, $hOLA6$expect)(newTemplateFromActionBarLocator).toBeVisible({
|
|
8463
|
+
timeout: 1000
|
|
8464
|
+
});
|
|
8427
8465
|
await newTemplateFromActionBarLocator.click();
|
|
8428
8466
|
await this.page.locator('.action-toolbar-actions').getByRole('menuitem', {
|
|
8429
8467
|
name: 'Create new template'
|
|
8430
8468
|
}).click();
|
|
8431
|
-
}
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8469
|
+
} catch {
|
|
8470
|
+
// there is no button, so we click on the empty state one
|
|
8471
|
+
await this.page.getByRole('button', {
|
|
8472
|
+
name: 'New template'
|
|
8473
|
+
}).click();
|
|
8474
|
+
}
|
|
8435
8475
|
}).toPass();
|
|
8436
8476
|
}
|
|
8437
8477
|
async openTemplateByName(templateName) {
|
|
@@ -8461,6 +8501,12 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
|
|
|
8461
8501
|
async filterByTitle(templateName) {
|
|
8462
8502
|
await this.searchBy(templateName);
|
|
8463
8503
|
}
|
|
8504
|
+
async expectOnlyOneTemplateVisible(templateName) {
|
|
8505
|
+
await (0, $hOLA6$expect)(this.page.locator('xlr-template-row-component')).toHaveCount(1);
|
|
8506
|
+
await (0, $hOLA6$expect)(this.page.locator('xlr-template-row-component').filter({
|
|
8507
|
+
hasText: templateName
|
|
8508
|
+
})).toBeVisible();
|
|
8509
|
+
}
|
|
8464
8510
|
}
|
|
8465
8511
|
|
|
8466
8512
|
|