@digital-ai/devops-page-object-deploy 0.0.5 → 0.0.7

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