@digital-ai/devops-page-object-deploy 0.0.9 → 0.0.10

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/dist/module.js CHANGED
@@ -1136,6 +1136,54 @@ class $3fb4750cbb53e5e6$export$1533b625ec0c75e2 extends (0, $6480ad852470b7ac$ex
1136
1136
 
1137
1137
 
1138
1138
 
1139
+ class $fe9360dc1f965c8f$export$95a11cbd2815051e extends (0, $6480ad852470b7ac$export$cb21416f3c2fd176) {
1140
+ /* Helps to navigate to the Gitops Configuration page */ async navigateToGitopsConfigurationPage() {
1141
+ await this.openRootContextMenu('Configuration');
1142
+ await this.page.getByRole('link', {
1143
+ name: 'New'
1144
+ }).click();
1145
+ await this.page.locator('a[title="git"]').click();
1146
+ await this.page.getByRole('link', {
1147
+ name: 'GitSource'
1148
+ }).click();
1149
+ await this.ensureExplorerTreeReady();
1150
+ }
1151
+ async openNewgitops() {
1152
+ await this.closeModalIfPresent();
1153
+ await this.ensureExplorerTreeReady();
1154
+ const infrastructureRoot = this.page.locator('span[data-id="Configuration"]');
1155
+ await infrastructureRoot.scrollIntoViewIfNeeded();
1156
+ await infrastructureRoot.click();
1157
+ const contextMenu = this.page.locator('i.context-menu-button[data-id="Configuration"]');
1158
+ await contextMenu.scrollIntoViewIfNeeded();
1159
+ await contextMenu.click({
1160
+ force: true
1161
+ });
1162
+ await this.page.getByRole('link', {
1163
+ name: 'New'
1164
+ }).click();
1165
+ await this.page.locator('a[title="git"]').click();
1166
+ await this.page.getByRole('link', {
1167
+ name: 'GitSource'
1168
+ }).click();
1169
+ }
1170
+ async openConfigurationNewgit() {
1171
+ await this.openNewgitops();
1172
+ }
1173
+ /* Helps to create a gitops ci*/ async createGitopsCI(ciName, gitData) {
1174
+ await this.page.locator('input[name="name"]').fill(ciName);
1175
+ await this.page.locator('input[name="username"]').fill(gitData[0]);
1176
+ await this.page.locator('input[name="password"]').fill(gitData[1]);
1177
+ await this.page.locator('input[name="url"]').fill(gitData[2]);
1178
+ await this.page.getByRole('button', {
1179
+ name: /^Save and close$/i
1180
+ }).click();
1181
+ await this.handleSaveToastOrAlreadyExists();
1182
+ }
1183
+ }
1184
+
1185
+
1186
+
1139
1187
 
1140
1188
  class $5eb37a606d823774$export$b8a443164510a1b4 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
1141
1189
  async openTab(tabLabel, paneId) {
@@ -2530,6 +2578,39 @@ class $e3cbc2135fe6aa40$export$ecd8b3e50e92d781 extends (0, $6480ad852470b7ac$ex
2530
2578
  }
2531
2579
 
2532
2580
 
2581
+
2582
+ class $9c5904ab27d13841$export$170f2cb42585788e extends (0, $6480ad852470b7ac$export$cb21416f3c2fd176) {
2583
+ /* Navigates to the Configuration Edit Permissions page via the tree context menu */ async navigateToPage() {
2584
+ await this.openRootContextMenu('Configuration');
2585
+ await this.page.getByRole('link', {
2586
+ name: 'Edit Permissions'
2587
+ }).click();
2588
+ }
2589
+ async navigateToConfigurationEditPermissionsPage() {
2590
+ await this.navigateToPage();
2591
+ }
2592
+ /* Gives the permissions to a role */ async givePermissionsToRole(roleName) {
2593
+ const filter = this.page.getByPlaceholder('Filter by roles').first();
2594
+ await filter.waitFor({
2595
+ state: 'visible'
2596
+ });
2597
+ await filter.scrollIntoViewIfNeeded();
2598
+ await filter.fill(roleName);
2599
+ const roleRow = this.page.locator('table.table-striped tbody tr').first();
2600
+ const checkboxes = roleRow.locator('input[type="checkbox"]');
2601
+ const count = await checkboxes.count();
2602
+ for(let i = 0; i < count; i += 1){
2603
+ const checkbox = checkboxes.nth(i);
2604
+ if (!await checkbox.isChecked()) await checkbox.check();
2605
+ }
2606
+ await this.page.getByRole('button', {
2607
+ name: 'Save and close'
2608
+ }).click();
2609
+ await this.handleSaveToastOrAlreadyExists();
2610
+ }
2611
+ }
2612
+
2613
+
2533
2614
  class $95d5ebc9765b570f$export$b8a61e5c71402559 extends (0, $6480ad852470b7ac$export$cb21416f3c2fd176) {
2534
2615
  constructor(page){
2535
2616
  super(page);
@@ -2545,6 +2626,8 @@ class $95d5ebc9765b570f$export$b8a61e5c71402559 extends (0, $6480ad852470b7ac$ex
2545
2626
  this.infrastructureEditPermissionsPage = new (0, $801d6ccd71155137$export$e37b272c81a10693)(page);
2546
2627
  this.environmentEditPermissionsPage = new (0, $0c1804a88a0b5036$export$c919546f4bf88f35)(page);
2547
2628
  this.applicationEditPermissionsPage = new (0, $e3cbc2135fe6aa40$export$ecd8b3e50e92d781)(page);
2629
+ this.configurationEditPermissionsPage = new (0, $9c5904ab27d13841$export$170f2cb42585788e)(page);
2630
+ this.gitopsConfigurationPage = new (0, $fe9360dc1f965c8f$export$95a11cbd2815051e)(page);
2548
2631
  }
2549
2632
  async navigateToHomePage() {
2550
2633
  await this.page.goto('/home');