@mattermost/playwright-lib 10.6.0 → 10.7.0-0

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.
Files changed (82) hide show
  1. package/dist/browser_context.js +21 -14
  2. package/dist/constant.js +6 -3
  3. package/dist/file.js +20 -20
  4. package/dist/flag.js +38 -26
  5. package/dist/global_setup.d.ts +0 -2
  6. package/dist/global_setup.js +32 -43
  7. package/dist/global_setup.js.map +1 -1
  8. package/dist/index.d.ts +0 -1
  9. package/dist/index.js +42 -10
  10. package/dist/index.js.map +1 -1
  11. package/dist/mock_browser_api.js +8 -2
  12. package/dist/server/channel.js +9 -3
  13. package/dist/server/client.js +16 -10
  14. package/dist/server/default_config.js +24 -11
  15. package/dist/server/default_config.js.map +1 -1
  16. package/dist/server/index.d.ts +1 -0
  17. package/dist/server/index.js +1 -0
  18. package/dist/server/init.js +36 -29
  19. package/dist/server/plugins.d.ts +2 -0
  20. package/dist/server/plugins.js +31 -0
  21. package/dist/server/plugins.js.map +1 -0
  22. package/dist/server/post.js +9 -3
  23. package/dist/server/team.js +9 -3
  24. package/dist/server/user.js +15 -8
  25. package/dist/test_action.js +14 -3
  26. package/dist/test_config.js +30 -4
  27. package/dist/test_fixture.d.ts +2 -1
  28. package/dist/test_fixture.js +69 -47
  29. package/dist/test_fixture.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/dist/ui/components/channels/app_bar.js +9 -3
  32. package/dist/ui/components/channels/center_view.js +28 -22
  33. package/dist/ui/components/channels/delete_post_confirmation_dialog.js +14 -8
  34. package/dist/ui/components/channels/delete_post_modal.js +10 -4
  35. package/dist/ui/components/channels/emoji_gif_picker.js +15 -9
  36. package/dist/ui/components/channels/find_channels_modal.js +9 -3
  37. package/dist/ui/components/channels/generic_confirm_modal.js +11 -5
  38. package/dist/ui/components/channels/header.js +9 -3
  39. package/dist/ui/components/channels/message_priority.js +20 -14
  40. package/dist/ui/components/channels/post.js +16 -10
  41. package/dist/ui/components/channels/post_create.js +29 -23
  42. package/dist/ui/components/channels/post_dot_menu.js +9 -3
  43. package/dist/ui/components/channels/post_edit.js +22 -16
  44. package/dist/ui/components/channels/post_menu.js +9 -3
  45. package/dist/ui/components/channels/post_reminder_menu.js +9 -3
  46. package/dist/ui/components/channels/restore_post_confirmation_dialog.js +12 -6
  47. package/dist/ui/components/channels/scheduled_draft_menu.js +9 -3
  48. package/dist/ui/components/channels/scheduled_draft_modal.js +10 -4
  49. package/dist/ui/components/channels/search_popover.js +9 -3
  50. package/dist/ui/components/channels/settings/notification_settings.js +14 -8
  51. package/dist/ui/components/channels/settings/settings_modal.js +13 -7
  52. package/dist/ui/components/channels/sidebar_left.js +14 -8
  53. package/dist/ui/components/channels/sidebar_right.js +26 -20
  54. package/dist/ui/components/channels/thread_footer.js +9 -3
  55. package/dist/ui/components/channels/user_profile_popover.js +9 -3
  56. package/dist/ui/components/footer.js +9 -3
  57. package/dist/ui/components/global_header.d.ts +1 -0
  58. package/dist/ui/components/global_header.js +15 -7
  59. package/dist/ui/components/global_header.js.map +1 -1
  60. package/dist/ui/components/index.js +74 -72
  61. package/dist/ui/components/main_header.js +9 -3
  62. package/dist/ui/components/system_console/navbar.js +9 -3
  63. package/dist/ui/components/system_console/sections/system_users/column_toggle_menu.js +10 -4
  64. package/dist/ui/components/system_console/sections/system_users/feature_discovery.js +10 -4
  65. package/dist/ui/components/system_console/sections/system_users/filter_menu.js +9 -3
  66. package/dist/ui/components/system_console/sections/system_users/filter_popover.js +14 -8
  67. package/dist/ui/components/system_console/sections/system_users/mobile_security.js +9 -3
  68. package/dist/ui/components/system_console/sections/system_users/system_users.js +16 -10
  69. package/dist/ui/components/system_console/sidebar.js +10 -4
  70. package/dist/ui/pages/channels.js +24 -18
  71. package/dist/ui/pages/drafts.js +23 -17
  72. package/dist/ui/pages/index.js +30 -17
  73. package/dist/ui/pages/landing_login.js +11 -5
  74. package/dist/ui/pages/login.js +14 -8
  75. package/dist/ui/pages/reset_password.js +15 -9
  76. package/dist/ui/pages/scheduled_draft.js +25 -19
  77. package/dist/ui/pages/signup.js +17 -11
  78. package/dist/ui/pages/system_console.js +22 -16
  79. package/dist/util.js +19 -8
  80. package/dist/visual/index.js +20 -14
  81. package/dist/visual/percy.js +10 -4
  82. package/package.json +1 -1
@@ -1,26 +1,32 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+ var notification_settings = require('./notification_settings.js');
5
+
1
6
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
7
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- import NotificationsSettings from './notification_settings';
5
- export default class SettingsModal {
8
+ class SettingsModal {
6
9
  container;
7
10
  notificationsSettingsTab;
8
11
  notificationsSettings;
9
12
  constructor(container) {
10
13
  this.container = container;
11
14
  this.notificationsSettingsTab = container.locator('#notificationsButton');
12
- this.notificationsSettings = new NotificationsSettings(container.locator('#notificationsSettings'));
15
+ this.notificationsSettings = new notification_settings(container.locator('#notificationsSettings'));
13
16
  }
14
17
  async toBeVisible() {
15
- await expect(this.container).toBeVisible();
18
+ await test.expect(this.container).toBeVisible();
16
19
  }
17
20
  async openNotificationsTab() {
18
- await expect(this.notificationsSettingsTab).toBeVisible();
21
+ await test.expect(this.notificationsSettingsTab).toBeVisible();
19
22
  await this.notificationsSettingsTab.click();
20
23
  await this.notificationsSettings.toBeVisible();
21
24
  }
22
25
  async closeModal() {
23
26
  await this.container.getByLabel('Close').click();
24
- await expect(this.container).not.toBeVisible();
27
+ await test.expect(this.container).not.toBeVisible();
25
28
  }
26
29
  }
30
+
31
+ module.exports = SettingsModal;
32
+ //# sourceMappingURL=settings_modal.js.map
@@ -1,7 +1,10 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class ChannelsSidebarLeft {
7
+ class ChannelsSidebarLeft {
5
8
  container;
6
9
  findChannelButton;
7
10
  scheduledDraftCountonLHS;
@@ -11,14 +14,14 @@ export default class ChannelsSidebarLeft {
11
14
  this.scheduledDraftCountonLHS = container.locator('span.scheduledPostBadge');
12
15
  }
13
16
  async toBeVisible() {
14
- await expect(this.container).toBeVisible();
17
+ await test.expect(this.container).toBeVisible();
15
18
  }
16
19
  async assertNoPendingScheduledDraft() {
17
- await expect(this.scheduledDraftCountonLHS).not.toBeVisible();
20
+ await test.expect(this.scheduledDraftCountonLHS).not.toBeVisible();
18
21
  }
19
22
  async assertscheduledDraftCountLHS(count) {
20
- await expect(this.scheduledDraftCountonLHS).toBeVisible();
21
- await expect(this.scheduledDraftCountonLHS).toHaveText(count);
23
+ await test.expect(this.scheduledDraftCountonLHS).toBeVisible();
24
+ await test.expect(this.scheduledDraftCountonLHS).toHaveText(count);
22
25
  }
23
26
  /**
24
27
  * Clicks on the sidebar channel link with the given name.
@@ -36,13 +39,16 @@ export default class ChannelsSidebarLeft {
36
39
  async draftsVisible() {
37
40
  const draftSidebarLink = this.container.getByText('Drafts', { exact: true });
38
41
  await draftSidebarLink.waitFor();
39
- await expect(draftSidebarLink).toBeVisible();
42
+ await test.expect(draftSidebarLink).toBeVisible();
40
43
  }
41
44
  /**
42
45
  * Verifies 'Drafts' as a sidebar link does not exist in LHS.
43
46
  */
44
47
  async draftsNotVisible() {
45
48
  const channel = this.container.getByText('Drafts', { exact: true });
46
- await expect(channel).not.toBeVisible();
49
+ await test.expect(channel).not.toBeVisible();
47
50
  }
48
51
  }
52
+
53
+ module.exports = ChannelsSidebarLeft;
54
+ //# sourceMappingURL=sidebar_left.js.map
@@ -1,10 +1,13 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+ var post_create = require('./post_create.js');
5
+ var post_edit = require('./post_edit.js');
6
+ var post = require('./post.js');
7
+
1
8
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
9
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- import ChannelsPostCreate from './post_create';
5
- import ChannelsPostEdit from './post_edit';
6
- import ChannelsPost from './post';
7
- export default class ChannelsSidebarRight {
10
+ class ChannelsSidebarRight {
8
11
  container;
9
12
  closeButton;
10
13
  postCreate;
@@ -24,37 +27,37 @@ export default class ChannelsSidebarRight {
24
27
  this.scheduledDraftSeeAllLink = container.locator('a:has-text("See all")');
25
28
  this.scheduledDraftChannelInfoMessageText = container.locator('span:has-text("Message scheduled for")');
26
29
  this.rhsPostBody = container.locator('.post-message__text');
27
- this.postCreate = new ChannelsPostCreate(container.getByTestId('comment-create'), true);
30
+ this.postCreate = new post_create(container.getByTestId('comment-create'), true);
28
31
  this.closeButton = container.locator('.sidebar--right__close');
29
32
  this.editTextbox = container.locator('#edit_textbox');
30
- this.postEdit = new ChannelsPostEdit(container.locator('.post-edit__container'));
33
+ this.postEdit = new post_edit(container.locator('.post-edit__container'));
31
34
  this.currentVersionEditedPosttext = (postID) => container.locator(`#rhsPostMessageText_${postID} p`);
32
35
  this.restorePreviousPostVersionIcon = container.locator('button[aria-label="Select to restore an old message."]');
33
36
  }
34
37
  async toBeVisible() {
35
- await expect(this.container).toBeVisible();
38
+ await test.expect(this.container).toBeVisible();
36
39
  }
37
40
  /**
38
41
  * Returns the RHS post by post id
39
42
  * @param postId Just the ID without the prefix
40
43
  */
41
44
  async getPostById(postId) {
42
- const post = this.container.locator(`[id="rhsPost_${postId}"]`);
43
- await post.waitFor();
44
- return new ChannelsPost(post);
45
+ const post$1 = this.container.locator(`[id="rhsPost_${postId}"]`);
46
+ await post$1.waitFor();
47
+ return new post(post$1);
45
48
  }
46
49
  /**
47
50
  * Return the last post in the RHS
48
51
  */
49
52
  async getLastPost() {
50
- const post = this.container.getByTestId('rhsPostView').last();
51
- await post.waitFor();
52
- return new ChannelsPost(post);
53
+ const post$1 = this.container.getByTestId('rhsPostView').last();
54
+ await post$1.waitFor();
55
+ return new post(post$1);
53
56
  }
54
57
  async getFirstPost() {
55
- const post = this.container.getByTestId('rhsPostView').first();
56
- await post.waitFor();
57
- return new ChannelsPost(post);
58
+ const post$1 = this.container.getByTestId('rhsPostView').first();
59
+ await post$1.waitFor();
60
+ return new post(post$1);
58
61
  }
59
62
  /**
60
63
  * Closes the RHS
@@ -62,20 +65,23 @@ export default class ChannelsSidebarRight {
62
65
  async close() {
63
66
  await this.closeButton.waitFor();
64
67
  await this.closeButton.click();
65
- await expect(this.container).not.toBeVisible();
68
+ await test.expect(this.container).not.toBeVisible();
66
69
  }
67
70
  async clickOnSeeAllscheduledDrafts() {
68
71
  await this.scheduledDraftSeeAllLink.isVisible();
69
72
  await this.scheduledDraftSeeAllLink.click();
70
73
  }
71
74
  async toContainText(text) {
72
- await expect(this.container).toContainText(text);
75
+ await test.expect(this.container).toContainText(text);
73
76
  }
74
77
  async verifyCurrentVersionPostMessage(postID, postMessageContent) {
75
- expect(await this.currentVersionEditedPosttext(postID).textContent()).toBe(postMessageContent);
78
+ test.expect(await this.currentVersionEditedPosttext(postID).textContent()).toBe(postMessageContent);
76
79
  }
77
80
  async restorePreviousPostVersion() {
78
81
  await this.restorePreviousPostVersionIcon.isVisible();
79
82
  await this.restorePreviousPostVersionIcon.click();
80
83
  }
81
84
  }
85
+
86
+ module.exports = ChannelsSidebarRight;
87
+ //# sourceMappingURL=sidebar_right.js.map
@@ -1,7 +1,10 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class ThreadFooter {
7
+ class ThreadFooter {
5
8
  container;
6
9
  replyButton;
7
10
  constructor(container) {
@@ -9,7 +12,7 @@ export default class ThreadFooter {
9
12
  this.replyButton = container.locator('.ReplyButton');
10
13
  }
11
14
  async toBeVisible() {
12
- await expect(this.container).toBeVisible();
15
+ await test.expect(this.container).toBeVisible();
13
16
  }
14
17
  /**
15
18
  * Clicks on the reply button in the thread footer to open the thread in RHS.
@@ -19,3 +22,6 @@ export default class ThreadFooter {
19
22
  await this.replyButton.click();
20
23
  }
21
24
  }
25
+
26
+ module.exports = ThreadFooter;
27
+ //# sourceMappingURL=thread_footer.js.map
@@ -1,15 +1,21 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class UserProfilePopover {
7
+ class UserProfilePopover {
5
8
  container;
6
9
  constructor(container) {
7
10
  this.container = container;
8
11
  }
9
12
  async toBeVisible() {
10
- await expect(this.container).toBeVisible();
13
+ await test.expect(this.container).toBeVisible();
11
14
  }
12
15
  async close() {
13
16
  await this.container.getByLabel('Close user profile popover').click();
14
17
  }
15
18
  }
19
+
20
+ module.exports = UserProfilePopover;
21
+ //# sourceMappingURL=user_profile_popover.js.map
@@ -1,7 +1,10 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class Footer {
7
+ class Footer {
5
8
  container;
6
9
  copyright;
7
10
  aboutLink;
@@ -17,6 +20,9 @@ export default class Footer {
17
20
  this.helpLink = container.locator('text=Help');
18
21
  }
19
22
  async toBeVisible() {
20
- await expect(this.copyright).toBeVisible();
23
+ await test.expect(this.copyright).toBeVisible();
21
24
  }
22
25
  }
26
+
27
+ module.exports = Footer;
28
+ //# sourceMappingURL=footer.js.map
@@ -1,6 +1,7 @@
1
1
  import { Locator } from '@playwright/test';
2
2
  export default class GlobalHeader {
3
3
  readonly container: Locator;
4
+ readonly accountMenuButton: Locator;
4
5
  readonly productSwitchMenu: Locator;
5
6
  readonly recentMentionsButton: Locator;
6
7
  readonly settingsButton: Locator;
@@ -1,40 +1,48 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class GlobalHeader {
7
+ class GlobalHeader {
5
8
  container;
9
+ accountMenuButton;
6
10
  productSwitchMenu;
7
11
  recentMentionsButton;
8
12
  settingsButton;
9
13
  searchBox;
10
14
  constructor(container) {
11
15
  this.container = container;
16
+ this.accountMenuButton = container.getByRole('button', { name: "'s account menu" });
12
17
  this.productSwitchMenu = container.getByRole('button', { name: 'Product switch menu' });
13
18
  this.recentMentionsButton = container.getByRole('button', { name: 'Recent mentions' });
14
19
  this.settingsButton = container.getByRole('button', { name: 'Settings' });
15
20
  this.searchBox = container.locator('#searchFormContainer');
16
21
  }
17
22
  async toBeVisible(name) {
18
- await expect(this.container.getByRole('heading', { name })).toBeVisible();
23
+ await test.expect(this.container.getByRole('heading', { name })).toBeVisible();
19
24
  }
20
25
  async switchProduct(name) {
21
26
  await this.productSwitchMenu.click();
22
27
  await this.container.getByRole('link', { name }).click();
23
28
  }
24
29
  async openSettings() {
25
- await expect(this.settingsButton).toBeVisible();
30
+ await test.expect(this.settingsButton).toBeVisible();
26
31
  await this.settingsButton.click();
27
32
  }
28
33
  async openRecentMentions() {
29
- await expect(this.recentMentionsButton).toBeVisible();
34
+ await test.expect(this.recentMentionsButton).toBeVisible();
30
35
  await this.recentMentionsButton.click();
31
36
  }
32
37
  async openSearch() {
33
- await expect(this.searchBox).toBeVisible();
38
+ await test.expect(this.searchBox).toBeVisible();
34
39
  await this.searchBox.click();
35
40
  }
36
41
  async closeSearch() {
37
- await expect(this.searchBox).toBeVisible();
42
+ await test.expect(this.searchBox).toBeVisible();
38
43
  await this.searchBox.getByTestId('searchBoxClose').click();
39
44
  }
40
45
  }
46
+
47
+ module.exports = GlobalHeader;
48
+ //# sourceMappingURL=global_header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global_header.js","sources":["../../../src/ui/components/global_header.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Locator, expect} from '@playwright/test';\n\nexport default class GlobalHeader {\n readonly container: Locator;\n\n readonly productSwitchMenu;\n readonly recentMentionsButton;\n readonly settingsButton;\n readonly searchBox;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.productSwitchMenu = container.getByRole('button', {name: 'Product switch menu'});\n this.recentMentionsButton = container.getByRole('button', {name: 'Recent mentions'});\n this.settingsButton = container.getByRole('button', {name: 'Settings'});\n this.searchBox = container.locator('#searchFormContainer');\n }\n\n async toBeVisible(name: string) {\n await expect(this.container.getByRole('heading', {name})).toBeVisible();\n }\n\n async switchProduct(name: string) {\n await this.productSwitchMenu.click();\n await this.container.getByRole('link', {name}).click();\n }\n\n async openSettings() {\n await expect(this.settingsButton).toBeVisible();\n await this.settingsButton.click();\n }\n\n async openRecentMentions() {\n await expect(this.recentMentionsButton).toBeVisible();\n await this.recentMentionsButton.click();\n }\n\n async openSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.click();\n }\n\n async closeSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.getByTestId('searchBoxClose').click();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,YAAY,CAAA;AACpB,IAAA,SAAS;AAET,IAAA,iBAAiB;AACjB,IAAA,oBAAoB;AACpB,IAAA,cAAc;AACd,IAAA,SAAS;AAElB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;AACrF,QAAA,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;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"global_header.js","sources":["../../../src/ui/components/global_header.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Locator, expect} from '@playwright/test';\n\nexport default class GlobalHeader {\n readonly container: Locator;\n\n readonly accountMenuButton;\n readonly productSwitchMenu;\n readonly recentMentionsButton;\n readonly settingsButton;\n readonly searchBox;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.accountMenuButton = container.getByRole('button', {name: \"'s account menu\"});\n this.productSwitchMenu = container.getByRole('button', {name: 'Product switch menu'});\n this.recentMentionsButton = container.getByRole('button', {name: 'Recent mentions'});\n this.settingsButton = container.getByRole('button', {name: 'Settings'});\n this.searchBox = container.locator('#searchFormContainer');\n }\n\n async toBeVisible(name: string) {\n await expect(this.container.getByRole('heading', {name})).toBeVisible();\n }\n\n async switchProduct(name: string) {\n await this.productSwitchMenu.click();\n await this.container.getByRole('link', {name}).click();\n }\n\n async openSettings() {\n await expect(this.settingsButton).toBeVisible();\n await this.settingsButton.click();\n }\n\n async openRecentMentions() {\n await expect(this.recentMentionsButton).toBeVisible();\n await this.recentMentionsButton.click();\n }\n\n async openSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.click();\n }\n\n async closeSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.getByTestId('searchBoxClose').click();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,YAAY,CAAA;AACpB,IAAA,SAAS;AAET,IAAA,iBAAiB;AACjB,IAAA,iBAAiB;AACjB,IAAA,oBAAoB;AACpB,IAAA,cAAc;AACd,IAAA,SAAS;AAElB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;AACjF,QAAA,IAAI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;AAGhC,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;QAC1C,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE;;AAEjE;;;;"}
@@ -1,75 +1,77 @@
1
+ 'use strict';
2
+
3
+ require('@playwright/test');
4
+ var app_bar = require('./channels/app_bar.js');
5
+ require('node:path');
6
+ require('uuid');
7
+ require('../../file.js');
8
+ require('async-wait-until');
9
+ var center_view = require('./channels/center_view.js');
10
+ var sidebar_left = require('./channels/sidebar_left.js');
11
+ var sidebar_right = require('./channels/sidebar_right.js');
12
+ var delete_post_modal = require('./channels/delete_post_modal.js');
13
+ var find_channels_modal = require('./channels/find_channels_modal.js');
14
+ var settings_modal = require('./channels/settings/settings_modal.js');
15
+ var footer = require('./footer.js');
16
+ var global_header = require('./global_header.js');
17
+ var search_popover = require('./channels/search_popover.js');
18
+ var main_header = require('./main_header.js');
19
+ var post_dot_menu = require('./channels/post_dot_menu.js');
20
+ var post_reminder_menu = require('./channels/post_reminder_menu.js');
21
+ var emoji_gif_picker = require('./channels/emoji_gif_picker.js');
22
+ var generic_confirm_modal = require('./channels/generic_confirm_modal.js');
23
+ var message_priority = require('./channels/message_priority.js');
24
+ var scheduled_draft_menu = require('./channels/scheduled_draft_menu.js');
25
+ var scheduled_draft_modal = require('./channels/scheduled_draft_modal.js');
26
+ var user_profile_popover = require('./channels/user_profile_popover.js');
27
+ var sidebar = require('./system_console/sidebar.js');
28
+ var navbar = require('./system_console/navbar.js');
29
+ var system_users = require('./system_console/sections/system_users/system_users.js');
30
+ var filter_popover = require('./system_console/sections/system_users/filter_popover.js');
31
+ var filter_menu = require('./system_console/sections/system_users/filter_menu.js');
32
+ var column_toggle_menu = require('./system_console/sections/system_users/column_toggle_menu.js');
33
+ var feature_discovery = require('./system_console/sections/system_users/feature_discovery.js');
34
+ var mobile_security = require('./system_console/sections/system_users/mobile_security.js');
35
+
1
36
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
37
  // See LICENSE.txt for license information.
3
- import ChannelsHeader from './channels/header';
4
- import ChannelsAppBar from './channels/app_bar';
5
- import ChannelsPostCreate from './channels/post_create';
6
- import ChannelsPost from './channels/post';
7
- import ChannelsCenterView from './channels/center_view';
8
- import ChannelsSidebarLeft from './channels/sidebar_left';
9
- import ChannelsSidebarRight from './channels/sidebar_right';
10
- import DeletePostModal from './channels/delete_post_modal';
11
- import FindChannelsModal from './channels/find_channels_modal';
12
- import SettingsModal from './channels/settings/settings_modal';
13
- import Footer from './footer';
14
- import GlobalHeader from './global_header';
15
- import SearchPopover from './channels/search_popover';
16
- import MainHeader from './main_header';
17
- import PostDotMenu from './channels/post_dot_menu';
18
- import PostReminderMenu from './channels/post_reminder_menu';
19
- import PostMenu from './channels/post_menu';
20
- import ThreadFooter from './channels/thread_footer';
21
- import EmojiGifPicker from './channels/emoji_gif_picker';
22
- import GenericConfirmModal from './channels/generic_confirm_modal';
23
- import MessagePriority from './channels/message_priority';
24
- import ScheduledDraftMenu from './channels/scheduled_draft_menu';
25
- import ScheduledDraftModal from './channels/scheduled_draft_modal';
26
- import UserProfilePopover from './channels/user_profile_popover';
27
- import SystemConsoleSidebar from './system_console/sidebar';
28
- import SystemConsoleNavbar from './system_console/navbar';
29
- import SystemUsers from './system_console/sections/system_users/system_users';
30
- import SystemUsersFilterPopover from './system_console/sections/system_users/filter_popover';
31
- import SystemUsersFilterMenu from './system_console/sections/system_users/filter_menu';
32
- import SystemUsersColumnToggleMenu from './system_console/sections/system_users/column_toggle_menu';
33
- import ChannelsPostEdit from './channels/post_edit';
34
- import DeletePostConfirmationDialog from './channels/delete_post_confirmation_dialog';
35
- import RestorePostConfirmationDialog from './channels/restore_post_confirmation_dialog';
36
- import SystemConsoleFeatureDiscovery from './system_console/sections/system_users/feature_discovery';
37
- import SystemConsoleMobileSecurity from './system_console/sections/system_users/mobile_security';
38
38
  const components = {
39
- GlobalHeader,
40
- SearchPopover,
41
- ChannelsCenterView,
42
- ChannelsSidebarLeft,
43
- ChannelsSidebarRight,
44
- ChannelsAppBar,
45
- ChannelsHeader,
46
- ChannelsPostCreate,
47
- ChannelsPostEdit,
48
- ChannelsPost,
49
- FindChannelsModal,
50
- DeletePostModal,
51
- SettingsModal,
52
- PostDotMenu,
53
- PostMenu,
54
- ThreadFooter,
55
- Footer,
56
- MainHeader,
57
- PostReminderMenu,
58
- EmojiGifPicker,
59
- GenericConfirmModal,
60
- ScheduledDraftMenu,
61
- ScheduledDraftModal,
62
- SystemConsoleSidebar,
63
- SystemConsoleNavbar,
64
- SystemUsers,
65
- SystemUsersFilterPopover,
66
- SystemUsersFilterMenu,
67
- SystemUsersColumnToggleMenu,
68
- SystemConsoleFeatureDiscovery,
69
- SystemConsoleMobileSecurity,
70
- MessagePriority,
71
- UserProfilePopover,
72
- DeletePostConfirmationDialog,
73
- RestorePostConfirmationDialog,
74
- };
75
- export { components, GlobalHeader, ChannelsCenterView, ChannelsSidebarLeft, ChannelsSidebarRight, ChannelsAppBar, ChannelsHeader, ChannelsPostCreate, ChannelsPostEdit, ChannelsPost, FindChannelsModal, DeletePostModal, PostDotMenu, PostMenu, ThreadFooter, MessagePriority, DeletePostConfirmationDialog, };
39
+ GlobalHeader: global_header,
40
+ SearchPopover: search_popover,
41
+ ChannelsCenterView: center_view,
42
+ ChannelsSidebarLeft: sidebar_left,
43
+ ChannelsSidebarRight: sidebar_right,
44
+ ChannelsAppBar: app_bar,
45
+ FindChannelsModal: find_channels_modal,
46
+ DeletePostModal: delete_post_modal,
47
+ SettingsModal: settings_modal,
48
+ PostDotMenu: post_dot_menu,
49
+ Footer: footer,
50
+ MainHeader: main_header,
51
+ PostReminderMenu: post_reminder_menu,
52
+ EmojiGifPicker: emoji_gif_picker,
53
+ GenericConfirmModal: generic_confirm_modal,
54
+ ScheduledDraftMenu: scheduled_draft_menu,
55
+ ScheduledDraftModal: scheduled_draft_modal,
56
+ SystemConsoleSidebar: sidebar,
57
+ SystemConsoleNavbar: navbar,
58
+ SystemUsers: system_users,
59
+ SystemUsersFilterPopover: filter_popover,
60
+ SystemUsersFilterMenu: filter_menu,
61
+ SystemUsersColumnToggleMenu: column_toggle_menu,
62
+ SystemConsoleFeatureDiscovery: feature_discovery,
63
+ SystemConsoleMobileSecurity: mobile_security,
64
+ MessagePriority: message_priority,
65
+ UserProfilePopover: user_profile_popover};
66
+
67
+ exports.ChannelsAppBar = app_bar;
68
+ exports.ChannelsCenterView = center_view;
69
+ exports.ChannelsSidebarLeft = sidebar_left;
70
+ exports.ChannelsSidebarRight = sidebar_right;
71
+ exports.DeletePostModal = delete_post_modal;
72
+ exports.FindChannelsModal = find_channels_modal;
73
+ exports.GlobalHeader = global_header;
74
+ exports.PostDotMenu = post_dot_menu;
75
+ exports.MessagePriority = message_priority;
76
+ exports.components = components;
77
+ //# sourceMappingURL=index.js.map
@@ -1,7 +1,10 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class MainHeader {
7
+ class MainHeader {
5
8
  container;
6
9
  logo;
7
10
  backButton;
@@ -11,6 +14,9 @@ export default class MainHeader {
11
14
  this.backButton = container.getByTestId('back_button');
12
15
  }
13
16
  async toBeVisible() {
14
- await expect(this.container).toBeVisible();
17
+ await test.expect(this.container).toBeVisible();
15
18
  }
16
19
  }
20
+
21
+ module.exports = MainHeader;
22
+ //# sourceMappingURL=main_header.js.map
@@ -1,12 +1,18 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class SystemConsoleNavbar {
7
+ class SystemConsoleNavbar {
5
8
  container;
6
9
  constructor(container) {
7
10
  this.container = container;
8
11
  }
9
12
  async toBeVisible() {
10
- await expect(this.container).toBeVisible();
13
+ await test.expect(this.container).toBeVisible();
11
14
  }
12
15
  }
16
+
17
+ module.exports = SystemConsoleNavbar;
18
+ //# sourceMappingURL=navbar.js.map
@@ -1,13 +1,16 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
- export default class SystemUsersColumnToggleMenu {
7
+ class SystemUsersColumnToggleMenu {
5
8
  container;
6
9
  constructor(container) {
7
10
  this.container = container;
8
11
  }
9
12
  async toBeVisible() {
10
- await expect(this.container).toBeVisible();
13
+ await test.expect(this.container).toBeVisible();
11
14
  }
12
15
  /**
13
16
  * Return the locator for the menu item with the given name.
@@ -36,6 +39,9 @@ export default class SystemUsersColumnToggleMenu {
36
39
  */
37
40
  async close() {
38
41
  await this.container.press('Escape');
39
- await expect(this.container).not.toBeVisible();
42
+ await test.expect(this.container).not.toBeVisible();
40
43
  }
41
44
  }
45
+
46
+ module.exports = SystemUsersColumnToggleMenu;
47
+ //# sourceMappingURL=column_toggle_menu.js.map
@@ -1,18 +1,24 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
7
  /**
5
8
  * System Console -> Feature Discovery
6
9
  */
7
- export default class FeatureDiscovery {
10
+ class FeatureDiscovery {
8
11
  container;
9
12
  constructor(container) {
10
13
  this.container = container;
11
14
  }
12
15
  async toBeVisible() {
13
- await expect(this.container).toBeVisible();
16
+ await test.expect(this.container).toBeVisible();
14
17
  }
15
18
  async toHaveTitle(title) {
16
- await expect(this.container.getByTestId('featureDiscovery_title')).toHaveText(title);
19
+ await test.expect(this.container.getByTestId('featureDiscovery_title')).toHaveText(title);
17
20
  }
18
21
  }
22
+
23
+ module.exports = FeatureDiscovery;
24
+ //# sourceMappingURL=feature_discovery.js.map
@@ -1,16 +1,19 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
1
5
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2
6
  // See LICENSE.txt for license information.
3
- import { expect } from '@playwright/test';
4
7
  /**
5
8
  * The dropdown menu which appears for both Role and Status filter.
6
9
  */
7
- export default class SystemUsersFilterMenu {
10
+ class SystemUsersFilterMenu {
8
11
  container;
9
12
  constructor(container) {
10
13
  this.container = container;
11
14
  }
12
15
  async toBeVisible() {
13
- await expect(this.container).toBeVisible();
16
+ await test.expect(this.container).toBeVisible();
14
17
  }
15
18
  /**
16
19
  * Return the locator for the menu item with the given name.
@@ -34,3 +37,6 @@ export default class SystemUsersFilterMenu {
34
37
  await this.container.press('Escape');
35
38
  }
36
39
  }
40
+
41
+ module.exports = SystemUsersFilterMenu;
42
+ //# sourceMappingURL=filter_menu.js.map