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