@digital-ai/devops-page-object-deploy 0.0.6 → 0.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 +334 -1170
- package/dist/main.js.map +1 -1
- package/dist/module.js +334 -1170
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +56 -740
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -1,1265 +1,429 @@
|
|
|
1
1
|
import {test as $lE6ZQ$test, expect as $lE6ZQ$expect} from "@playwright/test";
|
|
2
|
-
import {split as $lE6ZQ$split, join as $lE6ZQ$join, take as $lE6ZQ$take} from "rambda";
|
|
3
|
-
|
|
4
|
-
class $b464119f5ec5aad0$export$6e2c8f0811a474ce {
|
|
5
|
-
constructor(parentLocator, sectionRootLocator){
|
|
6
|
-
this.parentLocator = parentLocator;
|
|
7
|
-
this.sectionRoot = this.parentLocator.locator(sectionRootLocator);
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Get child element in the section "this.sectionRoot" refers to
|
|
11
|
-
* @param childElementLocator
|
|
12
|
-
*/ findElementInSection(childElementLocator) {
|
|
13
|
-
return this.sectionRoot.locator(childElementLocator);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class $66de4f08dadae772$export$cc4f63927c41742f extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
20
|
-
constructor(parentLocator, page){
|
|
21
|
-
super(parentLocator, page.getByTestId("primaryNav"));
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Click on side navigation links
|
|
25
|
-
*/ async clickSideLink(sideLinkLocator) {
|
|
26
|
-
await this.sectionRoot.locator(sideLinkLocator).click();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class $26d8c96bf2341a59$export$110709f040143804 extends (0, $66de4f08dadae772$export$cc4f63927c41742f) {
|
|
32
|
-
static sectionRootLocator = ".Pane vertical Pane1";
|
|
33
|
-
constructor(parentLocator, page){
|
|
34
|
-
super(parentLocator, page);
|
|
35
|
-
this.backButtonLocator = page.getByTestId("back-button");
|
|
36
|
-
this.linkExploreLocator = page.locator("p:has-text('Explorer')");
|
|
37
|
-
this.linkCompareLocator = page.locator("p:has-text('Compare')");
|
|
38
|
-
this.linkReportsLocator = page.locator("p:has-text('Reports')");
|
|
39
|
-
this.linkRulesAndMacrosLocator = page.locator("p:has-text('Rules and Macros')");
|
|
40
|
-
this.linkGitOps = page.locator("p:has-text('GitOps')");
|
|
41
|
-
this.linkLocalSource = page.locator("p:has-text('Local sources')");
|
|
42
|
-
this.linkPlugins = page.locator("p:has-text('Plugins')");
|
|
43
|
-
this.linkUserManagement = page.locator("p:has-text('User management')");
|
|
44
|
-
this.collapseButtonLocator = page.locator("span[title='Collapse']");
|
|
45
|
-
this.expandButtonLocator = page.locator("span[title='Expand']");
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Click on go back button on side naviation links
|
|
49
|
-
*/ async goBack() {
|
|
50
|
-
await this.backButtonLocator.waitFor();
|
|
51
|
-
await this.backButtonLocator.click();
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Click on Explorer from left panel
|
|
55
|
-
*/ async clickExplorer() {
|
|
56
|
-
await this.clickSideLink(this.linkExploreLocator);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Click on Compare from left panel
|
|
60
|
-
*/ async clickCompare() {
|
|
61
|
-
await this.clickSideLink(this.linkCompareLocator);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Click on Reports from left panel
|
|
65
|
-
*/ async clickReports() {
|
|
66
|
-
await this.clickSideLink(this.linkReportsLocator);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Click on Rules and Macros from left panel
|
|
70
|
-
*/ async clickRulesAndMacros() {
|
|
71
|
-
await this.clickSideLink(this.linkRulesAndMacrosLocator);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Click on Gitops from left panel
|
|
75
|
-
*/ async clickGitOps() {
|
|
76
|
-
await this.clickSideLink(this.linkGitOps);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Click on Local sources from left panel
|
|
80
|
-
*/ async clickLocalSources() {
|
|
81
|
-
await this.clickSideLink(this.linkLocalSource);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Click on Plugins from left panel
|
|
85
|
-
*/ async clickPlugins() {
|
|
86
|
-
await this.clickSideLink(this.linkPlugins);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Click on User Managements from left panel
|
|
90
|
-
*/ async clickUserManagement() {
|
|
91
|
-
await this.clickSideLink(this.linkUserManagement);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Click on Collapse button from left panel
|
|
95
|
-
*/ async clickCollapse() {
|
|
96
|
-
await this.clickSideLink(this.collapseButtonLocator);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Click on Expand from left panel
|
|
100
|
-
*/ async clickExpand() {
|
|
101
|
-
await this.clickSideLink(this.expandButtonLocator);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
class $7f808a48ced6cace$export$3b4e64e77073e307 extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
108
|
-
constructor(parentLocator, page){
|
|
109
|
-
super(parentLocator, page.locator(".banner-container"));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
class $5dbb03b38de032e2$export$7c6e2c02157bb7d2 extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
115
|
-
static sectionRoot = ".app-root";
|
|
116
|
-
constructor(parentLocator, page){
|
|
117
|
-
super(parentLocator, page.locator($5dbb03b38de032e2$export$7c6e2c02157bb7d2.sectionRoot));
|
|
118
|
-
this.banner = new (0, $7f808a48ced6cace$export$3b4e64e77073e307)(page.locator($5dbb03b38de032e2$export$7c6e2c02157bb7d2.sectionRoot), page);
|
|
119
|
-
this.leftPanel = new (0, $26d8c96bf2341a59$export$110709f040143804)(page.locator($5dbb03b38de032e2$export$7c6e2c02157bb7d2.sectionRoot), page);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
class $54bcd1bcf08dd053$export$d9b273488cd8ce6f extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
126
|
-
/**
|
|
127
|
-
*
|
|
128
|
-
* @param menuContentRootLocator menu content root locator
|
|
129
|
-
* @param menuLinkLocator Menu link locator thats used to open/close the menu
|
|
130
|
-
* @param menuItemsParentLocator Menu items that opens up when menu link is clicked
|
|
131
|
-
*/ constructor(menuContentRootLocator, menuLinkLocator, menuItemsParentLocator){
|
|
132
|
-
super($54bcd1bcf08dd053$export$d9b273488cd8ce6f.parentLocator, menuContentRootLocator);
|
|
133
|
-
this.menuLinkLocator = menuLinkLocator;
|
|
134
|
-
this.menuItemsParentLocator = menuContentRootLocator.locator(menuItemsParentLocator);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Click on a menu item
|
|
138
|
-
* @param menuItemLocator
|
|
139
|
-
*/ async clickMenuItem(menuItemLocator) {
|
|
140
|
-
if (!await this.menuItemsParentLocator.locator(menuItemLocator).isVisible()) await this.menuLinkLocator.click();
|
|
141
|
-
return await this.menuItemsParentLocator.locator(menuItemLocator).click();
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Close a menu item
|
|
145
|
-
*/ async close() {
|
|
146
|
-
await this.menuLinkLocator.click();
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Note : Support only one level of menu items not being open iow if the link to click
|
|
150
|
-
* @param mouseOverLocator
|
|
151
|
-
* @param menuItemLocator
|
|
152
|
-
*/ async hoverFlyoutAndClickMenuItem(mouseOverLocator, menuItemLocator) {
|
|
153
|
-
if (!await this.menuItemsParentLocator.locator(menuItemLocator).isVisible()) {
|
|
154
|
-
await mouseOverLocator.hover();
|
|
155
|
-
await this.menuLinkLocator.click();
|
|
156
|
-
}
|
|
157
|
-
await menuItemLocator.click();
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Open contextual menu dots of ci to work with contextual-menu items.
|
|
161
|
-
*/ async openContextualMenuDots() {
|
|
162
|
-
await this.menuLinkLocator.click();
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Find exact menu locators using menu parent locators.
|
|
166
|
-
* @param childElementLocator
|
|
167
|
-
* @returns
|
|
168
|
-
*/ async findElementInMenu(childElementLocator) {
|
|
169
|
-
return this.menuItemsParentLocator.locator(childElementLocator);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
class $b4bd429df4806013$export$5929c05a25eed48f extends (0, $54bcd1bcf08dd053$export$d9b273488cd8ce6f) {
|
|
175
|
-
constructor(page){
|
|
176
|
-
super(page.locator("#context-menu-popover"), page.locator(".icon-help.dot-i"), page.locator(".dropdown-menu.multi-level.dropdown-menu-0"));
|
|
177
|
-
this.onlineDoc = page.locator('a[title="Online documentation"]');
|
|
178
|
-
this.supportRequest = page.locator('a[title="Submit a support request"]');
|
|
179
|
-
this.website = page.locator('a[title="Digital.ai website"]');
|
|
180
|
-
this.usageMatrix = page.locator('a[title="Usage Metrics"]');
|
|
181
|
-
this.getDataForSupport = page.locator('a[title="Get data for support"]');
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Click on online Documentation menu option
|
|
185
|
-
*/ async clickOnlineDocumentation() {
|
|
186
|
-
await this.clickMenuItem(this.onlineDoc);
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Click on menu option
|
|
190
|
-
*/ async clickSupportRequest() {
|
|
191
|
-
await this.clickMenuItem(this.supportRequest);
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Click on Digital.ai website menu option
|
|
195
|
-
*/ async clickOfficialWebsite() {
|
|
196
|
-
await this.clickMenuItem(this.website);
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Click on usage matrix menu option
|
|
200
|
-
*/ async clickUsageMatrix() {
|
|
201
|
-
await this.clickMenuItem(this.usageMatrix);
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Click on Get data for support menu option
|
|
205
|
-
*/ async clickGetDataForSupport() {
|
|
206
|
-
await this.clickMenuItem(this.getDataForSupport);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
class $60e85cd955b64c3b$export$ca8bffe144e51c8 extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
214
|
-
static sectionRootLocator = ".dot-branding";
|
|
215
|
-
constructor(parentLocator, page){
|
|
216
|
-
super(parentLocator, page.locator($60e85cd955b64c3b$export$ca8bffe144e51c8.sectionRootLocator));
|
|
217
|
-
this.logo = this.findElementInSection(page.getByTestId("primary-logo"));
|
|
218
|
-
}
|
|
219
|
-
async clickLogo() {
|
|
220
|
-
await this.logo.click();
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
class $e05e449fbf3516f1$export$1d7840d5cdc861d5 extends (0, $54bcd1bcf08dd053$export$d9b273488cd8ce6f) {
|
|
227
|
-
constructor(page){
|
|
228
|
-
super(page.locator("#context-menu-popover"), page.locator(".icon-settings.dot-i"), page.locator('ul[class="dropdown-menu multi-level dropdown-menu-0"]'));
|
|
229
|
-
this.settings = page.getByRole("link", {
|
|
230
|
-
name: "Settings"
|
|
231
|
-
});
|
|
232
|
-
this.renewLicense = page.getByTitle("Renew license");
|
|
233
|
-
this.viewAs = page.getByTitle("View as");
|
|
234
|
-
this.maintenanceMode = page.getByTitle("");
|
|
235
|
-
this.about = page.getByTitle("About");
|
|
236
|
-
this.systemInformation = page.getByTitle("System information");
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Click on settings menu option
|
|
240
|
-
*/ async clickSettings() {
|
|
241
|
-
await this.clickMenuItem(this.settings);
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Click on renew license menu option
|
|
245
|
-
*/ async clickRenewLicense() {
|
|
246
|
-
await this.clickMenuItem(this.renewLicense);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Click on view as menu option
|
|
250
|
-
*/ async clickViewAs() {
|
|
251
|
-
await this.clickMenuItem(this.viewAs);
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Click on maintenance mode menu option
|
|
255
|
-
*/ async clickMaintenanceMode() {
|
|
256
|
-
await this.clickMenuItem(this.maintenanceMode);
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Click on About menu option
|
|
260
|
-
*/ async clickAbout() {
|
|
261
|
-
await this.clickMenuItem(this.about);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Click on System information menu option
|
|
265
|
-
*/ async clickSystemInfo() {
|
|
266
|
-
await this.clickMenuItem(this.systemInformation);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
class $e477fae343f80541$export$f7f58290278dd286 extends (0, $54bcd1bcf08dd053$export$d9b273488cd8ce6f) {
|
|
274
|
-
constructor(page){
|
|
275
|
-
super(page.locator("#context-menu-popover"), page.getByTitle(".dot-avatar"), page.locator(".dropdown-menu.multi-level.dropdown-menu-0"));
|
|
276
|
-
this.page = page;
|
|
277
|
-
this.userProfileLocator = page.getByRole("link", {
|
|
278
|
-
name: "User profile"
|
|
279
|
-
});
|
|
280
|
-
this.logoutLocator = page.getByRole("link", {
|
|
281
|
-
name: "Log out"
|
|
282
|
-
});
|
|
283
|
-
this.avatarTooltip = page.locator(".avatar-wrapper>.dot-tooltip");
|
|
284
|
-
}
|
|
285
|
-
async clickUserProfile() {
|
|
286
|
-
await this.clickMenuItem(this.userProfileLocator);
|
|
287
|
-
}
|
|
288
|
-
async logout() {
|
|
289
|
-
await this.clickMenuItem(this.logoutLocator);
|
|
290
|
-
}
|
|
291
|
-
async validateAvatarName(expectedName) {
|
|
292
|
-
(0, $lE6ZQ$expect)(await this.avatarTooltip.getAttribute("title")).toContain(expectedName);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
2
|
|
|
296
3
|
|
|
297
|
-
class $7bc68dfa9f2318a7$export$8b251419efc915eb extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
298
|
-
static sectionRootLocator = ".main-header-wrapper.logged-in";
|
|
299
|
-
constructor(parentLocator, page){
|
|
300
|
-
super(parentLocator, page.locator($7bc68dfa9f2318a7$export$8b251419efc915eb.sectionRootLocator));
|
|
301
|
-
this.page = page;
|
|
302
|
-
this.brandLogo = new (0, $60e85cd955b64c3b$export$ca8bffe144e51c8)(page.locator(".main-header-wrapper.logged-in"), page);
|
|
303
|
-
this.helperMenu = new (0, $b4bd429df4806013$export$5929c05a25eed48f)(page);
|
|
304
|
-
this.settingsMenu = new (0, $e05e449fbf3516f1$export$1d7840d5cdc861d5)(page);
|
|
305
|
-
this.avatarMenu = new (0, $e477fae343f80541$export$f7f58290278dd286)(page);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
4
|
|
|
310
5
|
class $7d546dcaafadc158$export$2b65d1d97338f32b {
|
|
311
6
|
constructor(page){
|
|
312
|
-
this.header = new (0, $7bc68dfa9f2318a7$export$8b251419efc915eb)(page.locator(".ci-explorer"), page);
|
|
313
|
-
this.content = new (0, $5dbb03b38de032e2$export$7c6e2c02157bb7d2)(page.locator(".ci-explorer"), page);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
class $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8 extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
320
|
-
constructor(parentLocator, mainContentRootLocator){
|
|
321
|
-
super(parentLocator, mainContentRootLocator);
|
|
322
|
-
}
|
|
323
|
-
async fillTextInput(textInput, textValue) {
|
|
324
|
-
await textInput.clear();
|
|
325
|
-
await textInput.fill(textValue);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
class $bc332e5dcec2d43b$export$56c2ba9e13461f38 extends (0, $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8) {
|
|
331
|
-
static mainContentRootLocator = ".login-component";
|
|
332
|
-
constructor(parentLocator, page){
|
|
333
|
-
super(parentLocator, page.locator($bc332e5dcec2d43b$export$56c2ba9e13461f38.mainContentRootLocator));
|
|
334
|
-
this.page = page;
|
|
335
|
-
this.username = this.findElementInSection(page.getByPlaceholder("User"));
|
|
336
|
-
this.password = this.findElementInSection(page.getByPlaceholder("Password"));
|
|
337
|
-
this.loginButton = this.findElementInSection(page.getByRole("button", {
|
|
338
|
-
name: "Log in"
|
|
339
|
-
}));
|
|
340
|
-
this.rememberMeCheckbox = this.findElementInSection(page.locator("#rememberMeCheckbox"));
|
|
341
|
-
}
|
|
342
|
-
async enterUserName(username) {
|
|
343
|
-
await this.fillTextInput(this.username, username);
|
|
344
|
-
}
|
|
345
|
-
async enterPassword(password) {
|
|
346
|
-
await this.fillTextInput(this.password, password);
|
|
347
|
-
}
|
|
348
|
-
async clickLogin() {
|
|
349
|
-
await this.loginButton.click();
|
|
350
|
-
}
|
|
351
|
-
async clickRememberMe() {
|
|
352
|
-
await this.rememberMeCheckbox.click();
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
class $c2c31ea6199a3576$export$f14c0e3f98d164c0 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
358
|
-
constructor(page){
|
|
359
|
-
super(page);
|
|
360
7
|
this.page = page;
|
|
361
|
-
this.loginForm = new (0, $bc332e5dcec2d43b$export$56c2ba9e13461f38)(page.locator(".login-layout"), page);
|
|
362
|
-
}
|
|
363
|
-
async login(user, pwd) {
|
|
364
|
-
await this.page.goto("/#/login");
|
|
365
|
-
await this.loginForm.enterUserName(user);
|
|
366
|
-
await this.loginForm.enterPassword(pwd);
|
|
367
|
-
await this.loginForm.clickLogin();
|
|
368
|
-
await this.page.locator(".main-layout").waitFor();
|
|
369
|
-
await this.header.avatarMenu.validateAvatarName(user);
|
|
370
8
|
}
|
|
371
9
|
}
|
|
372
10
|
|
|
373
11
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
12
|
+
class $e18c8d3707c8c74c$export$36d69433c4f81145 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
13
|
+
async clickUserManagement() {
|
|
14
|
+
await this.page.locator("p.MuiTypography-root", {
|
|
15
|
+
hasText: "User management"
|
|
16
|
+
}).click();
|
|
17
|
+
await this.page.getByRole("link", {
|
|
18
|
+
name: "Users"
|
|
19
|
+
}).click();
|
|
379
20
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
*/ async createNewApplicationDirectory(appDirectoryName) {
|
|
384
|
-
await this.applicationPage.contextMenu.clickApplicationCi();
|
|
385
|
-
await this.applicationPage.contextMenu.clickMenuPath([
|
|
386
|
-
"new",
|
|
387
|
-
"directory"
|
|
388
|
-
]);
|
|
389
|
-
await this.applicationPage.form.assertSaveButtonIsDisabled();
|
|
390
|
-
await this.applicationPage.form.assertSaveAndCloseButtonIsDisabled();
|
|
391
|
-
await this.applicationPage.form.enterName(appDirectoryName);
|
|
392
|
-
await this.applicationPage.tab.assertActiveTabSelector("Create core.directory");
|
|
393
|
-
await this.applicationPage.form.clickSaveAndClose();
|
|
21
|
+
async verifyDeployLogoIsPresent() {
|
|
22
|
+
const logo = this.page.getByAltText("Deploy");
|
|
23
|
+
await (0, $lE6ZQ$expect)(logo).toBeVisible();
|
|
394
24
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
*/ async createNewApplication(appName) {
|
|
399
|
-
await this.applicationPage.contextMenu.clickApplicationCi();
|
|
400
|
-
await this.applicationPage.contextMenu.clickMenuPath([
|
|
401
|
-
"new",
|
|
402
|
-
"application"
|
|
403
|
-
]);
|
|
404
|
-
await this.applicationPage.form.assertSaveButtonIsDisabled();
|
|
405
|
-
await this.applicationPage.form.assertSaveAndCloseButtonIsDisabled();
|
|
406
|
-
await this.applicationPage.form.enterName(appName);
|
|
407
|
-
await this.applicationPage.form.clickSaveAndClose();
|
|
408
|
-
await this.applicationPage.tab.assertActiveTabSelector("Create udm.application");
|
|
25
|
+
async verifyDeployTextIsPresent() {
|
|
26
|
+
const title = this.page.getByTitle("digital.ai");
|
|
27
|
+
await (0, $lE6ZQ$expect)(title).toBeVisible();
|
|
409
28
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
await this.applicationPage.contextMenu.clickMenuPath([
|
|
415
|
-
"import",
|
|
416
|
-
"fromComputer"
|
|
417
|
-
]);
|
|
29
|
+
async clickReports() {
|
|
30
|
+
await this.page.locator("p.MuiTypography-root", {
|
|
31
|
+
hasText: "Reports"
|
|
32
|
+
}).click();
|
|
418
33
|
}
|
|
419
34
|
}
|
|
420
35
|
|
|
421
36
|
|
|
422
37
|
|
|
423
38
|
|
|
424
|
-
class $
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
*/ async assertActiveTabSelector(expectedCiType) {
|
|
439
|
-
return await (0, $lE6ZQ$expect)(this.getTabTitleLocator).toHaveText(expectedCiType, {
|
|
440
|
-
ignoreCase: true
|
|
39
|
+
class $ca2721b1aeb903c5$export$ecdc3cf9d1cfe143 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
40
|
+
/* Create a new user */ async createNewUser(username, email, password) {
|
|
41
|
+
await this.page.locator("p.MuiTypography-root", {
|
|
42
|
+
hasText: "Users"
|
|
43
|
+
}).click();
|
|
44
|
+
await this.page.getByRole("button", {
|
|
45
|
+
name: "Add user"
|
|
46
|
+
}).click();
|
|
47
|
+
await this.page.locator('input[name="username"]').fill(username);
|
|
48
|
+
await this.page.locator('input[name="fullName"]').fill(username);
|
|
49
|
+
await this.page.locator('input[name="email"]').fill(email);
|
|
50
|
+
const passwordInput = this.page.locator('input[name="password"]');
|
|
51
|
+
await passwordInput.click({
|
|
52
|
+
force: true
|
|
441
53
|
});
|
|
54
|
+
await passwordInput.fill(password);
|
|
55
|
+
await this.page.locator('input[name="confirmPassword"]').fill(password);
|
|
56
|
+
await this.page.getByRole("button", {
|
|
57
|
+
name: "Save"
|
|
58
|
+
}).click();
|
|
442
59
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* Verify there is no tabs are opened.
|
|
450
|
-
*/ async noTabsOpened() {
|
|
451
|
-
await (0, $lE6ZQ$expect)(this.tabSelector).not.toBeVisible();
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* Expect the given tab title is present in tab opened
|
|
455
|
-
* @param tabTitle
|
|
456
|
-
* @returns
|
|
457
|
-
*/ async expectTabOpened(tabTitle) {
|
|
458
|
-
return await (0, $lE6ZQ$expect)(this.tabTitle).toHaveText(tabTitle);
|
|
60
|
+
/* Verify success message */ async verifySuccessMessage() {
|
|
61
|
+
const SuccessMessage = this.page.getByRole("alertdialog");
|
|
62
|
+
await (0, $lE6ZQ$expect)(SuccessMessage).toBeVisible();
|
|
63
|
+
await (0, $lE6ZQ$expect)(SuccessMessage).toHaveText(/User ".*" created/i);
|
|
459
64
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
* @param tabTitle
|
|
463
|
-
* @returns
|
|
464
|
-
*/ async expectTabNotOpened(tabTitle) {
|
|
465
|
-
return await (0, $lE6ZQ$expect)(this.tabTitle).not.toHaveText(tabTitle);
|
|
65
|
+
/* Verify user error message */ async verifyUserErrorMessage() {
|
|
66
|
+
await (0, $lE6ZQ$expect)(this.page.locator('.rrt-middle-container[role="alertdialog"]').nth(1)).toContainText(/already in use/i);
|
|
466
67
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
*/ async clickApplicationCi() {
|
|
481
|
-
await this.applicationLocator.click();
|
|
482
|
-
await this.openContextualMenuDots();
|
|
483
|
-
}
|
|
484
|
-
/**
|
|
485
|
-
* Click on application CI in contextual-menu option.
|
|
486
|
-
*/ async clickEnvironmentCi() {
|
|
487
|
-
await this.environmentLocator.click();
|
|
488
|
-
await this.openContextualMenuDots();
|
|
68
|
+
/* Delete the user and verify it is deleted */ async deleteTheUserAndVerifyItIsDeleted(username) {
|
|
69
|
+
await this.page.locator("p.MuiTypography-root", {
|
|
70
|
+
hasText: "Users"
|
|
71
|
+
}).click();
|
|
72
|
+
await this.page.getByPlaceholder("Filter...").fill(username);
|
|
73
|
+
await this.page.locator("td.users-table-actions button.delete.xl-icon.table-action").click();
|
|
74
|
+
await this.page.getByRole("button", {
|
|
75
|
+
name: "Delete",
|
|
76
|
+
exact: true
|
|
77
|
+
}).click();
|
|
78
|
+
const DeleteMessage = this.page.getByRole("alertdialog");
|
|
79
|
+
await (0, $lE6ZQ$expect)(DeleteMessage).toBeVisible();
|
|
80
|
+
await (0, $lE6ZQ$expect)(DeleteMessage).toHaveText(/User ".*" deleted/i);
|
|
489
81
|
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
82
|
+
/* Edit the user and verify the changes */ async editUserAndVerify(username, editfullname) {
|
|
83
|
+
await this.page.locator("p.MuiTypography-root", {
|
|
84
|
+
hasText: "Users"
|
|
85
|
+
}).click();
|
|
86
|
+
await this.page.getByPlaceholder("Filter...").fill(username);
|
|
87
|
+
await this.page.locator("i.icon-edit.dot-i").first().click();
|
|
88
|
+
await this.page.locator('input[name="fullName"]').fill(editfullname);
|
|
89
|
+
await this.page.getByRole("button", {
|
|
90
|
+
name: "Save",
|
|
91
|
+
exact: true
|
|
498
92
|
}).click();
|
|
499
|
-
|
|
93
|
+
const EditMessage = this.page.getByRole("alertdialog");
|
|
94
|
+
await (0, $lE6ZQ$expect)(EditMessage).toBeVisible();
|
|
95
|
+
await (0, $lE6ZQ$expect)(EditMessage).toContainText("Your change was saved");
|
|
500
96
|
}
|
|
501
97
|
}
|
|
502
98
|
|
|
503
99
|
|
|
504
100
|
|
|
505
101
|
|
|
506
|
-
class $
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
this.page =
|
|
510
|
-
this.
|
|
511
|
-
this.inputLatestVersion = page.locator('input[name="lastVersion"]');
|
|
512
|
-
this.saveButton = page.getByRole("button", {
|
|
513
|
-
name: "Save",
|
|
514
|
-
exact: true
|
|
515
|
-
});
|
|
516
|
-
this.saveAndCloseButton = page.getByRole("button", {
|
|
517
|
-
name: "Save and close",
|
|
518
|
-
exact: true
|
|
519
|
-
});
|
|
520
|
-
this.cancelButton = page.getByRole("button", {
|
|
521
|
-
name: "Cancel",
|
|
102
|
+
class $a4d71fd851704781$export$c88e1d16f82516d extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
103
|
+
/* Helps to create a LocalHost of type UNIX/Windows/Zos */ async createHostForGivenType(name, type) {
|
|
104
|
+
await this.page.locator('input[name="name"]').fill(name);
|
|
105
|
+
await this.page.locator('label:has-text("Operating system")').locator("xpath=following::input[1]").click();
|
|
106
|
+
await this.page.getByText(type, {
|
|
522
107
|
exact: true
|
|
108
|
+
}).click();
|
|
109
|
+
await this.page.getByRole("button", {
|
|
110
|
+
name: "Save and close"
|
|
111
|
+
}).click();
|
|
112
|
+
const toastMessage = this.page.locator(".redux-toastr .rrt-text:visible");
|
|
113
|
+
await (0, $lE6ZQ$expect)(toastMessage).toHaveText("Your change was saved.", {
|
|
114
|
+
timeout: 2000
|
|
523
115
|
});
|
|
524
|
-
this.errorMessage = page.locator(".error");
|
|
525
|
-
this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
|
|
526
|
-
this.refreshButton = page.locator("i.refresh");
|
|
527
|
-
this.inputRename = page.locator(".infinite-tree-rename-input");
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Enter name in name field of the application form
|
|
531
|
-
* @param name
|
|
532
|
-
* @returns
|
|
533
|
-
*/ async enterName(name) {
|
|
534
|
-
return await this.findElementInSection(this.inputName).fill(name);
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
* Enter latest version field
|
|
538
|
-
* @param version
|
|
539
|
-
* @returns
|
|
540
|
-
*/ async enterLatestVersion(version) {
|
|
541
|
-
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* Click save button
|
|
545
|
-
* @returns
|
|
546
|
-
*/ async clickSave() {
|
|
547
|
-
return await this.findElementInSection(this.saveButton).click();
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* Click save and close button
|
|
551
|
-
* @returns
|
|
552
|
-
*/ async clickSaveAndClose() {
|
|
553
|
-
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Click cancel button
|
|
557
|
-
* @returns
|
|
558
|
-
*/ async clickCancel() {
|
|
559
|
-
return await this.findElementInSection(this.cancelButton).click();
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* Expecting save button is disabled
|
|
563
|
-
* @returns
|
|
564
|
-
*/ async assertSaveButtonIsDisabled() {
|
|
565
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* Expecting Save and close button is disabled
|
|
569
|
-
* @returns
|
|
570
|
-
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
571
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
572
|
-
}
|
|
573
|
-
/**
|
|
574
|
-
* Verify Error message in the form
|
|
575
|
-
* @param errorMsg
|
|
576
|
-
* @returns
|
|
577
|
-
*/ async verifyErrorMessage(errorMsg) {
|
|
578
|
-
return (0, $lE6ZQ$expect)(await this.findElementInSection(this.errorMessage).textContent()).toContain(errorMsg);
|
|
579
|
-
}
|
|
580
|
-
/**
|
|
581
|
-
* Verify field value in form using field name
|
|
582
|
-
* @param fieldName
|
|
583
|
-
* @param expectedValue
|
|
584
|
-
* @returns
|
|
585
|
-
*/ async verifyFieldValue(fieldName, expectedValue) {
|
|
586
|
-
const label = this.formSection.locator('//label[text()="' + fieldName + '"]/parent::div/parent::div');
|
|
587
|
-
const input = label.locator(".xl-react-components-input input");
|
|
588
|
-
const result = await input.getAttribute("value");
|
|
589
|
-
return (0, $lE6ZQ$expect)(result).toEqual(expectedValue);
|
|
590
116
|
}
|
|
591
117
|
}
|
|
592
118
|
|
|
593
119
|
|
|
594
120
|
|
|
595
|
-
class $1f57a739e2592b82$export$2b77a92f1a5ad772 extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
596
|
-
constructor(parentLocator, page){
|
|
597
|
-
super(parentLocator, page.locator(".xl-react-modal-content"));
|
|
598
|
-
this.header = page.locator(".modal-header");
|
|
599
|
-
this.body = page.locator(".modal-body");
|
|
600
|
-
this.footer = page.locator(".modal-footer");
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
121
|
|
|
605
|
-
class $
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
this.
|
|
609
|
-
|
|
610
|
-
exact: true
|
|
611
|
-
});
|
|
612
|
-
this.cancelButton = page.getByRole("button", {
|
|
613
|
-
name: "Cancel",
|
|
614
|
-
exact: true
|
|
615
|
-
});
|
|
616
|
-
this.moveButton = page.getByRole("button", {
|
|
617
|
-
name: "Move",
|
|
122
|
+
class $8f7dd2349a88e8b2$export$12530425267834a9 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
123
|
+
/* Helps to create a new Environment */ async createEnvironment(environmentName, hostName) {
|
|
124
|
+
await this.page.locator('input[name="name"]').fill(environmentName);
|
|
125
|
+
await this.page.locator("i.xl-icon.arrow-down-icon.show-all").nth(0).click();
|
|
126
|
+
await this.page.getByTitle(`Infrastructure/${hostName}`, {
|
|
618
127
|
exact: true
|
|
128
|
+
}).click();
|
|
129
|
+
await this.page.getByRole("button", {
|
|
130
|
+
name: "Save and close"
|
|
131
|
+
}).click();
|
|
132
|
+
const toastMessage = this.page.locator(".redux-toastr .rrt-text:visible");
|
|
133
|
+
await (0, $lE6ZQ$expect)(toastMessage).toHaveText("Your change was saved.", {
|
|
134
|
+
timeout: 2000
|
|
619
135
|
});
|
|
620
136
|
}
|
|
621
|
-
async clickDelete() {
|
|
622
|
-
await this.footer.locator(this.deleteButton).click();
|
|
623
|
-
}
|
|
624
|
-
async clickCancel() {
|
|
625
|
-
await this.footer.locator(this.cancelButton).click();
|
|
626
|
-
}
|
|
627
|
-
async clickMove() {
|
|
628
|
-
await this.footer.locator(this.moveButton).click();
|
|
629
|
-
}
|
|
630
137
|
}
|
|
631
138
|
|
|
632
139
|
|
|
633
140
|
|
|
634
141
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
class $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9 {
|
|
640
|
-
constructor(page){
|
|
641
|
-
this.page = page;
|
|
642
|
-
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
643
|
-
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
644
|
-
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page.locator(".Pane.vertical.Pane2"), page);
|
|
645
|
-
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page.locator(".xl-react-modal-open"), page);
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
* Create new ci under any explorer package by providing following parameters.
|
|
649
|
-
* @param parentNodeId
|
|
650
|
-
* @param menuPath
|
|
651
|
-
* @param expectedCiType
|
|
652
|
-
* @param fieldName
|
|
653
|
-
*/ async createNewCi(parentNodeId, menuPath, fieldName) {
|
|
654
|
-
await this.expandNodePath(parentNodeId);
|
|
655
|
-
await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
|
|
656
|
-
await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
|
|
657
|
-
await this.contextMenu.clickMenuPath(menuPath);
|
|
658
|
-
await this.form.assertSaveButtonIsDisabled();
|
|
659
|
-
await this.form.assertSaveAndCloseButtonIsDisabled();
|
|
660
|
-
await this.tab.assertActiveTabSelector("Create udm." + menuPath[1] + "");
|
|
661
|
-
await this.form.enterName(fieldName);
|
|
662
|
-
await this.form.clickSaveAndClose();
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* Expand the ci path tree toggler.
|
|
666
|
-
* @param pathnode
|
|
667
|
-
*/ async expandNode(pathnode) {
|
|
668
|
-
const nodeLocator = await this.page.locator('div[data-id="' + pathnode + '"] a.infinite-tree-toggler.infinite-tree-closed').isVisible();
|
|
669
|
-
if (nodeLocator) await this.page.locator('div[data-id="' + pathnode + '"] a.infinite-tree-toggler.infinite-tree-closed').click();
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* expands the path of CI by separating path from "/"
|
|
673
|
-
* @param parentNodeId
|
|
674
|
-
*/ async expandNodePath(parentNodeId) {
|
|
675
|
-
const ci = await this.page.isVisible('div[data-id="' + parentNodeId + '"]');
|
|
676
|
-
if (!ci) {
|
|
677
|
-
const nodeIdParts = $lE6ZQ$split("/", parentNodeId);
|
|
678
|
-
for(let ind = 0; ind < nodeIdParts.length; ind++){
|
|
679
|
-
const path = $lE6ZQ$join("/", $lE6ZQ$take(ind + 1, nodeIdParts));
|
|
680
|
-
await this.expandNode(path);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* Collapse the tree toggler of ci path.
|
|
686
|
-
* @param parentNodeId
|
|
687
|
-
*/ async collapseNode(parentNodeId) {
|
|
688
|
-
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();
|
|
689
|
-
}
|
|
690
|
-
/**
|
|
691
|
-
* Delete the ci
|
|
692
|
-
* @param node
|
|
693
|
-
*/ async deleteCi(node) {
|
|
694
|
-
const cipath = this.page.locator('div[data-id="' + node + '"]');
|
|
695
|
-
if (await cipath.isVisible()) await this.page.locator('div[data-id="' + node + '"]').click();
|
|
696
|
-
else {
|
|
697
|
-
await this.expandNodePath(node);
|
|
698
|
-
await this.page.locator('div[data-id="' + node + '"]').click();
|
|
699
|
-
}
|
|
700
|
-
await this.page.locator('i[data-id="' + node + '"].context-menu-button').click();
|
|
701
|
-
await this.contextMenu.clickMenuPath([
|
|
702
|
-
"delete"
|
|
703
|
-
]);
|
|
704
|
-
await this.modal.clickDelete();
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* Click on specific node which is under Application CI.
|
|
708
|
-
* @param nodeId
|
|
709
|
-
*/ async clickNode(nodeId) {
|
|
710
|
-
await this.page.locator('div[data-id="' + nodeId + '"]').dblclick();
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Click on ci under any explorer package of contextual menus by providing following parameters.
|
|
714
|
-
* @param parentNodeId
|
|
715
|
-
* @param menuPath
|
|
716
|
-
* @param expectedCiType
|
|
717
|
-
* @param fieldName
|
|
718
|
-
*/ async clickCi(parentNodeId, menuPath, expectedCiType) {
|
|
719
|
-
await this.expandNodePath(parentNodeId);
|
|
720
|
-
await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
|
|
721
|
-
await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
|
|
722
|
-
await this.contextMenu.clickMenuPath(menuPath);
|
|
723
|
-
await this.form.assertSaveButtonIsDisabled();
|
|
724
|
-
await this.form.assertSaveAndCloseButtonIsDisabled();
|
|
725
|
-
await this.tab.assertActiveTabSelector("Create " + expectedCiType + "");
|
|
726
|
-
}
|
|
727
|
-
/**
|
|
728
|
-
* Duplicate the CI node in explorer using context-menu
|
|
729
|
-
* @param nodeId
|
|
730
|
-
*/ async duplicate(nodeId) {
|
|
731
|
-
await this.expandNodePath(nodeId);
|
|
732
|
-
await this.page.locator('div[data-id="' + nodeId + '"]').click();
|
|
733
|
-
await this.page.locator('i[data-id="' + nodeId + '"].context-menu-button').click();
|
|
734
|
-
await this.contextMenu.clickMenuPath([
|
|
735
|
-
"duplicate"
|
|
736
|
-
]);
|
|
737
|
-
}
|
|
738
|
-
/**
|
|
739
|
-
* Validate the given node ID is visible in the page
|
|
740
|
-
* @param nodeId
|
|
741
|
-
*/ async validateNodeExists(nodeId) {
|
|
742
|
-
await (0, $lE6ZQ$expect)(this.page.locator('div[data-id="' + nodeId + '"]')).toBeVisible();
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Validate the given node does not exists in the list.
|
|
746
|
-
* @param nodeId
|
|
747
|
-
*/ async validateNodeDoesNotExists(nodeId) {
|
|
748
|
-
await (0, $lE6ZQ$expect)(this.page.locator('div[data-id="' + nodeId + '"]')).not.toBeVisible();
|
|
142
|
+
class $3fb4750cbb53e5e6$export$1533b625ec0c75e2 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
143
|
+
constructor(page, navigation){
|
|
144
|
+
super(page);
|
|
145
|
+
this.navigation = navigation;
|
|
749
146
|
}
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
await this.
|
|
756
|
-
await this.page.locator('
|
|
757
|
-
await this.page.
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
await
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
await (0, $lE6ZQ$expect)(this.page.locator('div[data-id="' + nodeId + '"]')).not.toBeVisible();
|
|
147
|
+
/* Creates a new application */ async createNewApplication(applicationName) {
|
|
148
|
+
await this.navigation.navigateToApplicationsPage();
|
|
149
|
+
await this.page.locator('input[name="name"]').waitFor({
|
|
150
|
+
state: "visible"
|
|
151
|
+
});
|
|
152
|
+
await this.page.locator('input[name="name"]').click();
|
|
153
|
+
await this.page.locator('input[name="name"]').fill(applicationName);
|
|
154
|
+
await this.page.getByRole("button", {
|
|
155
|
+
name: "Save and close"
|
|
156
|
+
}).click();
|
|
157
|
+
const toastMessage = this.page.locator(".redux-toastr .rrt-text:visible");
|
|
158
|
+
await (0, $lE6ZQ$expect)(toastMessage).toHaveText("Your change was saved.", {
|
|
159
|
+
timeout: 2000
|
|
160
|
+
});
|
|
765
161
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
162
|
+
/* Creates a new deployment package */ async createNewDeploymentPackage(applicationName, packageName) {
|
|
163
|
+
const appDataId = `Applications/${applicationName}`;
|
|
164
|
+
// Expand Applications
|
|
165
|
+
const root = this.page.locator('div[data-id="Applications"] .infinite-tree-node > a');
|
|
166
|
+
await root.click();
|
|
167
|
+
// Hover over app node
|
|
168
|
+
const appNode = this.page.locator(`span[data-id="${appDataId}"]`);
|
|
169
|
+
await (0, $lE6ZQ$expect)(appNode).toBeVisible();
|
|
170
|
+
await appNode.hover();
|
|
171
|
+
// Open context menu + create new deployment package
|
|
172
|
+
const contextMenu = this.page.locator(`i.context-menu-button[data-id="${appDataId}"]`);
|
|
173
|
+
await (0, $lE6ZQ$expect)(contextMenu).toBeVisible();
|
|
174
|
+
await contextMenu.click();
|
|
175
|
+
await this.page.getByRole("link", {
|
|
176
|
+
name: "New"
|
|
177
|
+
}).click();
|
|
178
|
+
await this.page.getByRole("link", {
|
|
179
|
+
name: "Deployment Package"
|
|
180
|
+
}).click();
|
|
181
|
+
// Fill & save
|
|
182
|
+
const nameInput = this.page.locator('input[name="name"]');
|
|
183
|
+
await nameInput.fill(packageName);
|
|
184
|
+
await this.page.getByRole("button", {
|
|
185
|
+
name: "Save and close"
|
|
186
|
+
}).click();
|
|
187
|
+
const toastMessage = this.page.locator(".redux-toastr .rrt-text:visible");
|
|
188
|
+
await (0, $lE6ZQ$expect)(toastMessage).toHaveText("Your change was saved.", {
|
|
189
|
+
timeout: 2000
|
|
190
|
+
});
|
|
776
191
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
192
|
+
/* Creates a new command application */ async createNewCmdApplication(values) {
|
|
193
|
+
const appDataId = `Applications/${values[0]}`;
|
|
194
|
+
const packageDataId = `Applications/${values[0]}/${values[1]}`;
|
|
195
|
+
// Expand app node and click package
|
|
196
|
+
await this.page.locator(`div[data-id="${appDataId}"] .infinite-tree-node > a`).click();
|
|
197
|
+
const packageNode = this.page.locator(`span[data-id="${packageDataId}"]`).first();
|
|
198
|
+
await (0, $lE6ZQ$expect)(packageNode).toBeVisible();
|
|
199
|
+
await packageNode.click();
|
|
200
|
+
// Open context menu
|
|
201
|
+
const packageMenu = this.page.locator(`i.context-menu-button[data-id="${packageDataId}"]`);
|
|
202
|
+
await (0, $lE6ZQ$expect)(packageMenu).toBeVisible();
|
|
203
|
+
await packageMenu.click();
|
|
204
|
+
// Create Command application
|
|
205
|
+
await this.page.getByRole("link", {
|
|
206
|
+
name: "New"
|
|
207
|
+
}).click();
|
|
208
|
+
await this.page.getByRole("link", {
|
|
209
|
+
name: "cmd"
|
|
210
|
+
}).click();
|
|
211
|
+
await this.page.getByRole("link", {
|
|
212
|
+
name: "Command"
|
|
213
|
+
}).click();
|
|
214
|
+
await this.page.locator('input[name="name"]').fill(values[2]);
|
|
215
|
+
await this.page.locator('textarea[name="commandLine"]').fill(values[3]);
|
|
216
|
+
const saveBtn = this.page.locator("button", {
|
|
217
|
+
hasText: /^Save$/
|
|
218
|
+
}).first();
|
|
219
|
+
await (0, $lE6ZQ$expect)(saveBtn).toBeEnabled();
|
|
220
|
+
await saveBtn.click();
|
|
221
|
+
await this.page.waitForTimeout(3000);
|
|
222
|
+
const toastMessage = this.page.locator(".redux-toastr .rrt-text:visible");
|
|
223
|
+
await (0, $lE6ZQ$expect)(toastMessage).toHaveText("Your change was saved.", {
|
|
224
|
+
timeout: 2000
|
|
225
|
+
});
|
|
226
|
+
// Close dialog
|
|
227
|
+
await this.page.locator("i.xl-icon.close-icon").first().click();
|
|
228
|
+
}
|
|
229
|
+
/*Deploy the application*/ async deployApp(values) {
|
|
230
|
+
const versionNode = `Applications/${values[0]}/${values[1]}`;
|
|
231
|
+
await this.page.locator(`i.context-menu-button[data-id="${versionNode}"]`).click();
|
|
232
|
+
await this.page.getByRole("link", {
|
|
233
|
+
name: "Deploy",
|
|
234
|
+
exact: true
|
|
235
|
+
}).click();
|
|
236
|
+
await this.page.locator(`input[name="selections"][value="Environments/${values[2]}"]`).click();
|
|
237
|
+
await this.page.getByRole("button", {
|
|
238
|
+
name: "Continue"
|
|
239
|
+
}).click();
|
|
240
|
+
await this.page.locator(".errors-wrapper").waitFor({
|
|
241
|
+
state: "attached",
|
|
242
|
+
timeout: 2000
|
|
243
|
+
});
|
|
244
|
+
const errorIcon = this.page.locator("a.validation-icons-wrapper.error");
|
|
245
|
+
if (await errorIcon.isVisible()) {
|
|
246
|
+
await this.page.getByRole("button", {
|
|
247
|
+
name: "Deployment Properties"
|
|
248
|
+
}).click();
|
|
249
|
+
await this.page.locator('input[name="username"]').fill(values[3]);
|
|
250
|
+
await this.page.getByRole("button", {
|
|
251
|
+
name: "Save"
|
|
252
|
+
}).click();
|
|
786
253
|
}
|
|
787
|
-
await this.page.locator(
|
|
788
|
-
|
|
789
|
-
|
|
254
|
+
await this.page.locator("button.deploy.xl-primary").click();
|
|
255
|
+
//Get the task id
|
|
256
|
+
this.taskId = await this.page.locator("div.task-id").textContent() || "";
|
|
257
|
+
//Verify no failure and all are done
|
|
258
|
+
const labels = this.page.locator("span.label");
|
|
259
|
+
await (0, $lE6ZQ$expect)(labels).toHaveCount(3);
|
|
260
|
+
await (0, $lE6ZQ$expect)(labels).toHaveText([
|
|
261
|
+
"EXECUTED",
|
|
262
|
+
"DONE",
|
|
263
|
+
"DONE"
|
|
790
264
|
]);
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
await this.
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
* @param target_path
|
|
806
|
-
*/ async moveCi(source_path, target_path) {
|
|
807
|
-
const source_cipath = this.page.locator('div[data-id="' + source_path + '"]');
|
|
808
|
-
const target_cipath = this.page.locator('div[data-id="' + target_path + '"]');
|
|
809
|
-
await this.expandNodePath(source_path);
|
|
810
|
-
//TODO: Find a better way to make sure target can be expanded without error, current implementation is workaround
|
|
811
|
-
await this.page.locator('div[data-id="' + target_path + '"]').textContent();
|
|
812
|
-
await this.expandNodePath(target_path);
|
|
813
|
-
await source_cipath.dragTo(target_cipath);
|
|
814
|
-
}
|
|
815
|
-
/**
|
|
816
|
-
* Click Move button on modal window to Move the CIs
|
|
817
|
-
*/ async clickMoveAndWait() {
|
|
818
|
-
await this.modal.clickMove();
|
|
265
|
+
//Get the text executed
|
|
266
|
+
await this.page.locator('div[data-id="0_1_1"] .infinite-tree-node > a').click();
|
|
267
|
+
await this.page.getByTitle("Execute Test Command").click();
|
|
268
|
+
this.executedText = await this.page.locator("div.step-log-body pre").nth(1).innerText();
|
|
269
|
+
//Verify in monitoring tab searching with the task id
|
|
270
|
+
await this.page.locator('div[data-id="TASK_MONITOR"] .infinite-tree-node > a').click();
|
|
271
|
+
await this.page.locator('span[data-id="DEPLOYMENT_TASKS"]').dblclick();
|
|
272
|
+
await this.page.waitForTimeout(5000);
|
|
273
|
+
await this.page.locator('div.deployment-task-filter-task-id input[placeholder="Search"]').first().fill(this.taskId);
|
|
274
|
+
const stateText = await this.page.locator("td.tasks-table-state").first().innerText();
|
|
275
|
+
(0, $lE6ZQ$expect)(stateText.trim()).toBe("Executed");
|
|
276
|
+
//Click the row to go to deployment screen
|
|
277
|
+
await this.page.locator("table.table.table-striped tbody tr").first().dblclick();
|
|
278
|
+
await this.page.locator("button.finish.xl-primary").click();
|
|
819
279
|
}
|
|
820
280
|
}
|
|
821
281
|
|
|
822
282
|
|
|
823
283
|
|
|
824
284
|
|
|
825
|
-
class $
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
this.inputLatestVersion = page.locator('input[name="lastVersion"]');
|
|
831
|
-
this.saveButton = page.getByRole("button", {
|
|
832
|
-
name: "Save",
|
|
833
|
-
exact: true
|
|
834
|
-
});
|
|
835
|
-
this.saveAndCloseButton = page.getByRole("button", {
|
|
836
|
-
name: "Save and close",
|
|
837
|
-
exact: true
|
|
838
|
-
});
|
|
839
|
-
this.cancelButton = page.getByRole("button", {
|
|
840
|
-
name: "Cancel",
|
|
841
|
-
exact: true
|
|
842
|
-
});
|
|
843
|
-
this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
|
|
844
|
-
this.addButton = page.locator(".xl-btn-add");
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* Enter name in name field of the application form
|
|
848
|
-
* @param name
|
|
849
|
-
* @returns
|
|
850
|
-
*/ async enterName(name) {
|
|
851
|
-
return await this.findElementInSection(this.inputName).fill(name);
|
|
852
|
-
}
|
|
853
|
-
/**
|
|
854
|
-
* Enter latest version field
|
|
855
|
-
* @param version
|
|
856
|
-
* @returns
|
|
857
|
-
*/ async enterLatestVersion(version) {
|
|
858
|
-
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* Click save button
|
|
862
|
-
* @returns
|
|
863
|
-
*/ async clickSave() {
|
|
864
|
-
return await this.findElementInSection(this.saveButton).click();
|
|
865
|
-
}
|
|
866
|
-
/**
|
|
867
|
-
* Click save and close button
|
|
868
|
-
* @returns
|
|
869
|
-
*/ async clickSaveAndClose() {
|
|
870
|
-
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* Click cancel button
|
|
874
|
-
* @returns
|
|
875
|
-
*/ async clickCancel() {
|
|
876
|
-
return await this.findElementInSection(this.cancelButton).click();
|
|
877
|
-
}
|
|
878
|
-
/**
|
|
879
|
-
* Expecting save button is disabled
|
|
880
|
-
* @returns
|
|
881
|
-
*/ async assertSaveButtonIsDisabled() {
|
|
882
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* Expecting Save and close button is disabled
|
|
886
|
-
* @returns
|
|
887
|
-
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
888
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
889
|
-
}
|
|
890
|
-
/**
|
|
891
|
-
* Enter Field Values using its label value around application forms
|
|
892
|
-
* @param fieldName
|
|
893
|
-
* @param expectedValue
|
|
894
|
-
* @returns
|
|
895
|
-
*/ async addFieldValue(fieldName, expectedValue) {
|
|
896
|
-
const label = this.formSection.locator('//label[text()="' + fieldName + '"]/parent::div/parent::div');
|
|
897
|
-
const input = label.locator(".xl-react-components-input input");
|
|
898
|
-
await input.fill(expectedValue);
|
|
899
|
-
await input.press("Enter");
|
|
900
|
-
const result = await input.getAttribute("value");
|
|
901
|
-
return (0, $lE6ZQ$expect)(result).toEqual(expectedValue);
|
|
902
|
-
}
|
|
903
|
-
async addOrchestrator(fieldValue) {
|
|
904
|
-
const label = this.formSection.locator('//label[text()="Orchestrator"]/parent::div/parent::div');
|
|
905
|
-
const input = label.locator(".xl-react-components-input input");
|
|
906
|
-
await input.fill(fieldValue);
|
|
907
|
-
await this.addButton.click();
|
|
908
|
-
await this.saveButton.waitFor();
|
|
909
|
-
await this.saveButton.click();
|
|
910
|
-
const result = await this.page.locator("span.text-container").getAttribute("title");
|
|
911
|
-
return (0, $lE6ZQ$expect)(result).toEqual(fieldValue);
|
|
285
|
+
class $76bad9b9e6741f37$export$b8a443164510a1b4 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
286
|
+
/* Clicks on the Deployment Tasks section */ async clickDeploymentTasks() {
|
|
287
|
+
await this.page.locator("p.MuiTypography-root", {
|
|
288
|
+
hasText: "Deployments"
|
|
289
|
+
}).click();
|
|
912
290
|
}
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
this.
|
|
923
|
-
this.
|
|
924
|
-
this.
|
|
925
|
-
|
|
291
|
+
async verifyTheDeploymentValues(values) {
|
|
292
|
+
await this.page.locator('div.deployment-task-filter-task-id input[placeholder="Search"]:visible').first().fill(values[0]);
|
|
293
|
+
await this.page.waitForSelector("td.report-table-package .deployment-report-package", {
|
|
294
|
+
timeout: 5000
|
|
295
|
+
});
|
|
296
|
+
await (0, $lE6ZQ$expect)(this.page.locator("td.report-table-package .deployment-report-package")).toContainText(new RegExp(`${values[2]}\\/${values[3]}`, "i"));
|
|
297
|
+
await (0, $lE6ZQ$expect)(this.page.locator("td.report-table-originalType .deployment-report-task-type")).toHaveText(/Initial/i); // Regex ignores case
|
|
298
|
+
await (0, $lE6ZQ$expect)(this.page.locator("td.report-table-user .deployment-report-user")).toHaveText("admin");
|
|
299
|
+
//Click the row
|
|
300
|
+
await this.page.locator("td.report-table-package .deployment-report-package").dblclick();
|
|
301
|
+
await this.page.locator('div[data-id="0_1_1"] .infinite-tree-node > a').click();
|
|
302
|
+
await this.page.getByTitle("Execute Test Command").click();
|
|
303
|
+
//Get the log text
|
|
304
|
+
const text = await this.page.locator("div.step-log-body pre").nth(1).innerText();
|
|
305
|
+
//Verify both the log text are same
|
|
306
|
+
(0, $lE6ZQ$expect)(text).toContain(values[1]);
|
|
926
307
|
}
|
|
927
308
|
}
|
|
928
309
|
|
|
929
310
|
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
class $736a7a3b2d786796$export$36d69433c4f81145 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
311
|
+
class $95d5ebc9765b570f$export$b8a61e5c71402559 {
|
|
933
312
|
constructor(page){
|
|
934
|
-
super(page);
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
class $07a0aa0673096895$export$855563f8bdb36207 extends (0, $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8) {
|
|
949
|
-
constructor(parentLocator, page){
|
|
950
|
-
super(parentLocator, page.locator(".dip-view-body"));
|
|
951
313
|
this.page = page;
|
|
952
|
-
this.
|
|
953
|
-
this.
|
|
954
|
-
this.
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
});
|
|
966
|
-
this.inputHost = page.locator('input[name="host"]');
|
|
967
|
-
this.inputPort = page.getByLabel("Port");
|
|
968
|
-
this.inputUsername = page.locator('input[name="username"]');
|
|
969
|
-
this.inputPassword = page.locator('input[name="password"]');
|
|
970
|
-
this.inputFromAddress = page.locator('input[name="fromAddress"]');
|
|
971
|
-
this.inputTestAddress = page.locator('input[name="testAddress"]');
|
|
972
|
-
this.inputHostName = page.locator('input[name="hostname"]');
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* Enter name in name field of the configuration form
|
|
976
|
-
* @param name
|
|
977
|
-
* @returns
|
|
978
|
-
*/ async enterName(name) {
|
|
979
|
-
return await this.findElementInSection(this.inputName).fill(name);
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
* Enter latest version field
|
|
983
|
-
* @param version
|
|
984
|
-
* @returns
|
|
985
|
-
*/ async enterLatestVersion(version) {
|
|
986
|
-
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
987
|
-
}
|
|
988
|
-
/**
|
|
989
|
-
* Click save button
|
|
990
|
-
* @returns
|
|
991
|
-
*/ async clickSave() {
|
|
992
|
-
return await this.findElementInSection(this.saveButton).click();
|
|
993
|
-
}
|
|
994
|
-
/**
|
|
995
|
-
* Click save and close button
|
|
996
|
-
* @returns
|
|
997
|
-
*/ async clickSaveAndClose() {
|
|
998
|
-
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
999
|
-
}
|
|
1000
|
-
/**
|
|
1001
|
-
* Click cancel button
|
|
1002
|
-
* @returns
|
|
1003
|
-
*/ async clickCancel() {
|
|
1004
|
-
return await this.findElementInSection(this.cancelButton).click();
|
|
1005
|
-
}
|
|
1006
|
-
/**
|
|
1007
|
-
* Expecting save button is disabled
|
|
1008
|
-
* @returns
|
|
1009
|
-
*/ async assertSaveButtonIsDisabled() {
|
|
1010
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
1011
|
-
}
|
|
1012
|
-
/**
|
|
1013
|
-
* Expecting Save and close button is disabled
|
|
1014
|
-
* @returns
|
|
1015
|
-
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
1016
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
1017
|
-
}
|
|
1018
|
-
/**
|
|
1019
|
-
* Expecting field value with its field name
|
|
1020
|
-
* @param fieldName
|
|
1021
|
-
* @param value
|
|
1022
|
-
* @returns
|
|
1023
|
-
*/ async expectFieldValue(fieldName, value) {
|
|
1024
|
-
(0, $lE6ZQ$expect)(await this.page.locator('input[name="' + fieldName + '"]').getAttribute("value")).toEqual(value);
|
|
1025
|
-
}
|
|
1026
|
-
/**
|
|
1027
|
-
* Set Host value to the Host field in configuration form
|
|
1028
|
-
* @param host
|
|
1029
|
-
* @returns
|
|
1030
|
-
*/ async setHostValue(host) {
|
|
1031
|
-
await this.findElementInSection(this.inputHost).fill(host);
|
|
1032
|
-
}
|
|
1033
|
-
/**
|
|
1034
|
-
* Setting port value in the configuration form
|
|
1035
|
-
* @param port
|
|
1036
|
-
* @returns
|
|
1037
|
-
*/ async setPortValue(port) {
|
|
1038
|
-
await this.findElementInSection(this.inputPort).fill(port);
|
|
1039
|
-
}
|
|
1040
|
-
/**
|
|
1041
|
-
* Setting from Address field value in configuration form
|
|
1042
|
-
* @param address
|
|
1043
|
-
* @returns
|
|
1044
|
-
*/ async setFromAddress(address) {
|
|
1045
|
-
await this.findElementInSection(this.inputFromAddress).fill(address);
|
|
1046
|
-
}
|
|
1047
|
-
/**
|
|
1048
|
-
* Setting username in configuration form
|
|
1049
|
-
* @param username
|
|
1050
|
-
* @returns
|
|
1051
|
-
*/ async setUserName(username) {
|
|
1052
|
-
await this.findElementInSection(this.inputUsername).fill(username);
|
|
314
|
+
this.homePage = new (0, $e18c8d3707c8c74c$export$36d69433c4f81145)(page);
|
|
315
|
+
this.userPage = new (0, $ca2721b1aeb903c5$export$ecdc3cf9d1cfe143)(page);
|
|
316
|
+
this.overthereLocalHostPage = new (0, $a4d71fd851704781$export$c88e1d16f82516d)(page);
|
|
317
|
+
this.environmentsPage = new (0, $8f7dd2349a88e8b2$export$12530425267834a9)(page);
|
|
318
|
+
this.applicationsPage = new (0, $3fb4750cbb53e5e6$export$1533b625ec0c75e2)(page, this);
|
|
319
|
+
this.reportsPage = new (0, $76bad9b9e6741f37$export$b8a443164510a1b4)(page);
|
|
320
|
+
}
|
|
321
|
+
async navigateToHomePage() {
|
|
322
|
+
await this.page.goto("/home");
|
|
323
|
+
}
|
|
324
|
+
async navigateToUserPage() {
|
|
325
|
+
await this.page.locator("p.MuiTypography-root", {
|
|
326
|
+
hasText: "User management"
|
|
327
|
+
}).click();
|
|
1053
328
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
* @returns
|
|
1058
|
-
*/ async setPassword(password) {
|
|
1059
|
-
await this.findElementInSection(this.inputPassword).fill(password);
|
|
329
|
+
async clickCollapseSideView() {
|
|
330
|
+
const collapseButton = this.page.getByTestId("back-button");
|
|
331
|
+
await collapseButton.click();
|
|
1060
332
|
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
333
|
+
/* Helps to navigate to the Applications page */ async navigateToApplicationsPage() {
|
|
334
|
+
const configNode = this.page.locator('span[data-id="Applications"]');
|
|
335
|
+
await configNode.hover();
|
|
336
|
+
await this.page.locator('i.context-menu-button[data-id="Applications"]').click();
|
|
337
|
+
await this.page.getByRole("link", {
|
|
338
|
+
name: "New"
|
|
339
|
+
}).click();
|
|
340
|
+
await this.page.getByRole("link", {
|
|
341
|
+
name: "Application"
|
|
342
|
+
}).click();
|
|
1067
343
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
344
|
+
/* Helps to navigate to the Environments page */ async navigateToEnvironmentsPage() {
|
|
345
|
+
const configNode = this.page.locator('span[data-id="Environments"]');
|
|
346
|
+
await configNode.hover();
|
|
347
|
+
await this.page.locator('i.context-menu-button[data-id="Environments"]').click();
|
|
348
|
+
await this.page.getByRole("link", {
|
|
349
|
+
name: "New"
|
|
350
|
+
}).click();
|
|
351
|
+
await this.page.getByRole("link", {
|
|
352
|
+
name: "Environment"
|
|
353
|
+
}).click();
|
|
1075
354
|
}
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
this.
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
this.
|
|
1088
|
-
|
|
355
|
+
/* Helps to navigate to the Overthere LocalHost page */ async navigateToOverthereLocalHostPage() {
|
|
356
|
+
const configNode = this.page.locator('span[data-id="Infrastructure"]');
|
|
357
|
+
await configNode.hover();
|
|
358
|
+
await this.page.locator('i.context-menu-button[data-id="Infrastructure"]').click();
|
|
359
|
+
// await this.page.waitForTimeout(5000);
|
|
360
|
+
await this.page.getByRole("link", {
|
|
361
|
+
name: "New"
|
|
362
|
+
}).click();
|
|
363
|
+
await this.page.getByRole("link", {
|
|
364
|
+
name: "overthere"
|
|
365
|
+
}).click();
|
|
366
|
+
await this.page.getByRole("link", {
|
|
367
|
+
name: "LocalHost"
|
|
368
|
+
}).click();
|
|
1089
369
|
}
|
|
1090
370
|
}
|
|
1091
371
|
|
|
1092
372
|
|
|
1093
373
|
|
|
1094
374
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
class $6bd08aebb33e3379$export$21cde1e6a73cf500 extends (0, $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8) {
|
|
1102
|
-
constructor(parentLocator, page){
|
|
1103
|
-
super(parentLocator, page.locator(".dip-view-body"));
|
|
1104
|
-
this.page = page;
|
|
1105
|
-
this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
|
|
1106
|
-
this.inputName = page.locator('input[name="name"]');
|
|
1107
|
-
this.inputLatestVersion = page.locator('input[name="lastVersion"]');
|
|
1108
|
-
this.saveButton = page.getByRole("button", {
|
|
1109
|
-
name: "Save",
|
|
1110
|
-
exact: true
|
|
375
|
+
class $c5e912d43cd579b2$export$f14c0e3f98d164c0 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
376
|
+
/* Login with username and password*/ async login(userName, password) {
|
|
377
|
+
await this.page.goto("/#/login");
|
|
378
|
+
await (0, $lE6ZQ$expect)(this.page).toHaveTitle("Digital.ai Deploy");
|
|
379
|
+
await this.page.getByPlaceholder("user").fill(userName, {
|
|
380
|
+
timeout: 1000
|
|
1111
381
|
});
|
|
1112
|
-
this.
|
|
1113
|
-
|
|
1114
|
-
exact: true
|
|
382
|
+
await this.page.getByPlaceholder("Password").fill(password, {
|
|
383
|
+
timeout: 10000
|
|
1115
384
|
});
|
|
1116
|
-
this.
|
|
1117
|
-
name: "
|
|
1118
|
-
|
|
385
|
+
await this.page.getByRole("button", {
|
|
386
|
+
name: "Log in"
|
|
387
|
+
}).click({
|
|
388
|
+
timeout: 10000
|
|
1119
389
|
});
|
|
1120
|
-
this.inputVersion = page.locator("");
|
|
1121
|
-
}
|
|
1122
|
-
/**
|
|
1123
|
-
* Expect the label text is available in form.
|
|
1124
|
-
* @param label
|
|
1125
|
-
*/ async assertLabelText(label) {
|
|
1126
|
-
await (0, $lE6ZQ$expect)(this.page.getByText(label, {
|
|
1127
|
-
exact: true
|
|
1128
|
-
})).toBeVisible();
|
|
1129
|
-
}
|
|
1130
|
-
/**
|
|
1131
|
-
* Enter name in name field of the application form
|
|
1132
|
-
* @param name
|
|
1133
|
-
* @returns
|
|
1134
|
-
*/ async enterName(name) {
|
|
1135
|
-
return await this.findElementInSection(this.inputName).fill(name);
|
|
1136
|
-
}
|
|
1137
|
-
/**
|
|
1138
|
-
* Enter latest version field
|
|
1139
|
-
* @param version
|
|
1140
|
-
* @returns
|
|
1141
|
-
*/ async enterLatestVersion(version) {
|
|
1142
|
-
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
1143
|
-
}
|
|
1144
|
-
/**
|
|
1145
|
-
* Click save button
|
|
1146
|
-
* @returns
|
|
1147
|
-
*/ async clickSave() {
|
|
1148
|
-
return await this.findElementInSection(this.saveButton).click();
|
|
1149
|
-
}
|
|
1150
|
-
/**
|
|
1151
|
-
* Click save and close button
|
|
1152
|
-
* @returns
|
|
1153
|
-
*/ async clickSaveAndClose() {
|
|
1154
|
-
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
1155
|
-
}
|
|
1156
|
-
/**
|
|
1157
|
-
* Click cancel button
|
|
1158
|
-
* @returns
|
|
1159
|
-
*/ async clickCancel() {
|
|
1160
|
-
return await this.findElementInSection(this.cancelButton).click();
|
|
1161
|
-
}
|
|
1162
|
-
/**
|
|
1163
|
-
* Expecting save button is disabled
|
|
1164
|
-
* @returns
|
|
1165
|
-
*/ async assertSaveButtonIsDisabled() {
|
|
1166
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* Expecting Save and close button is disabled
|
|
1170
|
-
* @returns
|
|
1171
|
-
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
1172
|
-
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
1173
|
-
}
|
|
1174
|
-
/**
|
|
1175
|
-
* Enter options in the input field of dropdown to match with suggestion list in form
|
|
1176
|
-
* @param fieldName
|
|
1177
|
-
* @param value
|
|
1178
|
-
*/ async selectVersionOption(fieldName, value) {
|
|
1179
|
-
const label = this.formSection.locator('//label[text()="' + fieldName + '"]/parent::div/parent::div');
|
|
1180
|
-
await label.locator(".xl-react-components-input input").fill(value);
|
|
1181
390
|
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
class $31f14a5153b274ab$export$b8a8d62f66d27fa1 {
|
|
1186
|
-
constructor(page1, page){
|
|
1187
|
-
this.environmentPage = page1;
|
|
1188
|
-
this.page = page;
|
|
391
|
+
/* Verify invalid password message */ async verifyInvalidPasswordMessage() {
|
|
392
|
+
const errorMessage = this.page.getByText("The username and/or password you have entered is incorrect.");
|
|
393
|
+
await (0, $lE6ZQ$expect)(errorMessage).toBeVisible();
|
|
1189
394
|
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
1197
|
-
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page.locator(".Pane.vertical.Pane2"), page);
|
|
1198
|
-
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
1199
|
-
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page.locator(".xl-react-modal-open"), page);
|
|
1200
|
-
this.commonUtil = new (0, $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9)(page);
|
|
1201
|
-
this.envForm = new (0, $6bd08aebb33e3379$export$21cde1e6a73cf500)(page.locator(".xl-react-modal-open"), page);
|
|
1202
|
-
this.util = new (0, $31f14a5153b274ab$export$b8a8d62f66d27fa1)(this, page);
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
class $bf1ec3be2f174e87$export$1f6beddb119e759b extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
1214
|
-
constructor(page){
|
|
1215
|
-
super(page);
|
|
1216
|
-
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
1217
|
-
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page.locator(".Pane.vertical.Pane2"), page);
|
|
1218
|
-
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
1219
|
-
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page.locator(".xl-react-modal-open"), page);
|
|
1220
|
-
this.commonUtil = new (0, $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9)(page);
|
|
395
|
+
/* Logout as authenticated user */ async logout() {
|
|
396
|
+
await this.page.locator("button.dot-avatar").click();
|
|
397
|
+
await this.page.getByText("Log out", {
|
|
398
|
+
exact: true
|
|
399
|
+
}).click();
|
|
400
|
+
await (0, $lE6ZQ$expect)(this.page.getByText("Log in").first()).toBeVisible();
|
|
1221
401
|
}
|
|
1222
402
|
}
|
|
1223
403
|
|
|
1224
404
|
|
|
1225
405
|
const $114b0b206b8d644f$export$e0969da9b8fb378d = (0, $lE6ZQ$test).extend({
|
|
406
|
+
fixtures: async ({ page: page }, use)=>{
|
|
407
|
+
const fixtures = new $114b0b206b8d644f$var$Fixtures(page);
|
|
408
|
+
await use(fixtures);
|
|
409
|
+
return fixtures;
|
|
410
|
+
},
|
|
1226
411
|
loginPage: async ({ page: page }, use)=>{
|
|
1227
|
-
|
|
1228
|
-
const loginPage = new (0, $c2c31ea6199a3576$export$f14c0e3f98d164c0)(page);
|
|
412
|
+
const loginPage = new (0, $c5e912d43cd579b2$export$f14c0e3f98d164c0)(page);
|
|
1229
413
|
await use(loginPage);
|
|
1230
414
|
return loginPage;
|
|
1231
415
|
},
|
|
1232
|
-
|
|
1233
|
-
const
|
|
1234
|
-
await use(
|
|
1235
|
-
return
|
|
1236
|
-
},
|
|
1237
|
-
applicationPage: async ({ page: page }, use)=>{
|
|
1238
|
-
const applicationPage = new (0, $4e7e9f7ca5788871$export$bf4a5dd3be690f6b)(page);
|
|
1239
|
-
await use(applicationPage);
|
|
1240
|
-
return applicationPage;
|
|
1241
|
-
},
|
|
1242
|
-
tab: async ({ page: page }, use)=>{
|
|
1243
|
-
const tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
1244
|
-
await use(tab);
|
|
1245
|
-
return tab;
|
|
1246
|
-
},
|
|
1247
|
-
environmentPage: async ({ page: page }, use)=>{
|
|
1248
|
-
const environmentPage = new (0, $5a95c11425d050d8$export$2c95c5c5be4fb9b0)(page);
|
|
1249
|
-
await use(environmentPage);
|
|
1250
|
-
return environmentPage;
|
|
1251
|
-
},
|
|
1252
|
-
configurePage: async ({ page: page }, use)=>{
|
|
1253
|
-
const configurePage = new (0, $c4efd1bbc33bdc4e$export$8ef81de2d4ebb0b9)(page);
|
|
1254
|
-
await use(configurePage);
|
|
1255
|
-
return configurePage;
|
|
1256
|
-
},
|
|
1257
|
-
infraPage: async ({ page: page }, use)=>{
|
|
1258
|
-
const infraPage = new (0, $bf1ec3be2f174e87$export$1f6beddb119e759b)(page);
|
|
1259
|
-
await use(infraPage);
|
|
1260
|
-
return infraPage;
|
|
416
|
+
navigation: async ({ page: page }, use)=>{
|
|
417
|
+
const navigationPage = new (0, $95d5ebc9765b570f$export$b8a61e5c71402559)(page);
|
|
418
|
+
await use(navigationPage);
|
|
419
|
+
return navigationPage;
|
|
1261
420
|
}
|
|
1262
421
|
});
|
|
422
|
+
class $114b0b206b8d644f$var$Fixtures {
|
|
423
|
+
constructor(page){
|
|
424
|
+
this.page = page;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
1263
427
|
|
|
1264
428
|
|
|
1265
429
|
|