@mattermost/playwright-lib 10.7.0 → 11.3.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 (217) hide show
  1. package/dist/browser_context.d.ts +4 -2
  2. package/dist/browser_context.js +24 -4
  3. package/dist/browser_context.js.map +1 -1
  4. package/dist/constant.d.ts +2 -0
  5. package/dist/constant.js +5 -0
  6. package/dist/constant.js.map +1 -1
  7. package/dist/file.js +2 -1
  8. package/dist/file.js.map +1 -1
  9. package/dist/flag.js +1 -1
  10. package/dist/flag.js.map +1 -1
  11. package/dist/global_setup.js +26 -4
  12. package/dist/global_setup.js.map +1 -1
  13. package/dist/index.d.ts +2 -1
  14. package/dist/index.js +93 -3
  15. package/dist/index.js.map +1 -1
  16. package/dist/mock_browser_api.js.map +1 -1
  17. package/dist/server/channel.js.map +1 -1
  18. package/dist/server/client.d.ts +6 -0
  19. package/dist/server/client.js +6 -0
  20. package/dist/server/client.js.map +1 -1
  21. package/dist/server/default_config.d.ts +1 -0
  22. package/dist/server/default_config.js +100 -29
  23. package/dist/server/default_config.js.map +1 -1
  24. package/dist/server/index.d.ts +3 -3
  25. package/dist/server/index.js +9 -0
  26. package/dist/server/init.d.ts +9 -8
  27. package/dist/server/init.js +3 -11
  28. package/dist/server/init.js.map +1 -1
  29. package/dist/server/post.js.map +1 -1
  30. package/dist/server/team.d.ts +8 -1
  31. package/dist/server/team.js +13 -2
  32. package/dist/server/team.js.map +1 -1
  33. package/dist/server/user.d.ts +9 -2
  34. package/dist/server/user.js +36 -2
  35. package/dist/server/user.js.map +1 -1
  36. package/dist/test_action.d.ts +9 -0
  37. package/dist/test_action.js +39 -2
  38. package/dist/test_action.js.map +1 -1
  39. package/dist/test_config.js +1 -1
  40. package/dist/test_config.js.map +1 -1
  41. package/dist/test_fixture.d.ts +10 -3
  42. package/dist/test_fixture.js +19 -4
  43. package/dist/test_fixture.js.map +1 -1
  44. package/dist/tsconfig.tsbuildinfo +1 -0
  45. package/dist/types.d.ts +1 -0
  46. package/dist/types.js +3 -0
  47. package/dist/ui/components/channels/app_bar.js.map +1 -1
  48. package/dist/ui/components/channels/center_view.d.ts +17 -13
  49. package/dist/ui/components/channels/center_view.js +55 -25
  50. package/dist/ui/components/channels/center_view.js.map +1 -1
  51. package/dist/ui/components/channels/channel_settings/channel_settings_modal.d.ts +17 -0
  52. package/dist/ui/components/channels/channel_settings/channel_settings_modal.js +49 -0
  53. package/dist/ui/components/channels/channel_settings/channel_settings_modal.js.map +1 -0
  54. package/dist/ui/components/channels/channel_settings/configuration_settings.d.ts +11 -0
  55. package/dist/ui/components/channels/channel_settings/configuration_settings.js +48 -0
  56. package/dist/ui/components/channels/channel_settings/configuration_settings.js.map +1 -0
  57. package/dist/ui/components/channels/{scheduled_draft_menu.d.ts → channel_settings/info_settings.d.ts} +1 -3
  58. package/dist/ui/components/channels/channel_settings/info_settings.js +18 -0
  59. package/dist/ui/components/channels/channel_settings/info_settings.js.map +1 -0
  60. package/dist/ui/components/channels/delete_post_confirmation_dialog.js.map +1 -1
  61. package/dist/ui/components/channels/delete_post_modal.js.map +1 -1
  62. package/dist/ui/components/channels/delete_scheduled_post_modal.d.ts +10 -0
  63. package/dist/ui/components/channels/delete_scheduled_post_modal.js +26 -0
  64. package/dist/ui/components/channels/delete_scheduled_post_modal.js.map +1 -0
  65. package/dist/ui/components/channels/draft_post.d.ts +16 -0
  66. package/dist/ui/components/channels/draft_post.js +39 -0
  67. package/dist/ui/components/channels/draft_post.js.map +1 -0
  68. package/dist/ui/components/channels/emoji_gif_picker.d.ts +2 -0
  69. package/dist/ui/components/channels/emoji_gif_picker.js +6 -0
  70. package/dist/ui/components/channels/emoji_gif_picker.js.map +1 -1
  71. package/dist/ui/components/channels/find_channels_modal.js.map +1 -1
  72. package/dist/ui/components/channels/flag_post_confirmation_dialog.d.ts +24 -0
  73. package/dist/ui/components/channels/flag_post_confirmation_dialog.js +74 -0
  74. package/dist/ui/components/channels/flag_post_confirmation_dialog.js.map +1 -0
  75. package/dist/ui/components/channels/generic_confirm_modal.js.map +1 -1
  76. package/dist/ui/components/channels/header.d.ts +2 -0
  77. package/dist/ui/components/channels/header.js +6 -0
  78. package/dist/ui/components/channels/header.js.map +1 -1
  79. package/dist/ui/components/channels/invite_people_modal.d.ts +6 -0
  80. package/dist/ui/components/channels/invite_people_modal.js +18 -0
  81. package/dist/ui/components/channels/invite_people_modal.js.map +1 -0
  82. package/dist/ui/components/channels/message_priority.d.ts +0 -1
  83. package/dist/ui/components/channels/message_priority.js +2 -7
  84. package/dist/ui/components/channels/message_priority.js.map +1 -1
  85. package/dist/ui/components/channels/post.d.ts +7 -0
  86. package/dist/ui/components/channels/post.js +18 -0
  87. package/dist/ui/components/channels/post.js.map +1 -1
  88. package/dist/ui/components/channels/post_create.d.ts +1 -5
  89. package/dist/ui/components/channels/post_create.js +3 -12
  90. package/dist/ui/components/channels/post_create.js.map +1 -1
  91. package/dist/ui/components/channels/post_dot_menu.d.ts +2 -0
  92. package/dist/ui/components/channels/post_dot_menu.js +5 -0
  93. package/dist/ui/components/channels/post_dot_menu.js.map +1 -1
  94. package/dist/ui/components/channels/post_edit.js.map +1 -1
  95. package/dist/ui/components/channels/post_menu.js.map +1 -1
  96. package/dist/ui/components/channels/post_reminder_menu.js.map +1 -1
  97. package/dist/ui/components/channels/profile_modal.d.ts +27 -0
  98. package/dist/ui/components/channels/profile_modal.js +66 -0
  99. package/dist/ui/components/channels/profile_modal.js.map +1 -0
  100. package/dist/ui/components/channels/restore_post_confirmation_dialog.js.map +1 -1
  101. package/dist/ui/components/channels/schedule_message_menu.d.ts +12 -0
  102. package/dist/ui/components/channels/schedule_message_menu.js +31 -0
  103. package/dist/ui/components/channels/schedule_message_menu.js.map +1 -0
  104. package/dist/ui/components/channels/schedule_message_modal.d.ts +20 -0
  105. package/dist/ui/components/channels/schedule_message_modal.js +91 -0
  106. package/dist/ui/components/channels/schedule_message_modal.js.map +1 -0
  107. package/dist/ui/components/channels/scheduled_draft_modal.js.map +1 -1
  108. package/dist/ui/components/channels/scheduled_post.d.ts +20 -0
  109. package/dist/ui/components/channels/scheduled_post.js +47 -0
  110. package/dist/ui/components/channels/scheduled_post.js.map +1 -0
  111. package/dist/ui/components/channels/scheduled_post_indicator.d.ts +12 -0
  112. package/dist/ui/components/channels/scheduled_post_indicator.js +32 -0
  113. package/dist/ui/components/channels/scheduled_post_indicator.js.map +1 -0
  114. package/dist/ui/components/channels/{search_popover.d.ts → search_box.d.ts} +1 -1
  115. package/dist/ui/components/channels/{search_popover.js → search_box.js} +4 -3
  116. package/dist/ui/components/channels/search_box.js.map +1 -0
  117. package/dist/ui/components/channels/send_message_now_modal.d.ts +10 -0
  118. package/dist/ui/components/channels/send_message_now_modal.js +26 -0
  119. package/dist/ui/components/channels/send_message_now_modal.js.map +1 -0
  120. package/dist/ui/components/channels/settings/advanced_settings.d.ts +15 -0
  121. package/dist/ui/components/channels/settings/advanced_settings.js +35 -0
  122. package/dist/ui/components/channels/settings/advanced_settings.js.map +1 -0
  123. package/dist/ui/components/channels/settings/display_settings.d.ts +27 -0
  124. package/dist/ui/components/channels/settings/display_settings.js +77 -0
  125. package/dist/ui/components/channels/settings/display_settings.js.map +1 -0
  126. package/dist/ui/components/channels/settings/{notification_settings.d.ts → notifications_settings.d.ts} +12 -0
  127. package/dist/ui/components/channels/settings/{notification_settings.js → notifications_settings.js} +23 -1
  128. package/dist/ui/components/channels/settings/notifications_settings.js.map +1 -0
  129. package/dist/ui/components/channels/settings/settings_modal.d.ts +19 -4
  130. package/dist/ui/components/channels/settings/settings_modal.js +48 -7
  131. package/dist/ui/components/channels/settings/settings_modal.js.map +1 -1
  132. package/dist/ui/components/channels/settings/sidebar_settings.d.ts +12 -0
  133. package/dist/ui/components/channels/settings/sidebar_settings.js +28 -0
  134. package/dist/ui/components/channels/settings/sidebar_settings.js.map +1 -0
  135. package/dist/ui/components/channels/sidebar_left.d.ts +16 -3
  136. package/dist/ui/components/channels/sidebar_left.js +26 -9
  137. package/dist/ui/components/channels/sidebar_left.js.map +1 -1
  138. package/dist/ui/components/channels/sidebar_right.d.ts +3 -2
  139. package/dist/ui/components/channels/sidebar_right.js +6 -6
  140. package/dist/ui/components/channels/sidebar_right.js.map +1 -1
  141. package/dist/ui/components/channels/team_menu.d.ts +19 -0
  142. package/dist/ui/components/channels/team_menu.js +51 -0
  143. package/dist/ui/components/channels/team_menu.js.map +1 -0
  144. package/dist/ui/components/channels/team_settings/team_settings_modal.d.ts +6 -0
  145. package/dist/ui/components/channels/team_settings/team_settings_modal.js +18 -0
  146. package/dist/ui/components/channels/team_settings/team_settings_modal.js.map +1 -0
  147. package/dist/ui/components/channels/thread_footer.js.map +1 -1
  148. package/dist/ui/components/channels/user_profile_popover.js.map +1 -1
  149. package/dist/ui/components/footer.js.map +1 -1
  150. package/dist/ui/components/global_header.d.ts +7 -2
  151. package/dist/ui/components/global_header.js +13 -1
  152. package/dist/ui/components/global_header.js.map +1 -1
  153. package/dist/ui/components/index.d.ts +33 -5
  154. package/dist/ui/components/index.js +90 -10
  155. package/dist/ui/components/index.js.map +1 -1
  156. package/dist/ui/components/main_header.js.map +1 -1
  157. package/dist/ui/components/system_console/navbar.js.map +1 -1
  158. package/dist/ui/components/system_console/sections/site_configuration/notifications.d.ts +24 -0
  159. package/dist/ui/components/system_console/sections/site_configuration/notifications.js +63 -0
  160. package/dist/ui/components/system_console/sections/site_configuration/notifications.js.map +1 -0
  161. package/dist/ui/components/system_console/sections/system_users/column_toggle_menu.js.map +1 -1
  162. package/dist/ui/components/system_console/sections/system_users/feature_discovery.js.map +1 -1
  163. package/dist/ui/components/system_console/sections/system_users/filter_menu.js.map +1 -1
  164. package/dist/ui/components/system_console/sections/system_users/filter_popover.js.map +1 -1
  165. package/dist/ui/components/system_console/sections/system_users/mobile_security.d.ts +29 -2
  166. package/dist/ui/components/system_console/sections/system_users/mobile_security.js +75 -1
  167. package/dist/ui/components/system_console/sections/system_users/mobile_security.js.map +1 -1
  168. package/dist/ui/components/system_console/sections/system_users/system_users.js.map +1 -1
  169. package/dist/ui/components/system_console/sidebar.js.map +1 -1
  170. package/dist/ui/components/user_account_menu.d.ts +13 -0
  171. package/dist/ui/components/user_account_menu.js +32 -0
  172. package/dist/ui/components/user_account_menu.js.map +1 -0
  173. package/dist/ui/pages/channels.d.ts +46 -11
  174. package/dist/ui/pages/channels.js +119 -12
  175. package/dist/ui/pages/channels.js.map +1 -1
  176. package/dist/ui/pages/content_review_dm.d.ts +44 -0
  177. package/dist/ui/pages/content_review_dm.js +154 -0
  178. package/dist/ui/pages/content_review_dm.js.map +1 -0
  179. package/dist/ui/pages/drafts.d.ts +9 -25
  180. package/dist/ui/pages/drafts.js +25 -94
  181. package/dist/ui/pages/drafts.js.map +1 -1
  182. package/dist/ui/pages/index.d.ts +9 -5
  183. package/dist/ui/pages/index.js +10 -5
  184. package/dist/ui/pages/index.js.map +1 -1
  185. package/dist/ui/pages/landing_login.js.map +1 -1
  186. package/dist/ui/pages/login.d.ts +2 -2
  187. package/dist/ui/pages/login.js +1 -1
  188. package/dist/ui/pages/login.js.map +1 -1
  189. package/dist/ui/pages/reset_password.d.ts +2 -2
  190. package/dist/ui/pages/reset_password.js +1 -1
  191. package/dist/ui/pages/reset_password.js.map +1 -1
  192. package/dist/ui/pages/scheduled_posts.d.ts +23 -0
  193. package/dist/ui/pages/scheduled_posts.js +63 -0
  194. package/dist/ui/pages/scheduled_posts.js.map +1 -0
  195. package/dist/ui/pages/signup.d.ts +2 -2
  196. package/dist/ui/pages/signup.js +1 -1
  197. package/dist/ui/pages/signup.js.map +1 -1
  198. package/dist/ui/pages/system_console.d.ts +16 -14
  199. package/dist/ui/pages/system_console.js +10 -1
  200. package/dist/ui/pages/system_console.js.map +1 -1
  201. package/dist/ui/pages/threads.d.ts +13 -0
  202. package/dist/ui/pages/threads.js +44 -0
  203. package/dist/ui/pages/threads.js.map +1 -0
  204. package/dist/util.d.ts +17 -4
  205. package/dist/util.js +65 -5
  206. package/dist/util.js.map +1 -1
  207. package/dist/visual/index.js +9 -3
  208. package/dist/visual/index.js.map +1 -1
  209. package/dist/visual/percy.js.map +1 -1
  210. package/package.json +14 -15
  211. package/dist/ui/components/channels/scheduled_draft_menu.js +0 -23
  212. package/dist/ui/components/channels/scheduled_draft_menu.js.map +0 -1
  213. package/dist/ui/components/channels/search_popover.js.map +0 -1
  214. package/dist/ui/components/channels/settings/notification_settings.js.map +0 -1
  215. package/dist/ui/pages/scheduled_draft.d.ts +0 -38
  216. package/dist/ui/pages/scheduled_draft.js +0 -144
  217. package/dist/ui/pages/scheduled_draft.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
5
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
6
+ // See LICENSE.txt for license information.
7
+ const sectionTitles = {
8
+ theme: 'Theme',
9
+ clockDisplay: 'Clock Display',
10
+ teammateNameDisplay: 'Teammate Name Display',
11
+ availabilityStatusOnPosts: 'Show online availability on profile images',
12
+ lastActiveTime: 'Share last active time',
13
+ timezone: 'Timezone',
14
+ showLinkPreviews: 'Website Link Previews',
15
+ collapseImagePreviews: 'Default Appearance of Image Previews',
16
+ messageDisplay: 'Message Display',
17
+ clickToReply: 'Click to open threads',
18
+ channelDisplayMode: 'Channel Display',
19
+ oneClickReactions: 'Quick reactions on messages',
20
+ emojiPicker: 'Render emoticons as emojis',
21
+ language: 'Language',
22
+ };
23
+ class DisplaySettings {
24
+ container;
25
+ title;
26
+ id = '#displaySettings';
27
+ expandedSection;
28
+ expandedSectionId = '.section-max';
29
+ themeEditButton;
30
+ clockDisplayEditButton;
31
+ teammateNameDisplayEditButton;
32
+ availabilityStatusOnPostsEditButton;
33
+ lastActiveTimeEditButton;
34
+ timezoneEditButton;
35
+ showLinkPreviewsEditButton;
36
+ collapseImagePreviewsEditButton;
37
+ messageDisplayEditButton;
38
+ clickToReplyEditButton;
39
+ channelDisplayModeEditButton;
40
+ oneClickReactionsEditButton;
41
+ emojiPickerEditButton;
42
+ languageEditButton;
43
+ constructor(container) {
44
+ this.container = container;
45
+ this.title = container.getByRole('heading', { name: 'Display Settings', exact: true });
46
+ this.expandedSection = container.locator(this.expandedSectionId);
47
+ // Edit buttons for each setting section - IDs are {section}Edit pattern from webapp
48
+ this.themeEditButton = container.locator('#themeEdit');
49
+ this.clockDisplayEditButton = container.locator('#clockEdit');
50
+ this.teammateNameDisplayEditButton = container.locator('#name_formatEdit');
51
+ this.availabilityStatusOnPostsEditButton = container.locator('#availabilityStatusEdit');
52
+ this.lastActiveTimeEditButton = container.locator('#lastactiveEdit');
53
+ this.timezoneEditButton = container.locator('#timezoneEdit');
54
+ this.showLinkPreviewsEditButton = container.locator('#linkpreviewEdit');
55
+ this.collapseImagePreviewsEditButton = container.locator('#collapseEdit');
56
+ this.messageDisplayEditButton = container.locator('#message_displayEdit');
57
+ this.clickToReplyEditButton = container.locator('#click_to_replyEdit');
58
+ this.channelDisplayModeEditButton = container.locator('#channel_display_modeEdit');
59
+ this.oneClickReactionsEditButton = container.locator('#one_click_reactions_enabledEdit');
60
+ this.emojiPickerEditButton = container.locator('#renderEmoticonsAsEmojiEdit');
61
+ this.languageEditButton = container.locator('#languagesEdit');
62
+ }
63
+ async toBeVisible() {
64
+ await test.expect(this.container).toBeVisible();
65
+ }
66
+ async expandSection(section) {
67
+ await this.container.getByText(sectionTitles[section]).click();
68
+ await this.verifySectionIsExpanded(section);
69
+ }
70
+ async verifySectionIsExpanded(section) {
71
+ await test.expect(this.container.locator('.section-min', { hasText: sectionTitles[section] })).not.toBeVisible();
72
+ await test.expect(this.container.locator('.section-max', { hasText: sectionTitles[section] })).toBeVisible();
73
+ }
74
+ }
75
+
76
+ module.exports = DisplaySettings;
77
+ //# sourceMappingURL=display_settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display_settings.js","sources":["../../../../../src/ui/components/channels/settings/display_settings.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {expect, Locator} from '@playwright/test';\n\nexport type DisplaySettingsSection =\n | 'theme'\n | 'clockDisplay'\n | 'teammateNameDisplay'\n | 'availabilityStatusOnPosts'\n | 'lastActiveTime'\n | 'timezone'\n | 'showLinkPreviews'\n | 'collapseImagePreviews'\n | 'messageDisplay'\n | 'clickToReply'\n | 'channelDisplayMode'\n | 'oneClickReactions'\n | 'emojiPicker'\n | 'language';\n\nconst sectionTitles: Record<DisplaySettingsSection, string> = {\n theme: 'Theme',\n clockDisplay: 'Clock Display',\n teammateNameDisplay: 'Teammate Name Display',\n availabilityStatusOnPosts: 'Show online availability on profile images',\n lastActiveTime: 'Share last active time',\n timezone: 'Timezone',\n showLinkPreviews: 'Website Link Previews',\n collapseImagePreviews: 'Default Appearance of Image Previews',\n messageDisplay: 'Message Display',\n clickToReply: 'Click to open threads',\n channelDisplayMode: 'Channel Display',\n oneClickReactions: 'Quick reactions on messages',\n emojiPicker: 'Render emoticons as emojis',\n language: 'Language',\n};\n\nexport default class DisplaySettings {\n readonly container: Locator;\n\n readonly title;\n public id = '#displaySettings';\n readonly expandedSection;\n public expandedSectionId = '.section-max';\n\n readonly themeEditButton;\n readonly clockDisplayEditButton;\n readonly teammateNameDisplayEditButton;\n readonly availabilityStatusOnPostsEditButton;\n readonly lastActiveTimeEditButton;\n readonly timezoneEditButton;\n readonly showLinkPreviewsEditButton;\n readonly collapseImagePreviewsEditButton;\n readonly messageDisplayEditButton;\n readonly clickToReplyEditButton;\n readonly channelDisplayModeEditButton;\n readonly oneClickReactionsEditButton;\n readonly emojiPickerEditButton;\n readonly languageEditButton;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.title = container.getByRole('heading', {name: 'Display Settings', exact: true});\n this.expandedSection = container.locator(this.expandedSectionId);\n\n // Edit buttons for each setting section - IDs are {section}Edit pattern from webapp\n this.themeEditButton = container.locator('#themeEdit');\n this.clockDisplayEditButton = container.locator('#clockEdit');\n this.teammateNameDisplayEditButton = container.locator('#name_formatEdit');\n this.availabilityStatusOnPostsEditButton = container.locator('#availabilityStatusEdit');\n this.lastActiveTimeEditButton = container.locator('#lastactiveEdit');\n this.timezoneEditButton = container.locator('#timezoneEdit');\n this.showLinkPreviewsEditButton = container.locator('#linkpreviewEdit');\n this.collapseImagePreviewsEditButton = container.locator('#collapseEdit');\n this.messageDisplayEditButton = container.locator('#message_displayEdit');\n this.clickToReplyEditButton = container.locator('#click_to_replyEdit');\n this.channelDisplayModeEditButton = container.locator('#channel_display_modeEdit');\n this.oneClickReactionsEditButton = container.locator('#one_click_reactions_enabledEdit');\n this.emojiPickerEditButton = container.locator('#renderEmoticonsAsEmojiEdit');\n this.languageEditButton = container.locator('#languagesEdit');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async expandSection(section: DisplaySettingsSection) {\n await this.container.getByText(sectionTitles[section]).click();\n await this.verifySectionIsExpanded(section);\n }\n\n async verifySectionIsExpanded(section: DisplaySettingsSection) {\n await expect(this.container.locator('.section-min', {hasText: sectionTitles[section]})).not.toBeVisible();\n\n await expect(this.container.locator('.section-max', {hasText: sectionTitles[section]})).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAoBA,MAAM,aAAa,GAA2C;AAC1D,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,mBAAmB,EAAE,uBAAuB;AAC5C,IAAA,yBAAyB,EAAE,4CAA4C;AACvE,IAAA,cAAc,EAAE,wBAAwB;AACxC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,gBAAgB,EAAE,uBAAuB;AACzC,IAAA,qBAAqB,EAAE,sCAAsC;AAC7D,IAAA,cAAc,EAAE,iBAAiB;AACjC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,kBAAkB,EAAE,iBAAiB;AACrC,IAAA,iBAAiB,EAAE,6BAA6B;AAChD,IAAA,WAAW,EAAE,4BAA4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@playwright/test';
2
2
  type NotificationSettingsSection = 'keysWithHighlight' | 'keysWithNotification';
3
3
  export default class NotificationsSettings {
4
4
  readonly container: Locator;
5
+ readonly title: Locator;
6
+ id: string;
7
+ readonly expandedSection: Locator;
8
+ expandedSectionId: string;
9
+ readonly learnMoreText: Locator;
10
+ readonly desktopAndMobileEditButton: Locator;
11
+ readonly desktopNotificationSoundEditButton: Locator;
12
+ readonly emailEditButton: Locator;
13
+ readonly keywordsTriggerNotificationsEditButton: Locator;
14
+ readonly keywordsGetHighlightedEditButton: Locator;
15
+ readonly testNotificationButton: Locator;
16
+ readonly troubleshootingDocsButton: Locator;
5
17
  readonly keysWithHighlightDesc: Locator;
6
18
  constructor(container: Locator);
7
19
  toBeVisible(): Promise<void>;
@@ -6,9 +6,31 @@ var test = require('@playwright/test');
6
6
  // See LICENSE.txt for license information.
7
7
  class NotificationsSettings {
8
8
  container;
9
+ title;
10
+ id = '#notificationsSettings';
11
+ expandedSection;
12
+ expandedSectionId = '.section-max';
13
+ learnMoreText;
14
+ desktopAndMobileEditButton;
15
+ desktopNotificationSoundEditButton;
16
+ emailEditButton;
17
+ keywordsTriggerNotificationsEditButton;
18
+ keywordsGetHighlightedEditButton;
19
+ testNotificationButton;
20
+ troubleshootingDocsButton;
9
21
  keysWithHighlightDesc;
10
22
  constructor(container) {
11
23
  this.container = container;
24
+ this.title = container.getByRole('heading', { name: 'Notifications', exact: true });
25
+ this.expandedSection = container.locator(this.expandedSectionId);
26
+ this.learnMoreText = container.getByRole('link', { name: 'Learn more about notifications' });
27
+ this.desktopAndMobileEditButton = container.locator('#desktopAndMobileEdit');
28
+ this.desktopNotificationSoundEditButton = container.locator('#desktopNotificationSoundEdit');
29
+ this.emailEditButton = container.locator('#emailEdit');
30
+ this.keywordsTriggerNotificationsEditButton = container.locator('#keywordsAndMentionsEdit');
31
+ this.keywordsGetHighlightedEditButton = container.locator('#keywordsAndHighlightEdit');
32
+ this.testNotificationButton = container.getByRole('button', { name: 'Send a test notification' });
33
+ this.troubleshootingDocsButton = container.getByRole('button', { name: 'Troubleshooting docs 󰏌' });
12
34
  this.keysWithHighlightDesc = container.locator('#keywordsAndHighlightDesc');
13
35
  }
14
36
  async toBeVisible() {
@@ -38,4 +60,4 @@ class NotificationsSettings {
38
60
  }
39
61
 
40
62
  module.exports = NotificationsSettings;
41
- //# sourceMappingURL=notification_settings.js.map
63
+ //# sourceMappingURL=notifications_settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications_settings.js","sources":["../../../../../src/ui/components/channels/settings/notifications_settings.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\ntype NotificationSettingsSection = 'keysWithHighlight' | 'keysWithNotification';\n\nexport default class NotificationsSettings {\n readonly container: Locator;\n\n readonly title;\n public id = '#notificationsSettings';\n readonly expandedSection;\n public expandedSectionId = '.section-max';\n\n readonly learnMoreText;\n readonly desktopAndMobileEditButton;\n readonly desktopNotificationSoundEditButton;\n readonly emailEditButton;\n readonly keywordsTriggerNotificationsEditButton;\n readonly keywordsGetHighlightedEditButton;\n\n readonly testNotificationButton;\n readonly troubleshootingDocsButton;\n\n readonly keysWithHighlightDesc;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.title = container.getByRole('heading', {name: 'Notifications', exact: true});\n this.expandedSection = container.locator(this.expandedSectionId);\n\n this.learnMoreText = container.getByRole('link', {name: 'Learn more about notifications'});\n this.desktopAndMobileEditButton = container.locator('#desktopAndMobileEdit');\n this.desktopNotificationSoundEditButton = container.locator('#desktopNotificationSoundEdit');\n this.emailEditButton = container.locator('#emailEdit');\n this.keywordsTriggerNotificationsEditButton = container.locator('#keywordsAndMentionsEdit');\n this.keywordsGetHighlightedEditButton = container.locator('#keywordsAndHighlightEdit');\n\n this.testNotificationButton = container.getByRole('button', {name: 'Send a test notification'});\n this.troubleshootingDocsButton = container.getByRole('button', {name: 'Troubleshooting docs 󰏌'});\n\n this.keysWithHighlightDesc = container.locator('#keywordsAndHighlightDesc');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async expandSection(section: NotificationSettingsSection) {\n if (section === 'keysWithHighlight') {\n await this.container.getByText('Keywords That Get Highlighted (without notifications)').click();\n await this.verifySectionIsExpanded('keysWithHighlight');\n }\n }\n\n async verifySectionIsExpanded(section: NotificationSettingsSection) {\n await expect(this.container.locator(`#${section}Edit`)).not.toBeVisible();\n\n if (section === 'keysWithHighlight') {\n await expect(\n this.container.getByText(\n 'Enter non case-sensitive keywords, press Tab or use commas to separate them:',\n ),\n ).toBeVisible();\n await expect(\n this.container.getByText(\n 'These keywords will be shown to you with a highlight when anyone sends a message that includes them.',\n ),\n ).toBeVisible();\n }\n }\n\n async getKeywordsInput() {\n await expect(this.container.locator('input')).toBeVisible();\n return this.container.locator('input');\n }\n\n async save() {\n await expect(this.container.getByText('Save')).toBeVisible();\n await this.container.getByText('Save').click();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAMc,MAAO,qBAAqB,CAAA;AAC7B,IAAA,SAAS;AAET,IAAA,KAAK;IACP,EAAE,GAAG,wBAAwB;AAC3B,IAAA,eAAe;IACjB,iBAAiB,GAAG,cAAc;AAEhC,IAAA,aAAa;AACb,IAAA,0BAA0B;AAC1B,IAAA,kCAAkC;AAClC,IAAA,eAAe;AACf,IAAA,sCAAsC;AACtC,IAAA,gCAAgC;AAEhC,IAAA,sBAAsB;AACtB,IAAA,yBAAyB;AAEzB,IAAA,qBAAqB;AAE9B,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS,EAAE,EAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;QACjF,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,OAAO,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,SAAS,CAAC,OAAO,CAAC,CAAA,CAAA,EAAI,OAAO,CAAA,IAAA,CAAM,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;AAEzE,QAAA,IAAI,OAAO,KAAK,mBAAmB,EAAE;AACjC,YAAA,MAAMA,WAAM,CACR,IAAI,CAAC,SAAS,CAAC,SAAS,CACpB,8EAA8E,CACjF,CACJ,CAAC,WAAW,EAAE;AACf,YAAA,MAAMA,WAAM,CACR,IAAI,CAAC,SAAS,CAAC,SAAS,CACpB,sGAAsG,CACzG,CACJ,CAAC,WAAW,EAAE;QACnB;IACJ;AAEA,IAAA,MAAM,gBAAgB,GAAA;AAClB,QAAA,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE;QAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;IAC1C;AAEA,IAAA,MAAM,IAAI,GAAA;AACN,QAAA,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE;QAC5D,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE;IAClD;AACH;;;;"}
@@ -1,11 +1,26 @@
1
1
  import { Locator } from '@playwright/test';
2
- import NotificationsSettings from './notification_settings';
2
+ import AdvancedSettings from './advanced_settings';
3
+ import DisplaySettings from './display_settings';
4
+ import NotificationsSettings from './notifications_settings';
5
+ import SidebarSettings from './sidebar_settings';
3
6
  export default class SettingsModal {
4
7
  readonly container: Locator;
5
- readonly notificationsSettingsTab: Locator;
8
+ readonly content: Locator;
9
+ readonly closeButton: Locator;
10
+ readonly notificationsTab: Locator;
11
+ readonly displayTab: Locator;
12
+ readonly sidebarTab: Locator;
13
+ readonly advancedTab: Locator;
6
14
  readonly notificationsSettings: NotificationsSettings;
15
+ readonly displaySettings: DisplaySettings;
16
+ readonly sidebarSettings: SidebarSettings;
17
+ readonly advancedSettings: AdvancedSettings;
7
18
  constructor(container: Locator);
8
19
  toBeVisible(): Promise<void>;
9
- openNotificationsTab(): Promise<void>;
10
- closeModal(): Promise<void>;
20
+ getContainerId(): Promise<string | null>;
21
+ openNotificationsTab(): Promise<NotificationsSettings>;
22
+ openDisplayTab(): Promise<DisplaySettings>;
23
+ openSidebarTab(): Promise<SidebarSettings>;
24
+ openAdvancedTab(): Promise<AdvancedSettings>;
25
+ close(): Promise<void>;
11
26
  }
@@ -1,28 +1,69 @@
1
1
  'use strict';
2
2
 
3
3
  var test = require('@playwright/test');
4
- var notification_settings = require('./notification_settings.js');
4
+ var advanced_settings = require('./advanced_settings.js');
5
+ var display_settings = require('./display_settings.js');
6
+ var notifications_settings = require('./notifications_settings.js');
7
+ var sidebar_settings = require('./sidebar_settings.js');
5
8
 
6
9
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
7
10
  // See LICENSE.txt for license information.
8
11
  class SettingsModal {
9
12
  container;
10
- notificationsSettingsTab;
13
+ content;
14
+ closeButton;
15
+ notificationsTab;
16
+ displayTab;
17
+ sidebarTab;
18
+ advancedTab;
11
19
  notificationsSettings;
20
+ displaySettings;
21
+ sidebarSettings;
22
+ advancedSettings;
12
23
  constructor(container) {
13
24
  this.container = container;
14
- this.notificationsSettingsTab = container.locator('#notificationsButton');
15
- this.notificationsSettings = new notification_settings(container.locator('#notificationsSettings'));
25
+ this.content = container.locator('.modal-content');
26
+ this.closeButton = container.getByRole('button', { name: 'Close' });
27
+ this.notificationsTab = container.getByRole('tab', { name: 'notifications' });
28
+ this.displayTab = container.getByRole('tab', { name: 'display' });
29
+ this.sidebarTab = container.getByRole('tab', { name: 'sidebar' });
30
+ this.advancedTab = container.getByRole('tab', { name: 'advanced' });
31
+ this.notificationsSettings = new notifications_settings(container.getByRole('tabpanel', { name: 'notifications' }));
32
+ this.displaySettings = new display_settings(container.getByRole('tabpanel', { name: 'display' }));
33
+ this.sidebarSettings = new sidebar_settings(container.getByRole('tabpanel', { name: 'sidebar' }));
34
+ this.advancedSettings = new advanced_settings(container.getByRole('tabpanel', { name: 'advanced' }));
16
35
  }
17
36
  async toBeVisible() {
18
37
  await test.expect(this.container).toBeVisible();
19
38
  }
39
+ getContainerId() {
40
+ return this.container.getAttribute('id');
41
+ }
20
42
  async openNotificationsTab() {
21
- await test.expect(this.notificationsSettingsTab).toBeVisible();
22
- await this.notificationsSettingsTab.click();
43
+ await test.expect(this.notificationsTab).toBeVisible();
44
+ await this.notificationsTab.click();
23
45
  await this.notificationsSettings.toBeVisible();
46
+ return this.notificationsSettings;
47
+ }
48
+ async openDisplayTab() {
49
+ await test.expect(this.displayTab).toBeVisible();
50
+ await this.displayTab.click();
51
+ await this.displaySettings.toBeVisible();
52
+ return this.displaySettings;
53
+ }
54
+ async openSidebarTab() {
55
+ await test.expect(this.sidebarTab).toBeVisible();
56
+ await this.sidebarTab.click();
57
+ await this.sidebarSettings.toBeVisible();
58
+ return this.sidebarSettings;
59
+ }
60
+ async openAdvancedTab() {
61
+ await test.expect(this.advancedTab).toBeVisible();
62
+ await this.advancedTab.click();
63
+ await this.advancedSettings.toBeVisible();
64
+ return this.advancedSettings;
24
65
  }
25
- async closeModal() {
66
+ async close() {
26
67
  await this.container.getByLabel('Close').click();
27
68
  await test.expect(this.container).not.toBeVisible();
28
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"settings_modal.js","sources":["../../../../../src/ui/components/channels/settings/settings_modal.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\nimport NotificationsSettings from './notification_settings';\n\nexport default class SettingsModal {\n readonly container: Locator;\n\n readonly notificationsSettingsTab;\n readonly notificationsSettings;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.notificationsSettingsTab = container.locator('#notificationsButton');\n this.notificationsSettings = new NotificationsSettings(container.locator('#notificationsSettings'));\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async openNotificationsTab() {\n await expect(this.notificationsSettingsTab).toBeVisible();\n await this.notificationsSettingsTab.click();\n\n await this.notificationsSettings.toBeVisible();\n }\n\n async closeModal() {\n await this.container.getByLabel('Close').click();\n\n await expect(this.container).not.toBeVisible();\n }\n}\n"],"names":["NotificationsSettings","expect"],"mappings":";;;;;AAAA;AACA;AAMc,MAAO,aAAa,CAAA;AACrB,IAAA,SAAS;AAET,IAAA,wBAAwB;AACxB,IAAA,qBAAqB;AAE9B,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,wBAAwB,GAAG,SAAS,CAAC,OAAO,CAAC,sBAAsB,CAAC;AACzE,QAAA,IAAI,CAAC,qBAAqB,GAAG,IAAIA,qBAAqB,CAAC,SAAS,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;;AAGvG,IAAA,MAAM,WAAW,GAAA;QACb,MAAMC,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;;AAG9C,IAAA,MAAM,oBAAoB,GAAA;QACtB,MAAMA,WAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,WAAW,EAAE;AACzD,QAAA,MAAM,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE;AAE3C,QAAA,MAAM,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE;;AAGlD,IAAA,MAAM,UAAU,GAAA;QACZ,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE;QAEhD,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;;AAErD;;;;"}
1
+ {"version":3,"file":"settings_modal.js","sources":["../../../../../src/ui/components/channels/settings/settings_modal.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\nimport AdvancedSettings from './advanced_settings';\nimport DisplaySettings from './display_settings';\nimport NotificationsSettings from './notifications_settings';\nimport SidebarSettings from './sidebar_settings';\n\nexport default class SettingsModal {\n readonly container: Locator;\n\n readonly content;\n readonly closeButton;\n\n readonly notificationsTab;\n readonly displayTab;\n readonly sidebarTab;\n readonly advancedTab;\n\n readonly notificationsSettings;\n readonly displaySettings;\n readonly sidebarSettings;\n readonly advancedSettings;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.content = container.locator('.modal-content');\n this.closeButton = container.getByRole('button', {name: 'Close'});\n\n this.notificationsTab = container.getByRole('tab', {name: 'notifications'});\n this.displayTab = container.getByRole('tab', {name: 'display'});\n this.sidebarTab = container.getByRole('tab', {name: 'sidebar'});\n this.advancedTab = container.getByRole('tab', {name: 'advanced'});\n\n this.notificationsSettings = new NotificationsSettings(\n container.getByRole('tabpanel', {name: 'notifications'}),\n );\n this.displaySettings = new DisplaySettings(container.getByRole('tabpanel', {name: 'display'}));\n this.sidebarSettings = new SidebarSettings(container.getByRole('tabpanel', {name: 'sidebar'}));\n this.advancedSettings = new AdvancedSettings(container.getByRole('tabpanel', {name: 'advanced'}));\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n getContainerId() {\n return this.container.getAttribute('id');\n }\n\n async openNotificationsTab() {\n await expect(this.notificationsTab).toBeVisible();\n await this.notificationsTab.click();\n\n await this.notificationsSettings.toBeVisible();\n\n return this.notificationsSettings;\n }\n\n async openDisplayTab() {\n await expect(this.displayTab).toBeVisible();\n await this.displayTab.click();\n\n await this.displaySettings.toBeVisible();\n\n return this.displaySettings;\n }\n\n async openSidebarTab() {\n await expect(this.sidebarTab).toBeVisible();\n await this.sidebarTab.click();\n\n await this.sidebarSettings.toBeVisible();\n\n return this.sidebarSettings;\n }\n\n async openAdvancedTab() {\n await expect(this.advancedTab).toBeVisible();\n await this.advancedTab.click();\n\n await this.advancedSettings.toBeVisible();\n\n return this.advancedSettings;\n }\n\n async close() {\n await this.container.getByLabel('Close').click();\n\n await expect(this.container).not.toBeVisible();\n }\n}\n"],"names":["NotificationsSettings","DisplaySettings","SidebarSettings","AdvancedSettings","expect"],"mappings":";;;;;;;;AAAA;AACA;AASc,MAAO,aAAa,CAAA;AACrB,IAAA,SAAS;AAET,IAAA,OAAO;AACP,IAAA,WAAW;AAEX,IAAA,gBAAgB;AAChB,IAAA,UAAU;AACV,IAAA,UAAU;AACV,IAAA,WAAW;AAEX,IAAA,qBAAqB;AACrB,IAAA,eAAe;AACf,IAAA,eAAe;AACf,IAAA,gBAAgB;AAEzB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAC;AAClD,QAAA,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;AAEjE,QAAA,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;AAC3E,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;AAC/D,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;AAC/D,QAAA,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;AAEjE,QAAA,IAAI,CAAC,qBAAqB,GAAG,IAAIA,sBAAqB,CAClD,SAAS,CAAC,SAAS,CAAC,UAAU,EAAE,EAAC,IAAI,EA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AC3C,QAAA,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;AAE7B,QAAA,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE;QAExC,OAAO,IAAI,CAAC,eAAe;IAC/B;AAEA,IAAA,MAAM,eAAe,GAAA;QACjB,MAAMA,WAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE;AAC5C,QAAA,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;AAE9B,QAAA,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE;QAEzC,OAAO,IAAI,CAAC,gBAAgB;IAChC;AAEA,IAAA,MAAM,KAAK,GAAA;QACP,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE;QAEhD,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;IAClD;AACH;;;;"}
@@ -0,0 +1,12 @@
1
+ import { Locator } from '@playwright/test';
2
+ export default class SidebarSettings {
3
+ readonly container: Locator;
4
+ readonly title: Locator;
5
+ id: string;
6
+ readonly expandedSection: Locator;
7
+ expandedSectionId: string;
8
+ readonly groupUnreadEditButton: Locator;
9
+ readonly limitVisibleDMsEditButton: Locator;
10
+ constructor(container: Locator);
11
+ toBeVisible(): Promise<void>;
12
+ }
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+
5
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
6
+ // See LICENSE.txt for license information.
7
+ class SidebarSettings {
8
+ container;
9
+ title;
10
+ id = '#sidebarSettings';
11
+ expandedSection;
12
+ expandedSectionId = '.section-max';
13
+ groupUnreadEditButton;
14
+ limitVisibleDMsEditButton;
15
+ constructor(container) {
16
+ this.container = container;
17
+ this.title = container.getByRole('heading', { name: 'Sidebar', exact: true });
18
+ this.expandedSection = container.locator(this.expandedSectionId);
19
+ this.groupUnreadEditButton = container.locator('#showUnreadsCategoryEdit');
20
+ this.limitVisibleDMsEditButton = container.locator('#limitVisibleGMsDMsEdit');
21
+ }
22
+ async toBeVisible() {
23
+ await test.expect(this.container).toBeVisible();
24
+ }
25
+ }
26
+
27
+ module.exports = SidebarSettings;
28
+ //# sourceMappingURL=sidebar_settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar_settings.js","sources":["../../../../../src/ui/components/channels/settings/sidebar_settings.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 SidebarSettings {\n readonly container: Locator;\n\n readonly title;\n public id = '#sidebarSettings';\n readonly expandedSection;\n public expandedSectionId = '.section-max';\n\n readonly groupUnreadEditButton;\n readonly limitVisibleDMsEditButton;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.title = container.getByRole('heading', {name: 'Sidebar', exact: true});\n this.expandedSection = container.locator(this.expandedSectionId);\n\n this.groupUnreadEditButton = container.locator('#showUnreadsCategoryEdit');\n this.limitVisibleDMsEditButton = container.locator('#limitVisibleGMsDMsEdit');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,eAAe,CAAA;AACvB,IAAA,SAAS;AAET,IAAA,KAAK;IACP,EAAE,GAAG,kBAAkB;AACrB,IAAA,eAAe;IACjB,iBAAiB,GAAG,cAAc;AAEhC,IAAA,qBAAqB;AACrB,IAAA,yBAAyB;AAElC,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;QAC3E,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC;QAEhE,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC,OAAO,CAAC,0BAA0B,CAAC;QAC1E,IAAI,CAAC,yBAAyB,GAAG,SAAS,CAAC,OAAO,CAAC,yBAAyB,CAAC;IACjF;AAEA,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;IAC9C;AACH;;;;"}
@@ -1,12 +1,13 @@
1
1
  import { Locator } from '@playwright/test';
2
2
  export default class ChannelsSidebarLeft {
3
3
  readonly container: Locator;
4
+ readonly teamMenuButton: Locator;
5
+ readonly browseOrCreateChannelButton: Locator;
4
6
  readonly findChannelButton: Locator;
5
- readonly scheduledDraftCountonLHS: Locator;
7
+ readonly scheduledPostBadge: Locator;
8
+ readonly unreadChannelFilter: Locator;
6
9
  constructor(container: Locator);
7
10
  toBeVisible(): Promise<void>;
8
- assertNoPendingScheduledDraft(): Promise<void>;
9
- assertscheduledDraftCountLHS(count: string): Promise<void>;
10
11
  /**
11
12
  * Clicks on the sidebar channel link with the given name.
12
13
  * It can be any sidebar item name including channels, direct messages, or group messages, threads, etc.
@@ -21,4 +22,16 @@ export default class ChannelsSidebarLeft {
21
22
  * Verifies 'Drafts' as a sidebar link does not exist in LHS.
22
23
  */
23
24
  draftsNotVisible(): Promise<void>;
25
+ /**
26
+ * Verifies if 'unreads' filter is applied to sidebar.
27
+ */
28
+ isUnreadsFilterActive(): Promise<boolean>;
29
+ /**
30
+ * Toggles the unread filter on or off.
31
+ */
32
+ toggleUnreadsFilter(): Promise<void>;
33
+ /**
34
+ * Gets all unread channel items in the sidebar.
35
+ */
36
+ getUnreadChannels(): Locator;
24
37
  }
@@ -6,23 +6,22 @@ var test = require('@playwright/test');
6
6
  // See LICENSE.txt for license information.
7
7
  class ChannelsSidebarLeft {
8
8
  container;
9
+ teamMenuButton;
10
+ browseOrCreateChannelButton;
9
11
  findChannelButton;
10
- scheduledDraftCountonLHS;
12
+ scheduledPostBadge;
13
+ unreadChannelFilter;
11
14
  constructor(container) {
12
15
  this.container = container;
16
+ this.teamMenuButton = container.locator('#sidebarTeamMenuButton');
17
+ this.browseOrCreateChannelButton = container.locator('#browseOrAddChannelMenuButton');
13
18
  this.findChannelButton = container.getByRole('button', { name: 'Find Channels' });
14
- this.scheduledDraftCountonLHS = container.locator('span.scheduledPostBadge');
19
+ this.scheduledPostBadge = container.locator('span.scheduledPostBadge');
20
+ this.unreadChannelFilter = container.locator('.SidebarFilters_filterButton');
15
21
  }
16
22
  async toBeVisible() {
17
23
  await test.expect(this.container).toBeVisible();
18
24
  }
19
- async assertNoPendingScheduledDraft() {
20
- await test.expect(this.scheduledDraftCountonLHS).not.toBeVisible();
21
- }
22
- async assertscheduledDraftCountLHS(count) {
23
- await test.expect(this.scheduledDraftCountonLHS).toBeVisible();
24
- await test.expect(this.scheduledDraftCountonLHS).toHaveText(count);
25
- }
26
25
  /**
27
26
  * Clicks on the sidebar channel link with the given name.
28
27
  * It can be any sidebar item name including channels, direct messages, or group messages, threads, etc.
@@ -48,6 +47,24 @@ class ChannelsSidebarLeft {
48
47
  const channel = this.container.getByText('Drafts', { exact: true });
49
48
  await test.expect(channel).not.toBeVisible();
50
49
  }
50
+ /**
51
+ * Verifies if 'unreads' filter is applied to sidebar.
52
+ */
53
+ async isUnreadsFilterActive() {
54
+ return await this.unreadChannelFilter.evaluate((el) => el.classList.contains('active'));
55
+ }
56
+ /**
57
+ * Toggles the unread filter on or off.
58
+ */
59
+ async toggleUnreadsFilter() {
60
+ await this.unreadChannelFilter.click();
61
+ }
62
+ /**
63
+ * Gets all unread channel items in the sidebar.
64
+ */
65
+ getUnreadChannels() {
66
+ return this.container.locator('.SidebarLink.unread-title');
67
+ }
51
68
  }
52
69
 
53
70
  module.exports = ChannelsSidebarLeft;
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar_left.js","sources":["../../../../src/ui/components/channels/sidebar_left.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 ChannelsSidebarLeft {\n readonly container: Locator;\n readonly findChannelButton;\n readonly scheduledDraftCountonLHS;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.findChannelButton = container.getByRole('button', {name: 'Find Channels'});\n this.scheduledDraftCountonLHS = container.locator('span.scheduledPostBadge');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async assertNoPendingScheduledDraft() {\n await expect(this.scheduledDraftCountonLHS).not.toBeVisible();\n }\n\n async assertscheduledDraftCountLHS(count: string) {\n await expect(this.scheduledDraftCountonLHS).toBeVisible();\n await expect(this.scheduledDraftCountonLHS).toHaveText(count);\n }\n\n /**\n * Clicks on the sidebar channel link with the given name.\n * It can be any sidebar item name including channels, direct messages, or group messages, threads, etc.\n * @param channelName\n */\n async goToItem(channelName: string) {\n const channel = this.container.locator(`#sidebarItem_${channelName}`);\n await channel.waitFor();\n await channel.click();\n }\n\n /**\n * Verifies 'Drafts' as a sidebar link exists in LHS.\n */\n async draftsVisible() {\n const draftSidebarLink = this.container.getByText('Drafts', {exact: true});\n await draftSidebarLink.waitFor();\n await expect(draftSidebarLink).toBeVisible();\n }\n\n /**\n * Verifies 'Drafts' as a sidebar link does not exist in LHS.\n */\n async draftsNotVisible() {\n const channel = this.container.getByText('Drafts', {exact: true});\n await expect(channel).not.toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,mBAAmB,CAAA;AAC3B,IAAA,SAAS;AACT,IAAA,iBAAiB;AACjB,IAAA,wBAAwB;AAEjC,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,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,GAAG,CAAC,WAAW,EAAE;;AAE9C;;;;"}
1
+ {"version":3,"file":"sidebar_left.js","sources":["../../../../src/ui/components/channels/sidebar_left.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 ChannelsSidebarLeft {\n readonly container: Locator;\n\n readonly teamMenuButton: Locator;\n readonly browseOrCreateChannelButton: Locator;\n readonly findChannelButton;\n readonly scheduledPostBadge;\n readonly unreadChannelFilter;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.teamMenuButton = container.locator('#sidebarTeamMenuButton');\n this.browseOrCreateChannelButton = container.locator('#browseOrAddChannelMenuButton');\n this.findChannelButton = container.getByRole('button', {name: 'Find Channels'});\n this.scheduledPostBadge = container.locator('span.scheduledPostBadge');\n this.unreadChannelFilter = container.locator('.SidebarFilters_filterButton');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n /**\n * Clicks on the sidebar channel link with the given name.\n * It can be any sidebar item name including channels, direct messages, or group messages, threads, etc.\n * @param channelName\n */\n async goToItem(channelName: string) {\n const channel = this.container.locator(`#sidebarItem_${channelName}`);\n await channel.waitFor();\n await channel.click();\n }\n\n /**\n * Verifies 'Drafts' as a sidebar link exists in LHS.\n */\n async draftsVisible() {\n const draftSidebarLink = this.container.getByText('Drafts', {exact: true});\n await draftSidebarLink.waitFor();\n await expect(draftSidebarLink).toBeVisible();\n }\n\n /**\n * Verifies 'Drafts' as a sidebar link does not exist in LHS.\n */\n async draftsNotVisible() {\n const channel = this.container.getByText('Drafts', {exact: true});\n await expect(channel).not.toBeVisible();\n }\n\n /**\n * Verifies if 'unreads' filter is applied to sidebar.\n */\n async isUnreadsFilterActive(): Promise<boolean> {\n return await this.unreadChannelFilter.evaluate((el) => el.classList.contains('active'));\n }\n\n /**\n * Toggles the unread filter on or off.\n */\n async toggleUnreadsFilter() {\n await this.unreadChannelFilter.click();\n }\n\n /**\n * Gets all unread channel items in the sidebar.\n */\n getUnreadChannels(): Locator {\n return this.container.locator('.SidebarLink.unread-title');\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,mBAAmB,CAAA;AAC3B,IAAA,SAAS;AAET,IAAA,cAAc;AACd,IAAA,2BAA2B;AAC3B,IAAA,iBAAiB;AACjB,IAAA,kBAAkB;AAClB,IAAA,mBAAmB;AAE5B,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC,OAAO,CAAC,wBAAwB,CAAC;QACjE,IAAI,CAAC,2BAA2B,GAAG,SAAS,CAAC,OAAO,CAAC,+BAA+B,CAAC;AACrF,QAAA,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;QAC/E,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC,OAAO,CAAC,yBAAyB,CAAC;QACtE,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC,OAAO,CAAC,8BAA8B,CAAC;IAChF;AAEA,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;IAC9C;AAEA;;;;AAIG;IACH,MAAM,QAAQ,CAAC,WAAmB,EAAA;AAC9B,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA,aAAA,EAAgB,WAAW,CAAA,CAAE,CAAC;AACrE,QAAA,MAAM,OAAO,CAAC,OAAO,EAAE;AACvB,QAAA,MAAM,OAAO,CAAC,KAAK,EAAE;IACzB;AAEA;;AAEG;AACH,IAAA,MAAM,aAAa,GAAA;AACf,QAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC;AAC1E,QAAA,MAAM,gBAAgB,CAAC,OAAO,EAAE;AAChC,QAAA,MAAMA,WAAM,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE;IAChD;AAEA;;AAEG;AACH,IAAA,MAAM,gBAAgB,GAAA;AAClB,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC;QACjE,MAAMA,WAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;IAC3C;AAEA;;AAEG;AACH,IAAA,MAAM,qBAAqB,GAAA;QACvB,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC3F;AAEA;;AAEG;AACH,IAAA,MAAM,mBAAmB,GAAA;AACrB,QAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE;IAC1C;AAEA;;AAEG;IACH,iBAAiB,GAAA;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,2BAA2B,CAAC;IAC9D;AACH;;;;"}
@@ -2,12 +2,13 @@ import { Locator } from '@playwright/test';
2
2
  import ChannelsPostCreate from './post_create';
3
3
  import ChannelsPostEdit from './post_edit';
4
4
  import ChannelsPost from './post';
5
+ import ScheduledPostIndicator from './scheduled_post_indicator';
5
6
  export default class ChannelsSidebarRight {
6
7
  readonly container: Locator;
7
8
  readonly closeButton: Locator;
8
9
  readonly postCreate: ChannelsPostCreate;
9
10
  readonly rhsPostBody: Locator;
10
- readonly postBoxIndicator: Locator;
11
+ readonly scheduledPostIndicator: ScheduledPostIndicator;
11
12
  readonly scheduledDraftChannelInfoMessage: Locator;
12
13
  readonly scheduledDraftSeeAllLink: Locator;
13
14
  readonly scheduledDraftChannelInfoMessageText: Locator;
@@ -17,6 +18,7 @@ export default class ChannelsSidebarRight {
17
18
  readonly restorePreviousPostVersionIcon: Locator;
18
19
  constructor(container: Locator);
19
20
  toBeVisible(): Promise<void>;
21
+ postMessage(message: string): Promise<void>;
20
22
  /**
21
23
  * Returns the RHS post by post id
22
24
  * @param postId Just the ID without the prefix
@@ -31,7 +33,6 @@ export default class ChannelsSidebarRight {
31
33
  * Closes the RHS
32
34
  */
33
35
  close(): Promise<void>;
34
- clickOnSeeAllscheduledDrafts(): Promise<void>;
35
36
  toContainText(text: string): Promise<void>;
36
37
  verifyCurrentVersionPostMessage(postID: string | null, postMessageContent: string): Promise<void>;
37
38
  restorePreviousPostVersion(): Promise<void>;
@@ -4,6 +4,7 @@ var test = require('@playwright/test');
4
4
  var post_create = require('./post_create.js');
5
5
  var post_edit = require('./post_edit.js');
6
6
  var post = require('./post.js');
7
+ var scheduled_post_indicator = require('./scheduled_post_indicator.js');
7
8
 
8
9
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
9
10
  // See LICENSE.txt for license information.
@@ -12,7 +13,7 @@ class ChannelsSidebarRight {
12
13
  closeButton;
13
14
  postCreate;
14
15
  rhsPostBody;
15
- postBoxIndicator;
16
+ scheduledPostIndicator;
16
17
  scheduledDraftChannelInfoMessage;
17
18
  scheduledDraftSeeAllLink;
18
19
  scheduledDraftChannelInfoMessageText;
@@ -22,7 +23,7 @@ class ChannelsSidebarRight {
22
23
  restorePreviousPostVersionIcon;
23
24
  constructor(container) {
24
25
  this.container = container;
25
- this.postBoxIndicator = container.locator('div.postBoxIndicator');
26
+ this.scheduledPostIndicator = new scheduled_post_indicator(container.getByTestId('scheduledPostIndicator'));
26
27
  this.scheduledDraftChannelInfoMessage = container.locator('div.ScheduledPostIndicator span');
27
28
  this.scheduledDraftSeeAllLink = container.locator('a:has-text("See all")');
28
29
  this.scheduledDraftChannelInfoMessageText = container.locator('span:has-text("Message scheduled for")');
@@ -37,6 +38,9 @@ class ChannelsSidebarRight {
37
38
  async toBeVisible() {
38
39
  await test.expect(this.container).toBeVisible();
39
40
  }
41
+ async postMessage(message) {
42
+ await this.postCreate.postMessage(message);
43
+ }
40
44
  /**
41
45
  * Returns the RHS post by post id
42
46
  * @param postId Just the ID without the prefix
@@ -67,10 +71,6 @@ class ChannelsSidebarRight {
67
71
  await this.closeButton.click();
68
72
  await test.expect(this.container).not.toBeVisible();
69
73
  }
70
- async clickOnSeeAllscheduledDrafts() {
71
- await this.scheduledDraftSeeAllLink.isVisible();
72
- await this.scheduledDraftSeeAllLink.click();
73
- }
74
74
  async toContainText(text) {
75
75
  await test.expect(this.container).toContainText(text);
76
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar_right.js","sources":["../../../../src/ui/components/channels/sidebar_right.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\nimport ChannelsPostCreate from './post_create';\nimport ChannelsPostEdit from './post_edit';\nimport ChannelsPost from './post';\n\nexport default class ChannelsSidebarRight {\n readonly container: Locator;\n\n readonly closeButton;\n readonly postCreate;\n readonly rhsPostBody;\n readonly postBoxIndicator;\n readonly scheduledDraftChannelInfoMessage;\n readonly scheduledDraftSeeAllLink;\n readonly scheduledDraftChannelInfoMessageText;\n readonly editTextbox;\n readonly postEdit;\n readonly currentVersionEditedPosttext;\n readonly restorePreviousPostVersionIcon;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.postBoxIndicator = container.locator('div.postBoxIndicator');\n this.scheduledDraftChannelInfoMessage = container.locator('div.ScheduledPostIndicator span');\n this.scheduledDraftSeeAllLink = container.locator('a:has-text(\"See all\")');\n this.scheduledDraftChannelInfoMessageText = container.locator('span:has-text(\"Message scheduled for\")');\n this.rhsPostBody = container.locator('.post-message__text');\n this.postCreate = new ChannelsPostCreate(container.getByTestId('comment-create'), true);\n this.closeButton = container.locator('.sidebar--right__close');\n\n this.editTextbox = container.locator('#edit_textbox');\n this.postEdit = new ChannelsPostEdit(container.locator('.post-edit__container'));\n this.currentVersionEditedPosttext = (postID: any) => container.locator(`#rhsPostMessageText_${postID} p`);\n this.restorePreviousPostVersionIcon = container.locator(\n 'button[aria-label=\"Select to restore an old message.\"]',\n );\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n /**\n * Returns the RHS post by post id\n * @param postId Just the ID without the prefix\n */\n async getPostById(postId: string) {\n const post = this.container.locator(`[id=\"rhsPost_${postId}\"]`);\n await post.waitFor();\n return new ChannelsPost(post);\n }\n\n /**\n * Return the last post in the RHS\n */\n async getLastPost() {\n const post = this.container.getByTestId('rhsPostView').last();\n await post.waitFor();\n return new ChannelsPost(post);\n }\n\n async getFirstPost() {\n const post = this.container.getByTestId('rhsPostView').first();\n await post.waitFor();\n return new ChannelsPost(post);\n }\n\n /**\n * Closes the RHS\n */\n async close() {\n await this.closeButton.waitFor();\n await this.closeButton.click();\n\n await expect(this.container).not.toBeVisible();\n }\n\n async clickOnSeeAllscheduledDrafts() {\n await this.scheduledDraftSeeAllLink.isVisible();\n await this.scheduledDraftSeeAllLink.click();\n }\n\n async toContainText(text: string) {\n await expect(this.container).toContainText(text);\n }\n\n async verifyCurrentVersionPostMessage(postID: string | null, postMessageContent: string) {\n expect(await this.currentVersionEditedPosttext(postID).textContent()).toBe(postMessageContent);\n }\n\n async restorePreviousPostVersion() {\n await this.restorePreviousPostVersionIcon.isVisible();\n await this.restorePreviousPostVersionIcon.click();\n }\n}\n"],"names":["ChannelsPostCreate","ChannelsPostEdit","expect","post","ChannelsPost"],"mappings":";;;;;;;AAAA;AACA;AAQc,MAAO,oBAAoB,CAAA;AAC5B,IAAA,SAAS;AAET,IAAA,WAAW;AACX,IAAA,UAAU;AACV,IAAA,WAAW;AACX,IAAA,gBAAgB;AAChB,IAAA,gCAAgC;AAChC,IAAA,wBAAwB;AACxB,IAAA,oCAAoC;AACpC,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,4BAA4B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AAC,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;;AAGlG,IAAA,MAAM,0BAA0B,GAAA;AAC5B,QAAA,MAAM,IAAI,CAAC,8BAA8B,CAAC,SAAS,EAAE;AACrD,QAAA,MAAM,IAAI,CAAC,8BAA8B,CAAC,KAAK,EAAE;;AAExD;;;;"}
1
+ {"version":3,"file":"sidebar_right.js","sources":["../../../../src/ui/components/channels/sidebar_right.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\nimport ChannelsPostCreate from './post_create';\nimport ChannelsPostEdit from './post_edit';\nimport ChannelsPost from './post';\nimport ScheduledPostIndicator from './scheduled_post_indicator';\n\nexport default class ChannelsSidebarRight {\n readonly container: Locator;\n\n readonly closeButton;\n readonly postCreate;\n readonly rhsPostBody;\n readonly scheduledPostIndicator;\n readonly scheduledDraftChannelInfoMessage;\n readonly scheduledDraftSeeAllLink;\n readonly scheduledDraftChannelInfoMessageText;\n readonly editTextbox;\n readonly postEdit;\n readonly currentVersionEditedPosttext;\n readonly restorePreviousPostVersionIcon;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.scheduledPostIndicator = new ScheduledPostIndicator(container.getByTestId('scheduledPostIndicator'));\n this.scheduledDraftChannelInfoMessage = container.locator('div.ScheduledPostIndicator span');\n this.scheduledDraftSeeAllLink = container.locator('a:has-text(\"See all\")');\n this.scheduledDraftChannelInfoMessageText = container.locator('span:has-text(\"Message scheduled for\")');\n this.rhsPostBody = container.locator('.post-message__text');\n this.postCreate = new ChannelsPostCreate(container.getByTestId('comment-create'), true);\n this.closeButton = container.locator('.sidebar--right__close');\n\n this.editTextbox = container.locator('#edit_textbox');\n this.postEdit = new ChannelsPostEdit(container.locator('.post-edit__container'));\n this.currentVersionEditedPosttext = (postID: any) => container.locator(`#rhsPostMessageText_${postID} p`);\n this.restorePreviousPostVersionIcon = container.locator(\n 'button[aria-label=\"Select to restore an old message.\"]',\n );\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async postMessage(message: string) {\n await this.postCreate.postMessage(message);\n }\n\n /**\n * Returns the RHS post by post id\n * @param postId Just the ID without the prefix\n */\n async getPostById(postId: string) {\n const post = this.container.locator(`[id=\"rhsPost_${postId}\"]`);\n await post.waitFor();\n return new ChannelsPost(post);\n }\n\n /**\n * Return the last post in the RHS\n */\n async getLastPost() {\n const post = this.container.getByTestId('rhsPostView').last();\n await post.waitFor();\n return new ChannelsPost(post);\n }\n\n async getFirstPost() {\n const post = this.container.getByTestId('rhsPostView').first();\n await post.waitFor();\n return new ChannelsPost(post);\n }\n\n /**\n * Closes the RHS\n */\n async close() {\n await this.closeButton.waitFor();\n await this.closeButton.click();\n\n await expect(this.container).not.toBeVisible();\n }\n\n async toContainText(text: string) {\n await expect(this.container).toContainText(text);\n }\n\n async verifyCurrentVersionPostMessage(postID: string | null, postMessageContent: string) {\n expect(await this.currentVersionEditedPosttext(postID).textContent()).toBe(postMessageContent);\n }\n\n async restorePreviousPostVersion() {\n await this.restorePreviousPostVersionIcon.isVisible();\n await this.restorePreviousPostVersionIcon.click();\n }\n}\n"],"names":["ScheduledPostIndicator","ChannelsPostCreate","ChannelsPostEdit","expect","post","ChannelsPost"],"mappings":";;;;;;;;AAAA;AACA;AASc,MAAO,oBAAoB,CAAA;AAC5B,IAAA,SAAS;AAET,IAAA,WAAW;AACX,IAAA,UAAU;AACV,IAAA,WAAW;AACX,IAAA,sBAAsB;AACtB,IAAA,gCAAgC;AAChC,IAAA,wBAAwB;AACxB,IAAA,oCAAoC;AACpC,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,4BAA4B;AAC5B,IAAA,8BAA8B;AAEvC,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,IAAI,CAAC,sBAAsB,GAAG,IAAIA,wBAAs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C,SAAS,EAAE;AACrD,QAAA,MAAM,IAAI,CAAC,8BAA8B,CAAC,KAAK,EAAE;IACrD;AACH;;;;"}
@@ -0,0 +1,19 @@
1
+ import { Locator } from '@playwright/test';
2
+ export default class TeamMenu {
3
+ readonly container: Locator;
4
+ readonly invitePeople: Locator;
5
+ readonly teamSettings: Locator;
6
+ readonly manageMembers: Locator;
7
+ readonly leaveTeam: Locator;
8
+ readonly createTeam: Locator;
9
+ readonly learnAboutTeams: Locator;
10
+ constructor(container: Locator);
11
+ toBeVisible(): Promise<void>;
12
+ getContainerId(): Promise<string | null>;
13
+ clickInvitePeople(): Promise<void>;
14
+ clickTeamSettings(): Promise<void>;
15
+ clickManageMembers(): Promise<void>;
16
+ clickLeaveTeam(): Promise<void>;
17
+ clickCreateTeam(): Promise<void>;
18
+ clickLearnAboutTeams(): Promise<void>;
19
+ }