@digital-ai/devops-page-object-deploy 0.0.2 → 0.0.3
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 +7 -0
- package/dist/main.js +343 -68
- package/dist/main.js.map +1 -1
- package/dist/module.js +344 -69
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +168 -18
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @digital-ai/devops-page-object-deploy
|
|
2
2
|
|
|
3
|
+
## 0.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 44ba67e: Created page files for add-new-ci-scenario test suite migration
|
|
8
|
+
- 2930770: Method created to handle multiple contextual menu clicks
|
|
9
|
+
|
|
3
10
|
## 0.0.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
var $1UEKj$playwrighttest = require("@playwright/test");
|
|
2
|
+
var $1UEKj$rambda = require("rambda");
|
|
2
3
|
|
|
3
4
|
function $parcel$export(e, n, v, s) {
|
|
4
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
@@ -10,9 +11,9 @@ class $b031bda8df4df200$export$6e2c8f0811a474ce {
|
|
|
10
11
|
this.sectionRoot = sectionRootLocator;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Get child element in the section "this.sectionRoot" refers to
|
|
15
|
+
* @param childElementLocator
|
|
16
|
+
*/ findElementInSection(childElementLocator) {
|
|
16
17
|
return this.sectionRoot.locator(childElementLocator);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -24,8 +25,8 @@ class $beb748f674227a72$export$cc4f63927c41742f extends (0, $b031bda8df4df200$ex
|
|
|
24
25
|
super(page.getByTestId("primaryNav"));
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
* Click on side navigation links
|
|
29
|
+
*/ async clickSideLink(sideLinkLocator) {
|
|
29
30
|
await this.sectionRoot.locator(sideLinkLocator).click();
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -47,59 +48,59 @@ class $7c2e5bae754cf9e5$export$110709f040143804 extends (0, $beb748f674227a72$ex
|
|
|
47
48
|
this.expandButtonLocator = page.locator("span[title='Expand']");
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
* Click on go back button on side naviation links
|
|
52
|
+
*/ async goBack() {
|
|
52
53
|
await this.backButtonLocator.waitFor();
|
|
53
54
|
await this.backButtonLocator.click();
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
* Click on Explorer from left panel
|
|
58
|
+
*/ async clickExplorer() {
|
|
58
59
|
await this.clickSideLink(this.linkExploreLocator);
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
* Click on Compare from left panel
|
|
63
|
+
*/ async clickCompare() {
|
|
63
64
|
await this.clickSideLink(this.linkCompareLocator);
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
* Click on Reports from left panel
|
|
68
|
+
*/ async clickReports() {
|
|
68
69
|
await this.clickSideLink(this.linkReportsLocator);
|
|
69
70
|
}
|
|
70
71
|
/**
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
* Click on Rules and Macros from left panel
|
|
73
|
+
*/ async clickRulesAndMacros() {
|
|
73
74
|
await this.clickSideLink(this.linkRulesAndMacrosLocator);
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
* Click on Gitops from left panel
|
|
78
|
+
*/ async clickGitOps() {
|
|
78
79
|
await this.clickSideLink(this.linkGitOps);
|
|
79
80
|
}
|
|
80
81
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
* Click on Local sources from left panel
|
|
83
|
+
*/ async clickLocalSources() {
|
|
83
84
|
await this.clickSideLink(this.linkLocalSource);
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
* Click on Plugins from left panel
|
|
88
|
+
*/ async clickPlugins() {
|
|
88
89
|
await this.clickSideLink(this.linkPlugins);
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
* Click on User Managements from left panel
|
|
93
|
+
*/ async clickUserManagement() {
|
|
93
94
|
await this.clickSideLink(this.linkUserManagement);
|
|
94
95
|
}
|
|
95
96
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
* Click on Collapse button from left panel
|
|
98
|
+
*/ async clickCollapse() {
|
|
98
99
|
await this.clickSideLink(this.collapseButtonLocator);
|
|
99
100
|
}
|
|
100
101
|
/**
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
* Click on Expand from left panel
|
|
103
|
+
*/ async clickExpand() {
|
|
103
104
|
await this.clickSideLink(this.expandButtonLocator);
|
|
104
105
|
}
|
|
105
106
|
}
|
|
@@ -125,38 +126,50 @@ class $9d59b5ce8284c3bf$export$7c6e2c02157bb7d2 extends (0, $b031bda8df4df200$ex
|
|
|
125
126
|
|
|
126
127
|
class $7149ac56b8ddfcf1$export$d9b273488cd8ce6f extends (0, $b031bda8df4df200$export$6e2c8f0811a474ce) {
|
|
127
128
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
*
|
|
130
|
+
* @param menuContentRootLocator menu content root locator
|
|
131
|
+
* @param menuLinkLocator Menu link locator thats used to open/close the menu
|
|
132
|
+
* @param menuItemsParentLocator Menu items that opens up when menu link is clicked
|
|
133
|
+
*/ constructor(menuContentRootLocator, menuLinkLocator, menuItemsParentLocator){
|
|
133
134
|
super(menuContentRootLocator);
|
|
134
135
|
this.menuLinkLocator = menuLinkLocator;
|
|
135
136
|
this.menuItemsParentLocator = menuContentRootLocator.locator(menuItemsParentLocator);
|
|
136
137
|
}
|
|
137
138
|
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
* Click on a menu item
|
|
140
|
+
* @param menuItemLocator
|
|
141
|
+
*/ async clickMenuItem(menuItemLocator) {
|
|
141
142
|
if (!await this.menuItemsParentLocator.locator(menuItemLocator).isVisible()) await this.menuLinkLocator.click();
|
|
142
143
|
return await this.menuItemsParentLocator.locator(menuItemLocator).click();
|
|
143
144
|
}
|
|
144
145
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
* Close a menu item
|
|
147
|
+
*/ async close() {
|
|
147
148
|
await this.menuLinkLocator.click();
|
|
148
149
|
}
|
|
149
150
|
/**
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
* Note : Support only one level of menu items not being open iow if the link to click
|
|
152
|
+
* @param mouseOverLocator
|
|
153
|
+
* @param menuItemLocator
|
|
154
|
+
*/ async hoverFlyoutAndClickMenuItem(mouseOverLocator, menuItemLocator) {
|
|
154
155
|
if (!await this.menuItemsParentLocator.locator(menuItemLocator).isVisible()) {
|
|
155
156
|
await mouseOverLocator.hover();
|
|
156
157
|
await this.menuLinkLocator.click();
|
|
157
158
|
}
|
|
158
159
|
await menuItemLocator.click();
|
|
159
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Open contextual menu dots of ci to work with contextual-menu items.
|
|
163
|
+
*/ async openContextualMenuDots() {
|
|
164
|
+
await this.menuLinkLocator.click();
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Find exact menu locators using menu parent locators.
|
|
168
|
+
* @param childElementLocator
|
|
169
|
+
* @returns
|
|
170
|
+
*/ async findElementInMenu(childElementLocator) {
|
|
171
|
+
return this.menuItemsParentLocator.locator(childElementLocator);
|
|
172
|
+
}
|
|
160
173
|
}
|
|
161
174
|
|
|
162
175
|
|
|
@@ -170,28 +183,28 @@ class $8a1acfec011ab8c3$export$5929c05a25eed48f extends (0, $7149ac56b8ddfcf1$ex
|
|
|
170
183
|
this.getDataForSupport = page.locator('a[title="Get data for support"]');
|
|
171
184
|
}
|
|
172
185
|
/**
|
|
173
|
-
|
|
174
|
-
|
|
186
|
+
* Click on online Documentation menu option
|
|
187
|
+
*/ async clickOnlineDocumentation() {
|
|
175
188
|
await this.clickMenuItem(this.onlineDoc);
|
|
176
189
|
}
|
|
177
190
|
/**
|
|
178
|
-
|
|
179
|
-
|
|
191
|
+
* Click on menu option
|
|
192
|
+
*/ async clickSupportRequest() {
|
|
180
193
|
await this.clickMenuItem(this.supportRequest);
|
|
181
194
|
}
|
|
182
195
|
/**
|
|
183
|
-
|
|
184
|
-
|
|
196
|
+
* Click on Digital.ai website menu option
|
|
197
|
+
*/ async clickOfficialWebsite() {
|
|
185
198
|
await this.clickMenuItem(this.website);
|
|
186
199
|
}
|
|
187
200
|
/**
|
|
188
|
-
|
|
189
|
-
|
|
201
|
+
* Click on usage matrix menu option
|
|
202
|
+
*/ async clickUsageMatrix() {
|
|
190
203
|
await this.clickMenuItem(this.usageMatrix);
|
|
191
204
|
}
|
|
192
205
|
/**
|
|
193
|
-
|
|
194
|
-
|
|
206
|
+
* Click on Get data for support menu option
|
|
207
|
+
*/ async clickGetDataForSupport() {
|
|
195
208
|
await this.clickMenuItem(this.getDataForSupport);
|
|
196
209
|
}
|
|
197
210
|
}
|
|
@@ -224,33 +237,33 @@ class $70698a74230ac35b$export$1d7840d5cdc861d5 extends (0, $7149ac56b8ddfcf1$ex
|
|
|
224
237
|
this.systemInformation = page.getByTitle("System information");
|
|
225
238
|
}
|
|
226
239
|
/**
|
|
227
|
-
|
|
228
|
-
|
|
240
|
+
* Click on settings menu option
|
|
241
|
+
*/ async clickSettings() {
|
|
229
242
|
await this.clickMenuItem(this.settings);
|
|
230
243
|
}
|
|
231
244
|
/**
|
|
232
|
-
|
|
233
|
-
|
|
245
|
+
* Click on renew license menu option
|
|
246
|
+
*/ async clickRenewLicense() {
|
|
234
247
|
await this.clickMenuItem(this.renewLicense);
|
|
235
248
|
}
|
|
236
249
|
/**
|
|
237
|
-
|
|
238
|
-
|
|
250
|
+
* Click on view as menu option
|
|
251
|
+
*/ async clickViewAs() {
|
|
239
252
|
await this.clickMenuItem(this.viewAs);
|
|
240
253
|
}
|
|
241
254
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
255
|
+
* Click on maintenance mode menu option
|
|
256
|
+
*/ async clickMaintenanceMode() {
|
|
244
257
|
await this.clickMenuItem(this.maintenanceMode);
|
|
245
258
|
}
|
|
246
259
|
/**
|
|
247
|
-
|
|
248
|
-
|
|
260
|
+
* Click on About menu option
|
|
261
|
+
*/ async clickAbout() {
|
|
249
262
|
await this.clickMenuItem(this.about);
|
|
250
263
|
}
|
|
251
264
|
/**
|
|
252
|
-
|
|
253
|
-
|
|
265
|
+
* Click on System information menu option
|
|
266
|
+
*/ async clickSystemInfo() {
|
|
254
267
|
await this.clickMenuItem(this.systemInformation);
|
|
255
268
|
}
|
|
256
269
|
}
|
|
@@ -320,14 +333,266 @@ class $7dcee016eeec0e08$export$f14c0e3f98d164c0 extends (0, $ae23b16684112d0b$ex
|
|
|
320
333
|
|
|
321
334
|
class $b375bc430f279b15$export$b477143f7ffae077 extends (0, $7149ac56b8ddfcf1$export$d9b273488cd8ce6f) {
|
|
322
335
|
constructor(page){
|
|
323
|
-
super(page.locator("#context-menu-popover"), page.locator(
|
|
324
|
-
this.
|
|
336
|
+
super(page.locator("#context-menu-popover"), page.locator("i[data-id=Applications].context-menu-button"), page.locator(".dropdown-menu.multi-level.dropdown-menu-0"));
|
|
337
|
+
this.page = page;
|
|
325
338
|
this.newlinkLocator = page.getByRole("link", {
|
|
326
|
-
name: "New"
|
|
339
|
+
name: "New",
|
|
340
|
+
exact: true
|
|
327
341
|
});
|
|
342
|
+
this.importlinkLocator = page.getByRole("link", {
|
|
343
|
+
name: "Import",
|
|
344
|
+
exact: true
|
|
345
|
+
});
|
|
346
|
+
this.applicationLocator = page.locator('div[data-id="Applications"]');
|
|
347
|
+
this.deleteLinkLocator = page.getByRole("link", {
|
|
348
|
+
name: "Delete",
|
|
349
|
+
exact: true
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Click on application CI in contextual-menu option.
|
|
354
|
+
*/ async clickApplicationCi() {
|
|
355
|
+
await this.applicationLocator.click();
|
|
356
|
+
await this.openContextualMenuDots();
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Click on menu items from contextual-menu option using path navigation option
|
|
360
|
+
* @param path: Provide menu navigation path using array
|
|
361
|
+
* eg: ['new','Application'] -> to click on menu to create new application
|
|
362
|
+
*/ async clickMenuPath(path) {
|
|
363
|
+
const count = path.length - 1;
|
|
364
|
+
for(let i = 0; i < count; i++)await this.page.getByRole("link", {
|
|
365
|
+
name: "" + path[i] + ""
|
|
366
|
+
}).click();
|
|
367
|
+
await this.page.locator('.popover-content li[data-path="' + path.join("->") + '"]').click();
|
|
328
368
|
}
|
|
329
|
-
|
|
330
|
-
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
class $50f6953b9762c03c$export$a7fed597f4b8afd8 extends (0, $b031bda8df4df200$export$6e2c8f0811a474ce) {
|
|
375
|
+
constructor(mainContentRootLocator){
|
|
376
|
+
super(mainContentRootLocator);
|
|
377
|
+
}
|
|
378
|
+
async fillTextInput(textInput, textValue) {
|
|
379
|
+
await textInput.clear();
|
|
380
|
+
await textInput.fill(textValue);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
class $b90c33a29683027b$export$60413e28724d3abd extends (0, $50f6953b9762c03c$export$a7fed597f4b8afd8) {
|
|
386
|
+
constructor(page){
|
|
387
|
+
super(page.locator(".dip-view-body"));
|
|
388
|
+
this.page = page;
|
|
389
|
+
this.inputName = page.locator('input[name="name"]');
|
|
390
|
+
this.inputLatestVersion = page.locator('input[name="lastVersion"]');
|
|
391
|
+
this.saveButton = page.getByRole("button", {
|
|
392
|
+
name: "Save",
|
|
393
|
+
exact: true
|
|
394
|
+
});
|
|
395
|
+
this.saveAndCloseButton = page.getByRole("button", {
|
|
396
|
+
name: "Save and close",
|
|
397
|
+
exact: true
|
|
398
|
+
});
|
|
399
|
+
this.cancelButton = page.getByRole("button", {
|
|
400
|
+
name: "Cancel",
|
|
401
|
+
exact: true
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Enter name in name field of the application form
|
|
406
|
+
* @param name
|
|
407
|
+
* @returns
|
|
408
|
+
*/ async enterName(name) {
|
|
409
|
+
return await this.findElementInSection(this.inputName).fill(name);
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Enter latest version field
|
|
413
|
+
* @param version
|
|
414
|
+
* @returns
|
|
415
|
+
*/ async enterLatestVersion(version) {
|
|
416
|
+
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Click save button
|
|
420
|
+
* @returns
|
|
421
|
+
*/ async clickSave() {
|
|
422
|
+
return await this.findElementInSection(this.saveButton).click();
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Click save and close button
|
|
426
|
+
* @returns
|
|
427
|
+
*/ async clickSaveAndClose() {
|
|
428
|
+
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Click cancel button
|
|
432
|
+
* @returns
|
|
433
|
+
*/ async clickCancel() {
|
|
434
|
+
return await this.findElementInSection(this.cancelButton).click();
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Expecting save button is disabled
|
|
438
|
+
* @returns
|
|
439
|
+
*/ async assertSaveButtonIsDisabled() {
|
|
440
|
+
return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Expecting Save and close button is disabled
|
|
444
|
+
* @returns
|
|
445
|
+
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
446
|
+
return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
class $dcea22adf7bc9211$export$7db63d2c950874b5 {
|
|
453
|
+
constructor(page1, page){
|
|
454
|
+
this.applicationPage = page1;
|
|
455
|
+
this.page = page;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Create New directory under applications CI.
|
|
459
|
+
* @param appDirectoryName
|
|
460
|
+
* @param expectedCiType
|
|
461
|
+
*/ async createNewApplicationDirectory(appDirectoryName, expectedCiType) {
|
|
462
|
+
await this.applicationPage.appMenu.clickApplicationCi();
|
|
463
|
+
await this.applicationPage.appMenu.clickMenuPath([
|
|
464
|
+
"new",
|
|
465
|
+
"directory"
|
|
466
|
+
]);
|
|
467
|
+
await this.applicationPage.appForm.assertSaveButtonIsDisabled();
|
|
468
|
+
await this.applicationPage.appForm.assertSaveAndCloseButtonIsDisabled();
|
|
469
|
+
await this.applicationPage.appForm.enterName(appDirectoryName);
|
|
470
|
+
await this.applicationPage.tab.assertActiveTabSelector(expectedCiType);
|
|
471
|
+
await this.applicationPage.appForm.clickSaveAndClose();
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Create new application under Application ci
|
|
475
|
+
* @param appName
|
|
476
|
+
* @param expectedCiType
|
|
477
|
+
*/ async createNewApplication(appName, expectedCiType) {
|
|
478
|
+
await this.applicationPage.appMenu.clickApplicationCi();
|
|
479
|
+
await this.applicationPage.appMenu.clickMenuPath([
|
|
480
|
+
"new",
|
|
481
|
+
"application"
|
|
482
|
+
]);
|
|
483
|
+
await this.applicationPage.appForm.assertSaveButtonIsDisabled();
|
|
484
|
+
await this.applicationPage.appForm.assertSaveAndCloseButtonIsDisabled();
|
|
485
|
+
await this.applicationPage.appForm.enterName(appName);
|
|
486
|
+
await this.applicationPage.appForm.clickSaveAndClose();
|
|
487
|
+
await this.applicationPage.tab.assertActiveTabSelector(expectedCiType);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* TODO: It is half done just to check on menu path other than new. Need to create as per scenario.
|
|
491
|
+
*/ async createFromFileImport() {
|
|
492
|
+
await this.applicationPage.appMenu.clickApplicationCi();
|
|
493
|
+
await this.applicationPage.appMenu.clickMenuPath([
|
|
494
|
+
"import",
|
|
495
|
+
"fromComputer"
|
|
496
|
+
]);
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Create new ci (application, package) under applications by providing following parameters.
|
|
500
|
+
* @param parentNodeId
|
|
501
|
+
* @param menuPath
|
|
502
|
+
* @param expectedCiType
|
|
503
|
+
* @param appName
|
|
504
|
+
*/ async createNewCi(parentNodeId, menuPath, appName) {
|
|
505
|
+
await this.expandNodePath(parentNodeId);
|
|
506
|
+
await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
|
|
507
|
+
await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
|
|
508
|
+
await this.applicationPage.appMenu.clickMenuPath(menuPath);
|
|
509
|
+
await this.applicationPage.appForm.assertSaveButtonIsDisabled();
|
|
510
|
+
await this.applicationPage.appForm.assertSaveAndCloseButtonIsDisabled();
|
|
511
|
+
await this.applicationPage.tab.assertActiveTabSelector("Create udm." + menuPath[1] + "");
|
|
512
|
+
await this.applicationPage.appForm.enterName(appName);
|
|
513
|
+
await this.applicationPage.appForm.clickSaveAndClose();
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Expand the ci path tree toggler.
|
|
517
|
+
* @param pathnode
|
|
518
|
+
*/ async expandNode(pathnode) {
|
|
519
|
+
if (await this.page.locator('div[data-id="' + pathnode + '"] a.infinite-tree-toggler.infinite-tree-closed').isVisible()) await this.page.locator('div[data-id="' + pathnode + '"] a').click();
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* expands the path of CI by separating path from "/"
|
|
523
|
+
* @param parentNodeId
|
|
524
|
+
*/ async expandNodePath(parentNodeId) {
|
|
525
|
+
const nodeIdParts = $1UEKj$rambda.split("/", parentNodeId);
|
|
526
|
+
for(let ind = 0; ind < nodeIdParts.length; ind += 1){
|
|
527
|
+
const path = $1UEKj$rambda.join("/", $1UEKj$rambda.take(ind + 1, nodeIdParts));
|
|
528
|
+
this.expandNode(path);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Collapse the tree toggler of ci path.
|
|
533
|
+
* @param parentNodeId
|
|
534
|
+
*/ async collapseNode(parentNodeId) {
|
|
535
|
+
if (await this.page.locator('div[data-id="' + parentNodeId + '"] a.infinite-tree-toggler.infinite-tree-closed').isHidden()) await this.page.locator('div[data-id="' + parentNodeId + '"] a').click();
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Delete the ci
|
|
539
|
+
* @param node
|
|
540
|
+
*/ async deleteCi(node) {
|
|
541
|
+
await this.page.locator('div[data-id="' + node + '"]').click();
|
|
542
|
+
await this.page.locator('i[data-id="' + node + '"].context-menu-button').click();
|
|
543
|
+
await this.applicationPage.appMenu.clickMenuPath([
|
|
544
|
+
"delete"
|
|
545
|
+
]);
|
|
546
|
+
await this.applicationPage.appModal.clickDelete();
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
class $0a8f56f4ec9e6ec3$export$3e41faf802a29e71 extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
|
|
554
|
+
constructor(page){
|
|
555
|
+
super(page);
|
|
556
|
+
this.page = page;
|
|
557
|
+
this.parentTabLocator = this.page.locator(".working-panel-section .xl-react-tab-system");
|
|
558
|
+
this.getTabTitleLocator = this.page.locator("li.active .tab-title");
|
|
559
|
+
}
|
|
560
|
+
async assertActiveTabSelector(expectedCiType) {
|
|
561
|
+
return await (0, $1UEKj$playwrighttest.expect)(this.parentTabLocator.locator("li.active .tab-title")).toHaveText(expectedCiType, {
|
|
562
|
+
ignoreCase: true
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
class $749097e2d65c1527$export$2b77a92f1a5ad772 extends (0, $b031bda8df4df200$export$6e2c8f0811a474ce) {
|
|
570
|
+
constructor(page){
|
|
571
|
+
super(page.locator(".xl-react-modal-content"));
|
|
572
|
+
this.header = page.locator(".modal-header");
|
|
573
|
+
this.body = page.locator(".modal-body");
|
|
574
|
+
this.footer = page.locator(".modal-footer");
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
class $682389a378a7eeac$export$51360b6aa3a7b134 extends (0, $749097e2d65c1527$export$2b77a92f1a5ad772) {
|
|
580
|
+
constructor(page){
|
|
581
|
+
super(page);
|
|
582
|
+
this.deleteButton = page.getByRole("button", {
|
|
583
|
+
name: "Delete",
|
|
584
|
+
exact: true
|
|
585
|
+
});
|
|
586
|
+
this.cancelButton = page.getByRole("button", {
|
|
587
|
+
name: "Cancel",
|
|
588
|
+
exact: true
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
async clickDelete() {
|
|
592
|
+
await this.footer.locator(this.deleteButton).click();
|
|
593
|
+
}
|
|
594
|
+
async clickCancel() {
|
|
595
|
+
await this.footer.locator(this.cancelButton).click();
|
|
331
596
|
}
|
|
332
597
|
}
|
|
333
598
|
|
|
@@ -336,6 +601,10 @@ class $1fae0b7de3d21f52$export$bf4a5dd3be690f6b extends (0, $ae23b16684112d0b$ex
|
|
|
336
601
|
constructor(page){
|
|
337
602
|
super(page);
|
|
338
603
|
this.appMenu = new (0, $b375bc430f279b15$export$b477143f7ffae077)(page);
|
|
604
|
+
this.appForm = new (0, $b90c33a29683027b$export$60413e28724d3abd)(page);
|
|
605
|
+
this.tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
|
|
606
|
+
this.util = new (0, $dcea22adf7bc9211$export$7db63d2c950874b5)(this, page);
|
|
607
|
+
this.appModal = new (0, $682389a378a7eeac$export$51360b6aa3a7b134)(page);
|
|
339
608
|
}
|
|
340
609
|
}
|
|
341
610
|
|
|
@@ -349,6 +618,7 @@ class $114862ed97d76403$export$36d69433c4f81145 extends (0, $ae23b16684112d0b$ex
|
|
|
349
618
|
}
|
|
350
619
|
|
|
351
620
|
|
|
621
|
+
|
|
352
622
|
const $3352700e95ddc19e$export$e0969da9b8fb378d = (0, $1UEKj$playwrighttest.test).extend({
|
|
353
623
|
loginPage: async ({ page: page }, use)=>{
|
|
354
624
|
// Set up the fixture.
|
|
@@ -365,6 +635,11 @@ const $3352700e95ddc19e$export$e0969da9b8fb378d = (0, $1UEKj$playwrighttest.test
|
|
|
365
635
|
const applicationPage = new (0, $1fae0b7de3d21f52$export$bf4a5dd3be690f6b)(page);
|
|
366
636
|
await use(applicationPage);
|
|
367
637
|
return applicationPage;
|
|
638
|
+
},
|
|
639
|
+
tab: async ({ page: page }, use)=>{
|
|
640
|
+
const tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
|
|
641
|
+
await use(tab);
|
|
642
|
+
return tab;
|
|
368
643
|
}
|
|
369
644
|
});
|
|
370
645
|
|