@digital-ai/devops-page-object-release 1.0.6 → 1.0.8
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 +207 -51
- package/dist/main.js.map +1 -1
- package/dist/module.js +207 -51
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/module.js
CHANGED
|
@@ -575,6 +575,51 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
575
575
|
name: 'Add'
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
|
+
async selectVariableFromSelector(variableName) {
|
|
579
|
+
const normalizedVariableName = variableName.replace(/^\$\{(.+)\}$/, '$1');
|
|
580
|
+
const selector = this.page.locator('.variable-dropdown .ui-autocomplete-input').first();
|
|
581
|
+
await selector.waitFor({
|
|
582
|
+
state: 'visible'
|
|
583
|
+
});
|
|
584
|
+
await selector.click();
|
|
585
|
+
await selector.clear();
|
|
586
|
+
await selector.type(normalizedVariableName, {
|
|
587
|
+
delay: 50
|
|
588
|
+
});
|
|
589
|
+
await this.page.waitForTimeout(300);
|
|
590
|
+
await selector.press('ArrowDown');
|
|
591
|
+
const options = this.page.locator('.ui-menu-item-wrapper:visible, ul.xl-components.xl-widget-autocomplete:visible li');
|
|
592
|
+
const createOption = options.filter({
|
|
593
|
+
hasText: 'Create a new variable'
|
|
594
|
+
}).filter({
|
|
595
|
+
hasText: normalizedVariableName
|
|
596
|
+
}).first();
|
|
597
|
+
if (await createOption.isVisible({
|
|
598
|
+
timeout: 1000
|
|
599
|
+
})) {
|
|
600
|
+
await createOption.click();
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
const variableOption = options.filter({
|
|
604
|
+
hasText: variableName
|
|
605
|
+
}).first();
|
|
606
|
+
if (await variableOption.isVisible({
|
|
607
|
+
timeout: 1000
|
|
608
|
+
})) {
|
|
609
|
+
await variableOption.click();
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
await options.filter({
|
|
613
|
+
hasText: normalizedVariableName
|
|
614
|
+
}).first().click();
|
|
615
|
+
}
|
|
616
|
+
async selectValueFromInlineDropDown(value) {
|
|
617
|
+
const editor = this.page.locator('#modal .variable-value .inline-drop-down-list-editor').first();
|
|
618
|
+
await editor.locator('.xl-btn-handler').click();
|
|
619
|
+
await editor.locator('ul.xl-components.xl-widget-autocomplete li').filter({
|
|
620
|
+
hasText: value
|
|
621
|
+
}).click();
|
|
622
|
+
}
|
|
578
623
|
async openVariable(variableKey) {
|
|
579
624
|
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
580
625
|
return new $dfc4ce40cbd0eb71$var$VariableModal(this.page);
|
|
@@ -612,7 +657,7 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
612
657
|
await this.addListValue.fill(possiblevalue);
|
|
613
658
|
await this.listAddButton.click();
|
|
614
659
|
}
|
|
615
|
-
await this.
|
|
660
|
+
await this.selectValueFromInlineDropDown(defaultValue);
|
|
616
661
|
if (required) await this.page.getByRole('checkbox').check();
|
|
617
662
|
}
|
|
618
663
|
async selectVariablePasswordType(possiblevalue) {
|
|
@@ -706,19 +751,13 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
706
751
|
}
|
|
707
752
|
async switchPossibleValuesToVariable(variableName) {
|
|
708
753
|
await this.page.locator('.variable-toggle button').click();
|
|
709
|
-
await this.
|
|
710
|
-
await this.page.locator('.ui-menu-item-wrapper').filter({
|
|
711
|
-
hasText: `${variableName}`
|
|
712
|
-
}).click();
|
|
754
|
+
await this.selectVariableFromSelector(variableName);
|
|
713
755
|
}
|
|
714
756
|
async selectVariableListboxTypeWithVariable(variableName, defaultValue, required) {
|
|
715
757
|
await this.page.getByRole('combobox').selectOption('DropDownListBox');
|
|
716
758
|
await this.page.locator('.variable-toggle button').click();
|
|
717
|
-
await this.
|
|
718
|
-
await this.
|
|
719
|
-
hasText: `${variableName}`
|
|
720
|
-
}).click();
|
|
721
|
-
await this.page.locator('.variable-value select').type(defaultValue);
|
|
759
|
+
await this.selectVariableFromSelector(variableName);
|
|
760
|
+
await this.selectValueFromInlineDropDown(defaultValue);
|
|
722
761
|
if (required) await this.page.getByRole('checkbox').check();
|
|
723
762
|
else await this.page.getByRole('checkbox').uncheck();
|
|
724
763
|
}
|
|
@@ -743,6 +782,51 @@ class $dfc4ce40cbd0eb71$var$VariableModal extends (0, $9626bc9256ce31f7$export$2
|
|
|
743
782
|
super(page);
|
|
744
783
|
this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
|
|
745
784
|
}
|
|
785
|
+
async selectVariableFromSelector(variableName) {
|
|
786
|
+
const normalizedVariableName = variableName.replace(/^\$\{(.+)\}$/, '$1');
|
|
787
|
+
const selector = this.page.locator('#modal .variable-dropdown .ui-autocomplete-input').first();
|
|
788
|
+
await selector.waitFor({
|
|
789
|
+
state: 'visible'
|
|
790
|
+
});
|
|
791
|
+
await selector.click();
|
|
792
|
+
await selector.clear();
|
|
793
|
+
await selector.type(normalizedVariableName, {
|
|
794
|
+
delay: 50
|
|
795
|
+
});
|
|
796
|
+
await this.page.waitForTimeout(300);
|
|
797
|
+
await selector.press('ArrowDown');
|
|
798
|
+
const options = this.page.locator('.ui-menu-item-wrapper:visible, ul.xl-components.xl-widget-autocomplete:visible li');
|
|
799
|
+
const createOption = options.filter({
|
|
800
|
+
hasText: 'Create a new variable'
|
|
801
|
+
}).filter({
|
|
802
|
+
hasText: normalizedVariableName
|
|
803
|
+
}).first();
|
|
804
|
+
if (await createOption.isVisible({
|
|
805
|
+
timeout: 1000
|
|
806
|
+
})) {
|
|
807
|
+
await createOption.click();
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
const variableOption = options.filter({
|
|
811
|
+
hasText: variableName
|
|
812
|
+
}).first();
|
|
813
|
+
if (await variableOption.isVisible({
|
|
814
|
+
timeout: 1000
|
|
815
|
+
})) {
|
|
816
|
+
await variableOption.click();
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
await options.filter({
|
|
820
|
+
hasText: normalizedVariableName
|
|
821
|
+
}).first().click();
|
|
822
|
+
}
|
|
823
|
+
async selectValueFromInlineDropDown(value) {
|
|
824
|
+
const editor = this.page.locator('#modal .variable-value .inline-drop-down-list-editor').first();
|
|
825
|
+
await editor.locator('.xl-btn-handler').click();
|
|
826
|
+
await editor.locator('ul.xl-components.xl-widget-autocomplete li').filter({
|
|
827
|
+
hasText: value
|
|
828
|
+
}).click();
|
|
829
|
+
}
|
|
746
830
|
async expectValue(locators, expectFn) {
|
|
747
831
|
const [index, locator] = await (0, $251ce8153733e46f$export$a0f926f04148e5d2)(locators);
|
|
748
832
|
expectFn[index](locator);
|
|
@@ -799,7 +883,7 @@ class $dfc4ce40cbd0eb71$var$VariableModal extends (0, $9626bc9256ce31f7$export$2
|
|
|
799
883
|
}
|
|
800
884
|
}
|
|
801
885
|
async selectVariableValue(defaultValue) {
|
|
802
|
-
await this.
|
|
886
|
+
await this.selectValueFromInlineDropDown(defaultValue);
|
|
803
887
|
}
|
|
804
888
|
async save() {
|
|
805
889
|
const saveButton = this.page.locator('#modal .modal-footer .save');
|
|
@@ -811,29 +895,11 @@ class $dfc4ce40cbd0eb71$var$VariableModal extends (0, $9626bc9256ce31f7$export$2
|
|
|
811
895
|
await (0, $hOLA6$expect)(saveButton).not.toBeVisible();
|
|
812
896
|
}
|
|
813
897
|
async createPossibleValuesVariable(variableName) {
|
|
814
|
-
await this.page.locator('.variable-toggle button').click();
|
|
815
|
-
await (
|
|
816
|
-
await this.page.locator('.ui-autocomplete-input').clear();
|
|
817
|
-
await this.page.locator('.ui-autocomplete-input').fill(variableName);
|
|
818
|
-
const check = await this.page.locator('.ui-menu-item-wrapper').getByText('${' + variableName + '}', {
|
|
819
|
-
exact: true
|
|
820
|
-
}).isVisible({
|
|
821
|
-
timeout: 1000
|
|
822
|
-
});
|
|
823
|
-
if (check) await this.page.locator('.ui-menu-item-wrapper').getByText('${' + variableName + '}', {
|
|
824
|
-
exact: true
|
|
825
|
-
}).click({
|
|
826
|
-
timeout: 1000
|
|
827
|
-
});
|
|
828
|
-
else await this.page.locator('.ui-menu-item-wrapper').filter({
|
|
829
|
-
hasText: `${variableName}`
|
|
830
|
-
}).click({
|
|
831
|
-
timeout: 1000
|
|
832
|
-
});
|
|
833
|
-
}).toPass();
|
|
898
|
+
await this.page.locator('#modal .variable-toggle button').click();
|
|
899
|
+
await this.selectVariableFromSelector(variableName);
|
|
834
900
|
}
|
|
835
901
|
async expectVariableValueToBe(value) {
|
|
836
|
-
(0, $hOLA6$expect)(
|
|
902
|
+
await (0, $hOLA6$expect)(this.page.locator('#modal .variable-value .inline-drop-down-list-editor input').first()).toHaveValue(value);
|
|
837
903
|
}
|
|
838
904
|
async expectNoVariablesInList() {
|
|
839
905
|
await (0, $hOLA6$expect)(this.page.getByText('No variables defined.')).toBeVisible();
|
|
@@ -5428,6 +5494,13 @@ class $3df1257265fba073$export$74ca1eaaa9a0054 extends (0, $9626bc9256ce31f7$exp
|
|
|
5428
5494
|
name: 'Add'
|
|
5429
5495
|
});
|
|
5430
5496
|
}
|
|
5497
|
+
async selectValueFromInlineDropDown(value) {
|
|
5498
|
+
const editor = this.page.locator('#modal .variable-value .inline-drop-down-list-editor').first();
|
|
5499
|
+
await editor.locator('.xl-btn-handler').click();
|
|
5500
|
+
await editor.locator('ul.xl-components.xl-widget-autocomplete li').filter({
|
|
5501
|
+
hasText: value
|
|
5502
|
+
}).click();
|
|
5503
|
+
}
|
|
5431
5504
|
async addVariableText(valuename) {
|
|
5432
5505
|
await this.page.getByRole('combobox').selectOption('StringVariable');
|
|
5433
5506
|
await this.page.locator('.variable-value input').fill(valuename);
|
|
@@ -5437,7 +5510,7 @@ class $3df1257265fba073$export$74ca1eaaa9a0054 extends (0, $9626bc9256ce31f7$exp
|
|
|
5437
5510
|
await this.page.getByRole('combobox').selectOption('DropDownListBox');
|
|
5438
5511
|
await this.addListValue.fill(possiblevalue);
|
|
5439
5512
|
await this.listAddButton.click();
|
|
5440
|
-
await this.
|
|
5513
|
+
await this.selectValueFromInlineDropDown(possiblevalue);
|
|
5441
5514
|
await this.submitTheVariable();
|
|
5442
5515
|
}
|
|
5443
5516
|
async addVariablePassword(possiblevalue) {
|
|
@@ -6906,6 +6979,51 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
|
|
|
6906
6979
|
name: 'Add'
|
|
6907
6980
|
});
|
|
6908
6981
|
}
|
|
6982
|
+
async selectVariableFromSelector(variableName) {
|
|
6983
|
+
const normalizedVariableName = variableName.replace(/^\$\{(.+)\}$/, '$1');
|
|
6984
|
+
const selector = this.page.locator('.variable-dropdown .ui-autocomplete-input').first();
|
|
6985
|
+
await selector.waitFor({
|
|
6986
|
+
state: 'visible'
|
|
6987
|
+
});
|
|
6988
|
+
await selector.click();
|
|
6989
|
+
await selector.clear();
|
|
6990
|
+
await selector.type(normalizedVariableName, {
|
|
6991
|
+
delay: 50
|
|
6992
|
+
});
|
|
6993
|
+
await this.page.waitForTimeout(300);
|
|
6994
|
+
await selector.press('ArrowDown');
|
|
6995
|
+
const options = this.page.locator('.ui-menu-item-wrapper:visible, ul.xl-components.xl-widget-autocomplete:visible li');
|
|
6996
|
+
const createOption = options.filter({
|
|
6997
|
+
hasText: 'Create a new variable'
|
|
6998
|
+
}).filter({
|
|
6999
|
+
hasText: normalizedVariableName
|
|
7000
|
+
}).first();
|
|
7001
|
+
if (await createOption.isVisible({
|
|
7002
|
+
timeout: 1000
|
|
7003
|
+
})) {
|
|
7004
|
+
await createOption.click();
|
|
7005
|
+
return;
|
|
7006
|
+
}
|
|
7007
|
+
const variableOption = options.filter({
|
|
7008
|
+
hasText: variableName
|
|
7009
|
+
}).first();
|
|
7010
|
+
if (await variableOption.isVisible({
|
|
7011
|
+
timeout: 1000
|
|
7012
|
+
})) {
|
|
7013
|
+
await variableOption.click();
|
|
7014
|
+
return;
|
|
7015
|
+
}
|
|
7016
|
+
await options.filter({
|
|
7017
|
+
hasText: normalizedVariableName
|
|
7018
|
+
}).first().click();
|
|
7019
|
+
}
|
|
7020
|
+
async selectValueFromInlineDropDown(value) {
|
|
7021
|
+
const editor = this.page.locator('#modal .variable-value .inline-drop-down-list-editor').first();
|
|
7022
|
+
await editor.locator('.xl-btn-handler').click();
|
|
7023
|
+
await editor.locator('ul.xl-components.xl-widget-autocomplete li').filter({
|
|
7024
|
+
hasText: value
|
|
7025
|
+
}).click();
|
|
7026
|
+
}
|
|
6909
7027
|
async openVariable(variableKey) {
|
|
6910
7028
|
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
6911
7029
|
return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
|
|
@@ -6930,7 +7048,7 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
|
|
|
6930
7048
|
await this.addListValue.fill(possiblevalue);
|
|
6931
7049
|
await this.listAddButton.click();
|
|
6932
7050
|
}
|
|
6933
|
-
await this.
|
|
7051
|
+
await this.selectValueFromInlineDropDown(defaultValue);
|
|
6934
7052
|
if (required) await this.page.getByRole('checkbox').check();
|
|
6935
7053
|
else await this.page.getByRole('checkbox').uncheck();
|
|
6936
7054
|
}
|
|
@@ -7019,19 +7137,13 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
|
|
|
7019
7137
|
}
|
|
7020
7138
|
async switchPossibleValuesToVariable(variableName) {
|
|
7021
7139
|
await this.page.locator('.variable-toggle button').click();
|
|
7022
|
-
await this.
|
|
7023
|
-
await this.page.locator('.ui-menu-item-wrapper').filter({
|
|
7024
|
-
hasText: `${variableName}`
|
|
7025
|
-
}).click();
|
|
7140
|
+
await this.selectVariableFromSelector(variableName);
|
|
7026
7141
|
}
|
|
7027
7142
|
async selectVariableListboxTypeWithVariable(variableName, defaultValue, required) {
|
|
7028
7143
|
await this.page.getByRole('combobox').selectOption('DropDownListBox');
|
|
7029
7144
|
await this.page.locator('.variable-toggle button').click();
|
|
7030
|
-
await this.
|
|
7031
|
-
await this.
|
|
7032
|
-
hasText: `${variableName}`
|
|
7033
|
-
}).click();
|
|
7034
|
-
await this.page.locator('.variable-value select').type(defaultValue);
|
|
7145
|
+
await this.selectVariableFromSelector(variableName);
|
|
7146
|
+
await this.selectValueFromInlineDropDown(defaultValue);
|
|
7035
7147
|
if (required) await this.page.getByRole('checkbox').check();
|
|
7036
7148
|
else await this.page.getByRole('checkbox').uncheck();
|
|
7037
7149
|
}
|
|
@@ -7041,6 +7153,51 @@ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
|
|
|
7041
7153
|
super(page);
|
|
7042
7154
|
this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
|
|
7043
7155
|
}
|
|
7156
|
+
async selectVariableFromSelector(variableName) {
|
|
7157
|
+
const normalizedVariableName = variableName.replace(/^\$\{(.+)\}$/, '$1');
|
|
7158
|
+
const selector = this.page.locator('#modal .variable-dropdown .ui-autocomplete-input').first();
|
|
7159
|
+
await selector.waitFor({
|
|
7160
|
+
state: 'visible'
|
|
7161
|
+
});
|
|
7162
|
+
await selector.click();
|
|
7163
|
+
await selector.clear();
|
|
7164
|
+
await selector.type(normalizedVariableName, {
|
|
7165
|
+
delay: 50
|
|
7166
|
+
});
|
|
7167
|
+
await this.page.waitForTimeout(300);
|
|
7168
|
+
await selector.press('ArrowDown');
|
|
7169
|
+
const options = this.page.locator('.ui-menu-item-wrapper:visible, ul.xl-components.xl-widget-autocomplete:visible li');
|
|
7170
|
+
const createOption = options.filter({
|
|
7171
|
+
hasText: 'Create a new variable'
|
|
7172
|
+
}).filter({
|
|
7173
|
+
hasText: normalizedVariableName
|
|
7174
|
+
}).first();
|
|
7175
|
+
if (await createOption.isVisible({
|
|
7176
|
+
timeout: 1000
|
|
7177
|
+
})) {
|
|
7178
|
+
await createOption.click();
|
|
7179
|
+
return;
|
|
7180
|
+
}
|
|
7181
|
+
const variableOption = options.filter({
|
|
7182
|
+
hasText: variableName
|
|
7183
|
+
}).first();
|
|
7184
|
+
if (await variableOption.isVisible({
|
|
7185
|
+
timeout: 1000
|
|
7186
|
+
})) {
|
|
7187
|
+
await variableOption.click();
|
|
7188
|
+
return;
|
|
7189
|
+
}
|
|
7190
|
+
await options.filter({
|
|
7191
|
+
hasText: normalizedVariableName
|
|
7192
|
+
}).first().click();
|
|
7193
|
+
}
|
|
7194
|
+
async selectValueFromInlineDropDown(value) {
|
|
7195
|
+
const editor = this.page.locator('#modal .variable-value .inline-drop-down-list-editor').first();
|
|
7196
|
+
await editor.locator('.xl-btn-handler').click();
|
|
7197
|
+
await editor.locator('ul.xl-components.xl-widget-autocomplete li').filter({
|
|
7198
|
+
hasText: value
|
|
7199
|
+
}).click();
|
|
7200
|
+
}
|
|
7044
7201
|
async expectValue(locators, expectFn) {
|
|
7045
7202
|
const [index, locator] = await (0, $251ce8153733e46f$export$a0f926f04148e5d2)(locators);
|
|
7046
7203
|
expectFn[index](locator);
|
|
@@ -7097,7 +7254,7 @@ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
|
|
|
7097
7254
|
}
|
|
7098
7255
|
}
|
|
7099
7256
|
async selectVariableValue(defaultValue) {
|
|
7100
|
-
await this.
|
|
7257
|
+
await this.selectValueFromInlineDropDown(defaultValue);
|
|
7101
7258
|
}
|
|
7102
7259
|
async save() {
|
|
7103
7260
|
const saveButton = this.page.locator('#modal .modal-footer .save');
|
|
@@ -7109,14 +7266,11 @@ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
|
|
|
7109
7266
|
await (0, $hOLA6$expect)(saveButton).not.toBeVisible();
|
|
7110
7267
|
}
|
|
7111
7268
|
async createPossibleValuesVariable(variableName) {
|
|
7112
|
-
await this.page.locator('.variable-toggle button').click();
|
|
7113
|
-
await this.
|
|
7114
|
-
await this.page.locator('.ui-menu-item-wrapper').filter({
|
|
7115
|
-
hasText: `${variableName}`
|
|
7116
|
-
}).click();
|
|
7269
|
+
await this.page.locator('#modal .variable-toggle button').click();
|
|
7270
|
+
await this.selectVariableFromSelector(variableName);
|
|
7117
7271
|
}
|
|
7118
7272
|
async expectVariableValueToBe(value) {
|
|
7119
|
-
(0, $hOLA6$expect)(
|
|
7273
|
+
await (0, $hOLA6$expect)(this.page.locator('#modal .variable-value .inline-drop-down-list-editor input').first()).toHaveValue(value);
|
|
7120
7274
|
}
|
|
7121
7275
|
async expectNoVariablesInList() {
|
|
7122
7276
|
await (0, $hOLA6$expect)(this.page.getByText('No variables defined.')).toBeVisible();
|
|
@@ -9258,7 +9412,9 @@ class $6c0f5b52769b32c3$export$9823ddf5e80770e7 extends (0, $9626bc9256ce31f7$ex
|
|
|
9258
9412
|
async deleteInstance(instanceName) {
|
|
9259
9413
|
await this.page.locator('.configuration-instance').filter({
|
|
9260
9414
|
hasText: instanceName
|
|
9261
|
-
}).locator('.delete-instance').click(
|
|
9415
|
+
}).locator('.delete-instance').click({
|
|
9416
|
+
force: true
|
|
9417
|
+
});
|
|
9262
9418
|
return this;
|
|
9263
9419
|
}
|
|
9264
9420
|
async expectDeleteDialog(dialogName) {
|