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