@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @digital-ai/devops-page-object-deploy
2
2
 
3
+ ## 0.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 0c70fa6: S-126088-New Gitops-Page Objects
8
+
3
9
  ## 0.0.9
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1142,6 +1142,54 @@ class $408106958eb335da$export$1533b625ec0c75e2 extends (0, $84f8d1abd29d48fd$ex
1142
1142
 
1143
1143
 
1144
1144
 
1145
+ class $179e7dbfee839d39$export$95a11cbd2815051e extends (0, $84f8d1abd29d48fd$export$cb21416f3c2fd176) {
1146
+ /* Helps to navigate to the Gitops Configuration page */ async navigateToGitopsConfigurationPage() {
1147
+ await this.openRootContextMenu('Configuration');
1148
+ await this.page.getByRole('link', {
1149
+ name: 'New'
1150
+ }).click();
1151
+ await this.page.locator('a[title="git"]').click();
1152
+ await this.page.getByRole('link', {
1153
+ name: 'GitSource'
1154
+ }).click();
1155
+ await this.ensureExplorerTreeReady();
1156
+ }
1157
+ async openNewgitops() {
1158
+ await this.closeModalIfPresent();
1159
+ await this.ensureExplorerTreeReady();
1160
+ const infrastructureRoot = this.page.locator('span[data-id="Configuration"]');
1161
+ await infrastructureRoot.scrollIntoViewIfNeeded();
1162
+ await infrastructureRoot.click();
1163
+ const contextMenu = this.page.locator('i.context-menu-button[data-id="Configuration"]');
1164
+ await contextMenu.scrollIntoViewIfNeeded();
1165
+ await contextMenu.click({
1166
+ force: true
1167
+ });
1168
+ await this.page.getByRole('link', {
1169
+ name: 'New'
1170
+ }).click();
1171
+ await this.page.locator('a[title="git"]').click();
1172
+ await this.page.getByRole('link', {
1173
+ name: 'GitSource'
1174
+ }).click();
1175
+ }
1176
+ async openConfigurationNewgit() {
1177
+ await this.openNewgitops();
1178
+ }
1179
+ /* Helps to create a gitops ci*/ async createGitopsCI(ciName, gitData) {
1180
+ await this.page.locator('input[name="name"]').fill(ciName);
1181
+ await this.page.locator('input[name="username"]').fill(gitData[0]);
1182
+ await this.page.locator('input[name="password"]').fill(gitData[1]);
1183
+ await this.page.locator('input[name="url"]').fill(gitData[2]);
1184
+ await this.page.getByRole('button', {
1185
+ name: /^Save and close$/i
1186
+ }).click();
1187
+ await this.handleSaveToastOrAlreadyExists();
1188
+ }
1189
+ }
1190
+
1191
+
1192
+
1145
1193
 
1146
1194
  class $b2f725a937c99e2d$export$b8a443164510a1b4 extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
1147
1195
  async openTab(tabLabel, paneId) {
@@ -2536,6 +2584,39 @@ class $7735c50a40aa728e$export$ecd8b3e50e92d781 extends (0, $84f8d1abd29d48fd$ex
2536
2584
  }
2537
2585
 
2538
2586
 
2587
+
2588
+ class $51cef27488199b02$export$170f2cb42585788e extends (0, $84f8d1abd29d48fd$export$cb21416f3c2fd176) {
2589
+ /* Navigates to the Configuration Edit Permissions page via the tree context menu */ async navigateToPage() {
2590
+ await this.openRootContextMenu('Configuration');
2591
+ await this.page.getByRole('link', {
2592
+ name: 'Edit Permissions'
2593
+ }).click();
2594
+ }
2595
+ async navigateToConfigurationEditPermissionsPage() {
2596
+ await this.navigateToPage();
2597
+ }
2598
+ /* Gives the permissions to a role */ async givePermissionsToRole(roleName) {
2599
+ const filter = this.page.getByPlaceholder('Filter by roles').first();
2600
+ await filter.waitFor({
2601
+ state: 'visible'
2602
+ });
2603
+ await filter.scrollIntoViewIfNeeded();
2604
+ await filter.fill(roleName);
2605
+ const roleRow = this.page.locator('table.table-striped tbody tr').first();
2606
+ const checkboxes = roleRow.locator('input[type="checkbox"]');
2607
+ const count = await checkboxes.count();
2608
+ for(let i = 0; i < count; i += 1){
2609
+ const checkbox = checkboxes.nth(i);
2610
+ if (!await checkbox.isChecked()) await checkbox.check();
2611
+ }
2612
+ await this.page.getByRole('button', {
2613
+ name: 'Save and close'
2614
+ }).click();
2615
+ await this.handleSaveToastOrAlreadyExists();
2616
+ }
2617
+ }
2618
+
2619
+
2539
2620
  class $28788a34e6bbbe3d$export$b8a61e5c71402559 extends (0, $84f8d1abd29d48fd$export$cb21416f3c2fd176) {
2540
2621
  constructor(page){
2541
2622
  super(page);
@@ -2551,6 +2632,8 @@ class $28788a34e6bbbe3d$export$b8a61e5c71402559 extends (0, $84f8d1abd29d48fd$ex
2551
2632
  this.infrastructureEditPermissionsPage = new (0, $9204952bd68f68e5$export$e37b272c81a10693)(page);
2552
2633
  this.environmentEditPermissionsPage = new (0, $05857e702fc1e333$export$c919546f4bf88f35)(page);
2553
2634
  this.applicationEditPermissionsPage = new (0, $7735c50a40aa728e$export$ecd8b3e50e92d781)(page);
2635
+ this.configurationEditPermissionsPage = new (0, $51cef27488199b02$export$170f2cb42585788e)(page);
2636
+ this.gitopsConfigurationPage = new (0, $179e7dbfee839d39$export$95a11cbd2815051e)(page);
2554
2637
  }
2555
2638
  async navigateToHomePage() {
2556
2639
  await this.page.goto('/home');