@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,74 @@
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 FlagPostConfirmationDialog {
8
+ page;
9
+ container;
10
+ cancelButton;
11
+ flagPostReasonInput;
12
+ flagPostCommentInput;
13
+ submitButton;
14
+ postContainer;
15
+ postText;
16
+ flagReasonOption;
17
+ flagReasonMenuItems;
18
+ cannotFlagPostErrorMessage;
19
+ requireCommentsErrorMessage;
20
+ constructor(container, page) {
21
+ this.container = container;
22
+ this.page = page;
23
+ this.flagPostReasonInput = container.locator('#FlagPostModal__reason');
24
+ this.flagPostCommentInput = container.locator('#FlagPostModal__comment');
25
+ this.cancelButton = container.locator('button.btn.btn-tertiary');
26
+ this.submitButton = container.locator('button.btn-primary.confirm');
27
+ this.postContainer = container.locator('[data-testid="FlagPostModal__post-preview_container"]');
28
+ this.postText = container.locator('div.post-message__text');
29
+ this.flagReasonOption = page.locator('.react-select__menu-list');
30
+ this.flagReasonMenuItems = (reason) => this.flagReasonOption.locator(`div.react-select__option:has-text("${reason}")`);
31
+ this.cannotFlagPostErrorMessage = container.locator('div.FlagPostModal__request-error span');
32
+ this.requireCommentsErrorMessage = container.locator('div.AdvancedTextbox__error-message span');
33
+ }
34
+ async fillFlagComment(comment) {
35
+ await this.flagPostCommentInput.fill(comment);
36
+ }
37
+ async selectFlagReason(reason) {
38
+ // Open the dropdown
39
+ await this.flagPostReasonInput.click();
40
+ // Wait for dropdown options to appear and click the desired one
41
+ await this.flagReasonOption.waitFor({ state: 'visible' });
42
+ await this.flagReasonMenuItems(reason).click();
43
+ }
44
+ async toBeVisible() {
45
+ await test.expect(this.container).toBeVisible();
46
+ await test.expect(this.cancelButton).toBeVisible();
47
+ await test.expect(this.submitButton).toBeVisible();
48
+ await test.expect(this.postContainer).toBeVisible();
49
+ }
50
+ async toContainPostText(message) {
51
+ await test.expect(this.postText).toBeVisible();
52
+ await test.expect(this.postText).toHaveText(message);
53
+ }
54
+ async notToBeVisible() {
55
+ await test.expect(this.container).not.toBeVisible();
56
+ await test.expect(this.cancelButton).not.toBeVisible();
57
+ await test.expect(this.submitButton).not.toBeVisible();
58
+ }
59
+ async cannotFlagAlreadyFlaggedPostToBeVisible() {
60
+ await test.expect(this.cannotFlagPostErrorMessage).toBeVisible();
61
+ await test.expect(this.cannotFlagPostErrorMessage).toHaveText('Cannot flag this post as it is already flagged.');
62
+ }
63
+ async requireCommentsForFlaggingPost() {
64
+ await test.expect(this.requireCommentsErrorMessage).toBeVisible();
65
+ await test.expect(this.requireCommentsErrorMessage).toHaveText('Please add a comment explaining why you’re flagging this message.');
66
+ }
67
+ async cannotFlagPreviouslyRetainedPostToBeVisible() {
68
+ await test.expect(this.cannotFlagPostErrorMessage).toBeVisible();
69
+ await test.expect(this.cannotFlagPostErrorMessage).toHaveText('Cannot flag this post as it was retained in a previous flagging request.');
70
+ }
71
+ }
72
+
73
+ module.exports = FlagPostConfirmationDialog;
74
+ //# sourceMappingURL=flag_post_confirmation_dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flag_post_confirmation_dialog.js","sources":["../../../../src/ui/components/channels/flag_post_confirmation_dialog.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Locator, expect, Page} from '@playwright/test';\n\nexport default class FlagPostConfirmationDialog {\n readonly page: Page;\n readonly container: Locator;\n\n readonly cancelButton;\n readonly flagPostReasonInput;\n readonly flagPostCommentInput;\n readonly submitButton;\n readonly postContainer;\n readonly postText;\n readonly flagReasonOption;\n readonly flagReasonMenuItems;\n readonly cannotFlagPostErrorMessage;\n readonly requireCommentsErrorMessage;\n\n constructor(container: Locator, page: Page) {\n this.container = container;\n this.page = page;\n\n this.flagPostReasonInput = container.locator('#FlagPostModal__reason');\n this.flagPostCommentInput = container.locator('#FlagPostModal__comment');\n this.cancelButton = container.locator('button.btn.btn-tertiary');\n this.submitButton = container.locator('button.btn-primary.confirm');\n this.postContainer = container.locator('[data-testid=\"FlagPostModal__post-preview_container\"]');\n this.postText = container.locator('div.post-message__text');\n this.flagReasonOption = page.locator('.react-select__menu-list');\n this.flagReasonMenuItems = (reason: string) =>\n this.flagReasonOption.locator(`div.react-select__option:has-text(\"${reason}\")`);\n this.cannotFlagPostErrorMessage = container.locator('div.FlagPostModal__request-error span');\n this.requireCommentsErrorMessage = container.locator('div.AdvancedTextbox__error-message span');\n }\n\n async fillFlagComment(comment: string) {\n await this.flagPostCommentInput.fill(comment);\n }\n\n async selectFlagReason(reason: string) {\n // Open the dropdown\n await this.flagPostReasonInput.click();\n // Wait for dropdown options to appear and click the desired one\n await this.flagReasonOption.waitFor({state: 'visible'});\n await this.flagReasonMenuItems(reason).click();\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n await expect(this.cancelButton).toBeVisible();\n await expect(this.submitButton).toBeVisible();\n await expect(this.postContainer).toBeVisible();\n }\n\n async toContainPostText(message: string) {\n await expect(this.postText).toBeVisible();\n await expect(this.postText).toHaveText(message);\n }\n\n async notToBeVisible() {\n await expect(this.container).not.toBeVisible();\n await expect(this.cancelButton).not.toBeVisible();\n await expect(this.submitButton).not.toBeVisible();\n }\n\n async cannotFlagAlreadyFlaggedPostToBeVisible() {\n await expect(this.cannotFlagPostErrorMessage).toBeVisible();\n await expect(this.cannotFlagPostErrorMessage).toHaveText('Cannot flag this post as it is already flagged.');\n }\n\n async requireCommentsForFlaggingPost() {\n await expect(this.requireCommentsErrorMessage).toBeVisible();\n await expect(this.requireCommentsErrorMessage).toHaveText(\n 'Please add a comment explaining why you’re flagging this message.',\n );\n }\n\n async cannotFlagPreviouslyRetainedPostToBeVisible() {\n await expect(this.cannotFlagPostErrorMessage).toBeVisible();\n await expect(this.cannotFlagPostErrorMessage).toHaveText(\n 'Cannot flag this post as it was retained in a previous flagging request.',\n );\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,0BAA0B,CAAA;AAClC,IAAA,IAAI;AACJ,IAAA,SAAS;AAET,IAAA,YAAY;AACZ,IAAA,mBAAmB;AACnB,IAAA,oBAAoB;AACpB,IAAA,YAAY;AACZ,IAAA,aAAa;AACb,IAAA,QAAQ;AACR,IAAA,gBAAgB;AAChB,IAAA,mBAAmB;AACnB,IAAA,0BAA0B;AAC1B,IAAA,2BAA2B;IAEpC,WAAA,CAAY,SAAkB,EAAE,IAAU,EAAA;AACtC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAC1B,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;QAEhB,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC,OAAO,CAAC,wBAAwB,CAAC;QACtE,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC,OAAO,CAAC,yBAAyB,CAAC;QACxE,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,yBAAyB,CAAC;QAChE,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,4BAA4B,CAAC;QACnE,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,uDAAuD,CAAC;QAC/F,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,wBAAwB,CAAC;QAC3D,IAAI,CAAC,gBAAgB,GAAG,IA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MA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;QAC9C,MAAMA,WAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;QACjD,MAAMA,WAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;IACrD;AAEA,IAAA,MAAM,uCAAuC,GAAA;QACzC,MAAMA,WAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,WAAW,EAAE;QAC3D,MAAMA,WAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,UAAU,CAAC,iDAAiD,CAAC;IAC/G;AAEA,IAAA,MAAM,8BAA8B,GAAA;QAChC,MAAMA,WAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,WAAW,EAAE;QAC5D,MAAMA,WAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,UAAU,CACrD,mEAAmE,CACtE;IACL;AAEA,IAAA,MAAM,2CAA2C,GAAA;QAC7C,MAAMA,WAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,WAAW,EAAE;QAC3D,MAAMA,WAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,UAAU,CACpD,0EAA0E,CAC7E;IACL;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"generic_confirm_modal.js","sources":["../../../../src/ui/components/channels/generic_confirm_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\n/**\n * This is the generic confirm modal that is used in the app.\n * It has optional cancel button, optional checkbox and confirm button along with title and message body.\n * It can present in different parts of the app such as channel, system console, etc and hence its constructor\n * should be able to accept the page object of the app and an optional id to uniquely identify the modal.\n */\nexport default class GenericConfirmModal {\n readonly container: Locator;\n\n readonly confirmButton: Locator;\n readonly cancelButton: Locator;\n\n constructor(container: Locator) {\n this.container = container;\n this.confirmButton = container.locator('#confirmModalButton');\n this.cancelButton = container.locator('#cancelModalButton');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async confirm() {\n await this.confirmButton.waitFor();\n await this.confirmButton.click();\n\n // Wait for the modal to disappear\n await expect(this.container).not.toBeVisible();\n }\n\n async cancel() {\n await this.cancelButton.waitFor();\n await this.cancelButton.click();\n\n // Wait for the modal to disappear\n await expect(this.container).not.toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIA;;;;;AAKG;AACW,MAAO,mBAAmB,CAAA;AAC3B,IAAA,SAAS;AAET,IAAA,aAAa;AACb,IAAA,YAAY;AAErB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAC1B,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,qBAAqB,CAAC;QAC7D,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC;;AAG/D,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;;AAG9C,IAAA,MAAM,OAAO,GAAA;AACT,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;AAClC,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;;QAGhC,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;;AAGlD,IAAA,MAAM,MAAM,GAAA;AACR,QAAA,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;AACjC,QAAA,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE;;QAG/B,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;;AAErD;;;;"}
1
+ {"version":3,"file":"generic_confirm_modal.js","sources":["../../../../src/ui/components/channels/generic_confirm_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\n/**\n * This is the generic confirm modal that is used in the app.\n * It has optional cancel button, optional checkbox and confirm button along with title and message body.\n * It can present in different parts of the app such as channel, system console, etc and hence its constructor\n * should be able to accept the page object of the app and an optional id to uniquely identify the modal.\n */\nexport default class GenericConfirmModal {\n readonly container: Locator;\n\n readonly confirmButton: Locator;\n readonly cancelButton: Locator;\n\n constructor(container: Locator) {\n this.container = container;\n this.confirmButton = container.locator('#confirmModalButton');\n this.cancelButton = container.locator('#cancelModalButton');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async confirm() {\n await this.confirmButton.waitFor();\n await this.confirmButton.click();\n\n // Wait for the modal to disappear\n await expect(this.container).not.toBeVisible();\n }\n\n async cancel() {\n await this.cancelButton.waitFor();\n await this.cancelButton.click();\n\n // Wait for the modal to disappear\n await expect(this.container).not.toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIA;;;;;AAKG;AACW,MAAO,mBAAmB,CAAA;AAC3B,IAAA,SAAS;AAET,IAAA,aAAa;AACb,IAAA,YAAY;AAErB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAC1B,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,qBAAqB,CAAC;QAC7D,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC;IAC/D;AAEA,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;IAC9C;AAEA,IAAA,MAAM,OAAO,GAAA;AACT,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;AAClC,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;;QAGhC,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;IAClD;AAEA,IAAA,MAAM,MAAM,GAAA;AACR,QAAA,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;AACjC,QAAA,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE;;QAG/B,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE;IAClD;AACH;;;;"}
@@ -1,6 +1,8 @@
1
1
  import { Locator } from '@playwright/test';
2
2
  export default class ChannelsHeader {
3
3
  readonly container: Locator;
4
+ readonly channelMenuDropdown: Locator;
4
5
  constructor(container: Locator);
5
6
  toBeVisible(): Promise<void>;
7
+ openChannelMenu(): Promise<void>;
6
8
  }
@@ -6,12 +6,18 @@ var test = require('@playwright/test');
6
6
  // See LICENSE.txt for license information.
7
7
  class ChannelsHeader {
8
8
  container;
9
+ channelMenuDropdown;
9
10
  constructor(container) {
10
11
  this.container = container;
12
+ this.channelMenuDropdown = container.locator('[aria-controls="channelHeaderDropdownMenu"]');
11
13
  }
12
14
  async toBeVisible() {
13
15
  await test.expect(this.container).toBeVisible();
14
16
  }
17
+ async openChannelMenu() {
18
+ await this.channelMenuDropdown.isVisible();
19
+ await this.channelMenuDropdown.click();
20
+ }
15
21
  }
16
22
 
17
23
  module.exports = ChannelsHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sources":["../../../../src/ui/components/channels/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 ChannelsHeader {\n readonly container: Locator;\n\n constructor(container: Locator) {\n this.container = container;\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,cAAc,CAAA;AACtB,IAAA,SAAS;AAElB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAG9B,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;;AAEjD;;;;"}
1
+ {"version":3,"file":"header.js","sources":["../../../../src/ui/components/channels/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 ChannelsHeader {\n readonly container: Locator;\n\n readonly channelMenuDropdown;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.channelMenuDropdown = container.locator('[aria-controls=\"channelHeaderDropdownMenu\"]');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async openChannelMenu() {\n await this.channelMenuDropdown.isVisible();\n await this.channelMenuDropdown.click();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,cAAc,CAAA;AACtB,IAAA,SAAS;AAET,IAAA,mBAAmB;AAE5B,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC,OAAO,CAAC,6CAA6C,CAAC;IAC/F;AAEA,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;IAC9C;AAEA,IAAA,MAAM,eAAe,GAAA;AACjB,QAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE;AAC1C,QAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE;IAC1C;AACH;;;;"}
@@ -0,0 +1,6 @@
1
+ import { Locator } from '@playwright/test';
2
+ export default class InvitePeopleModal {
3
+ readonly container: Locator;
4
+ constructor(container: Locator);
5
+ toBeVisible(): Promise<void>;
6
+ }
@@ -0,0 +1,18 @@
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 InvitePeopleModal {
8
+ container;
9
+ constructor(container) {
10
+ this.container = container;
11
+ }
12
+ async toBeVisible() {
13
+ await test.expect(this.container).toBeVisible();
14
+ }
15
+ }
16
+
17
+ module.exports = InvitePeopleModal;
18
+ //# sourceMappingURL=invite_people_modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invite_people_modal.js","sources":["../../../../src/ui/components/channels/invite_people_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\nexport default class InvitePeopleModal {\n readonly container: Locator;\n\n constructor(container: Locator) {\n this.container = container;\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,iBAAiB,CAAA;AACzB,IAAA,SAAS;AAElB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;IAC9B;AAEA,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;IAC9C;AACH;;;;"}
@@ -14,5 +14,4 @@ export default class MessagePriority {
14
14
  closePriorityMenu(): Promise<void>;
15
15
  verifyNoPriorityLabel(postText: string): Promise<void>;
16
16
  verifyPriorityDialog(): Promise<void>;
17
- verifyStandardOptionSelected(): Promise<void>;
18
17
  }
@@ -17,11 +17,11 @@ class MessagePriority {
17
17
  this.priorityIcon = container.locator('#messagePriority');
18
18
  // Priority menu that opens when clicking the icon
19
19
  this.priorityMenu = container.locator('[role="menu"]');
20
- // Standard priority option in the menu (id comes from webapp implementation)
21
- this.standardPriorityOption = this.priorityMenu.locator('#menu-item-priority-standard');
22
20
  // Priority dialog elements
23
21
  this.priorityDialog = container.page().getByRole('menu');
24
22
  this.dialogHeader = container.page().locator('h4.modal-title');
23
+ // Standard priority option in the menu
24
+ this.standardPriorityOption = this.priorityDialog.getByRole('menuitemradio', { name: 'Standard' });
25
25
  }
26
26
  async clickPriorityIcon() {
27
27
  await this.priorityIcon.waitFor({ state: 'visible' });
@@ -55,11 +55,6 @@ class MessagePriority {
55
55
  await test.expect(this.priorityDialog).toBeVisible();
56
56
  await test.expect(this.dialogHeader).toHaveText('Message priority');
57
57
  }
58
- async verifyStandardOptionSelected() {
59
- const standardOption = this.priorityDialog.getByRole('menuitemradio', { name: 'Standard' });
60
- await test.expect(standardOption).toBeVisible();
61
- await test.expect(standardOption.locator('svg.StyledCheckIcon-dFKfoY')).toBeVisible();
62
- }
63
58
  }
64
59
 
65
60
  module.exports = MessagePriority;
@@ -1 +1 @@
1
- {"version":3,"file":"message_priority.js","sources":["../../../../src/ui/components/channels/message_priority.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 MessagePriority {\n readonly container: Locator;\n readonly priorityIcon: Locator;\n readonly priorityMenu: Locator;\n readonly standardPriorityOption: Locator;\n readonly priorityDialog: Locator;\n readonly dialogHeader: Locator;\n\n constructor(container: Locator) {\n this.container = container;\n\n // Formatting bar priority icon\n this.priorityIcon = container.locator('#messagePriority');\n\n // Priority menu that opens when clicking the icon\n this.priorityMenu = container.locator('[role=\"menu\"]');\n\n // Standard priority option in the menu (id comes from webapp implementation)\n this.standardPriorityOption = this.priorityMenu.locator('#menu-item-priority-standard');\n\n // Priority dialog elements\n this.priorityDialog = container.page().getByRole('menu');\n this.dialogHeader = container.page().locator('h4.modal-title');\n }\n\n async clickPriorityIcon() {\n await this.priorityIcon.waitFor({state: 'visible'});\n await this.priorityIcon.click();\n }\n\n async verifyPriorityIconVisible() {\n await this.priorityIcon.waitFor({state: 'visible'});\n await expect(this.priorityIcon).toBeVisible();\n }\n\n async verifyStandardPrioritySelected() {\n await expect(this.priorityMenu).toBeVisible();\n await expect(this.standardPriorityOption).toHaveAttribute('aria-checked', 'true');\n }\n\n async verifyPriorityMenuVisible() {\n await expect(this.priorityMenu).toBeVisible();\n // Look for beta text in header\n await expect(this.priorityMenu.locator('text=Message Priority')).toBeVisible();\n }\n\n async closePriorityMenu() {\n await this.priorityMenu.press('Escape');\n await expect(this.priorityMenu).not.toBeVisible();\n }\n\n async verifyNoPriorityLabel(postText: string) {\n const post = this.container.locator(`text=${postText}`);\n await expect(post).toBeVisible();\n\n // Verify no priority label exists\n const priorityLabel = post.locator('[data-testid=\"post-priority-label\"]');\n await expect(priorityLabel).toHaveCount(0);\n }\n\n async verifyPriorityDialog() {\n await expect(this.priorityDialog).toBeVisible();\n await expect(this.dialogHeader).toHaveText('Message priority');\n }\n\n async verifyStandardOptionSelected() {\n const standardOption = this.priorityDialog.getByRole('menuitemradio', {name: 'Standard'});\n await expect(standardOption).toBeVisible();\n await expect(standardOption.locator('svg.StyledCheckIcon-dFKfoY')).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,eAAe,CAAA;AACvB,IAAA,SAAS;AACT,IAAA,YAAY;AACZ,IAAA,YAAY;AACZ,IAAA,sBAAsB;AACtB,IAAA,cAAc;AACd,IAAA,YAAY;AAErB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;QAG1B,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC;;QAGzD,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;;QAGtD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,YAA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QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAQ,KAAA,EAAA,QAAQ,CAAE,CAAA,CAAC;AACvD,QAAA,MAAMA,WAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;;QAGhC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,qCAAqC,CAAC;QACzE,MAAMA,WAAM,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;;AAG9C,IAAA,MAAM,oBAAoB,GAAA;QACtB,MAAMA,WAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;QAC/C,MAAMA,WAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;;AAGlE,IAAA,MAAM,4BAA4B,GAAA;AAC9B,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,eAAe,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;AACzF,QAAA,MAAMA,WAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;AAC1C,QAAA,MAAMA,WAAM,CAAC,cAAc,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC,WAAW,EAAE;;AAEvF;;;;"}
1
+ {"version":3,"file":"message_priority.js","sources":["../../../../src/ui/components/channels/message_priority.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 MessagePriority {\n readonly container: Locator;\n readonly priorityIcon: Locator;\n readonly priorityMenu: Locator;\n readonly standardPriorityOption: Locator;\n readonly priorityDialog: Locator;\n readonly dialogHeader: Locator;\n\n constructor(container: Locator) {\n this.container = container;\n\n // Formatting bar priority icon\n this.priorityIcon = container.locator('#messagePriority');\n\n // Priority menu that opens when clicking the icon\n this.priorityMenu = container.locator('[role=\"menu\"]');\n\n // Priority dialog elements\n this.priorityDialog = container.page().getByRole('menu');\n this.dialogHeader = container.page().locator('h4.modal-title');\n\n // Standard priority option in the menu\n this.standardPriorityOption = this.priorityDialog.getByRole('menuitemradio', {name: 'Standard'});\n }\n\n async clickPriorityIcon() {\n await this.priorityIcon.waitFor({state: 'visible'});\n await this.priorityIcon.click();\n }\n\n async verifyPriorityIconVisible() {\n await this.priorityIcon.waitFor({state: 'visible'});\n await expect(this.priorityIcon).toBeVisible();\n }\n\n async verifyStandardPrioritySelected() {\n await expect(this.priorityMenu).toBeVisible();\n await expect(this.standardPriorityOption).toHaveAttribute('aria-checked', 'true');\n }\n\n async verifyPriorityMenuVisible() {\n await expect(this.priorityMenu).toBeVisible();\n // Look for beta text in header\n await expect(this.priorityMenu.locator('text=Message Priority')).toBeVisible();\n }\n\n async closePriorityMenu() {\n await this.priorityMenu.press('Escape');\n await expect(this.priorityMenu).not.toBeVisible();\n }\n\n async verifyNoPriorityLabel(postText: string) {\n const post = this.container.locator(`text=${postText}`);\n await expect(post).toBeVisible();\n\n // Verify no priority label exists\n const priorityLabel = post.locator('[data-testid=\"post-priority-label\"]');\n await expect(priorityLabel).toHaveCount(0);\n }\n\n async verifyPriorityDialog() {\n await expect(this.priorityDialog).toBeVisible();\n await expect(this.dialogHeader).toHaveText('Message priority');\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,eAAe,CAAA;AACvB,IAAA,SAAS;AACT,IAAA,YAAY;AACZ,IAAA,YAAY;AACZ,IAAA,sBAAsB;AACtB,IAAA,cAAc;AACd,IAAA,YAAY;AAErB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;QAG1B,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC;;QAGzD,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;;AAGtD,QAAA,IAAI,CAAC,cAAc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AAC,GAAG,CAAC,WAAW,EAAE;IACrD;IAEA,MAAM,qBAAqB,CAAC,QAAgB,EAAA;AACxC,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA,KAAA,EAAQ,QAAQ,CAAA,CAAE,CAAC;AACvD,QAAA,MAAMA,WAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;;QAGhC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,qCAAqC,CAAC;QACzE,MAAMA,WAAM,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IAC9C;AAEA,IAAA,MAAM,oBAAoB,GAAA;QACtB,MAAMA,WAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;QAC/C,MAAMA,WAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAClE;AACH;;;;"}
@@ -16,6 +16,8 @@ export default class ChannelsPost {
16
16
  hover(): Promise<void>;
17
17
  getId(): Promise<string>;
18
18
  getProfileImage(username: string): Promise<Locator>;
19
+ openAThread(): Promise<void>;
20
+ reply(): Promise<void>;
19
21
  /**
20
22
  * Clicks on the deleted post's remove 'x' button.
21
23
  * Also verifies that the post is a deleted post.
@@ -26,4 +28,9 @@ export default class ChannelsPost {
26
28
  * @param text Text to be verified in the post
27
29
  */
28
30
  toContainText(text: string): Promise<void>;
31
+ /**
32
+ * `toNotContainText` verifies if the post does not contain the specified text.
33
+ * @param text Text to be verified not in the post
34
+ */
35
+ toNotContainText(text: string): Promise<void>;
29
36
  }
@@ -38,6 +38,17 @@ class ChannelsPost {
38
38
  async getProfileImage(username) {
39
39
  return this.profileIcon.getByAltText(`${username} profile image`);
40
40
  }
41
+ async openAThread() {
42
+ await this.container.hover();
43
+ await this.postMenu.toBeVisible();
44
+ await this.postMenu.replyButton.waitFor();
45
+ await this.postMenu.replyButton.click();
46
+ }
47
+ async reply() {
48
+ await this.container.hover();
49
+ await this.postMenu.toBeVisible();
50
+ await this.postMenu.reply();
51
+ }
41
52
  /**
42
53
  * Clicks on the deleted post's remove 'x' button.
43
54
  * Also verifies that the post is a deleted post.
@@ -57,6 +68,13 @@ class ChannelsPost {
57
68
  async toContainText(text) {
58
69
  await test.expect(this.container).toContainText(text);
59
70
  }
71
+ /**
72
+ * `toNotContainText` verifies if the post does not contain the specified text.
73
+ * @param text Text to be verified not in the post
74
+ */
75
+ async toNotContainText(text) {
76
+ await test.expect(this.container).not.toContainText(text);
77
+ }
60
78
  }
61
79
 
62
80
  module.exports = ChannelsPost;
@@ -1 +1 @@
1
- {"version":3,"file":"post.js","sources":["../../../../src/ui/components/channels/post.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 PostMenu from './post_menu';\nimport ThreadFooter from './thread_footer';\n\nexport default class ChannelsPost {\n readonly container: Locator;\n\n readonly body;\n readonly profileIcon;\n\n readonly removePostButton;\n\n readonly postMenu;\n readonly threadFooter;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.body = container.locator('.post__body');\n\n this.profileIcon = container.locator('.profile-icon');\n\n this.removePostButton = container.locator('.post__remove');\n\n this.postMenu = new PostMenu(container.locator('.post-menu'));\n this.threadFooter = new ThreadFooter(container.locator('.ThreadFooter'));\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n /**\n * Hover over the post. Can be used for post menu to appear.\n */\n async hover() {\n await this.container.hover();\n }\n\n async getId() {\n const id = await this.container.getAttribute('id');\n expect(id, 'No post ID found.').toBeTruthy();\n return (id || '').substring('post_'.length);\n }\n\n async getProfileImage(username: string) {\n return this.profileIcon.getByAltText(`${username} profile image`);\n }\n\n /**\n * Clicks on the deleted post's remove 'x' button.\n * Also verifies that the post is a deleted post.\n */\n async remove() {\n // Verify the post is a deleted post\n await expect(this.container).toContainText(/\\(message deleted\\)/);\n\n // Hover over the post and click on the remove post button\n await this.container.hover();\n await this.removePostButton.waitFor();\n await this.removePostButton.click();\n }\n\n /**\n * `toContainText` verifies if the post contains the specified text.\n * @param text Text to be verified in the post\n */\n async toContainText(text: string) {\n await expect(this.container).toContainText(text);\n }\n}\n"],"names":["PostMenu","ThreadFooter","expect"],"mappings":";;;;;;AAAA;AACA;AAOc,MAAO,YAAY,CAAA;AACpB,IAAA,SAAS;AAET,IAAA,IAAI;AACJ,IAAA,WAAW;AAEX,IAAA,gBAAgB;AAEhB,IAAA,QAAQ;AACR,IAAA,YAAY;AAErB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC;QAE5C,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;QAErD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AAE1D,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAIA,SAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAC7D,QAAA,IAAI,CAAC,YAAY,GAAG,IAAIC,aAAY,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;;AAG5E,IAAA,MAAM,WAAW,GAAA;QACb,MAAMC,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;;AAG9C;;AAEG;AACH,IAAA,MAAM,KAAK,GAAA;AACP,QAAA,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;AAGhC,IAAA,MAAM,KAAK,GAAA;QACP,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC;QAClDA,WAAM,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC,UAAU,EAAE;AAC5C,QAAA,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;;IAG/C,MAAM,eAAe,CAAC,QAAgB,EAAA;QAClC,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAG,EAAA,QAAQ,CAAgB,cAAA,CAAA,CAAC;;AAGrE;;;AAGG;AACH,IAAA,MAAM,MAAM,GAAA;;QAER,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,qBAAqB,CAAC;;AAGjE,QAAA,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;AAC5B,QAAA,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE;AACrC,QAAA,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE;;AAGvC;;;AAGG;IACH,MAAM,aAAa,CAAC,IAAY,EAAA;QAC5B,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC;;AAEvD;;;;"}
1
+ {"version":3,"file":"post.js","sources":["../../../../src/ui/components/channels/post.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 PostMenu from './post_menu';\nimport ThreadFooter from './thread_footer';\n\nexport default class ChannelsPost {\n readonly container: Locator;\n\n readonly body;\n readonly profileIcon;\n\n readonly removePostButton;\n\n readonly postMenu;\n readonly threadFooter;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.body = container.locator('.post__body');\n\n this.profileIcon = container.locator('.profile-icon');\n\n this.removePostButton = container.locator('.post__remove');\n\n this.postMenu = new PostMenu(container.locator('.post-menu'));\n this.threadFooter = new ThreadFooter(container.locator('.ThreadFooter'));\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n /**\n * Hover over the post. Can be used for post menu to appear.\n */\n async hover() {\n await this.container.hover();\n }\n\n async getId() {\n const id = await this.container.getAttribute('id');\n expect(id, 'No post ID found.').toBeTruthy();\n return (id || '').substring('post_'.length);\n }\n\n async getProfileImage(username: string) {\n return this.profileIcon.getByAltText(`${username} profile image`);\n }\n\n async openAThread() {\n await this.container.hover();\n await this.postMenu.toBeVisible();\n await this.postMenu.replyButton.waitFor();\n await this.postMenu.replyButton.click();\n }\n\n async reply() {\n await this.container.hover();\n await this.postMenu.toBeVisible();\n await this.postMenu.reply();\n }\n\n /**\n * Clicks on the deleted post's remove 'x' button.\n * Also verifies that the post is a deleted post.\n */\n async remove() {\n // Verify the post is a deleted post\n await expect(this.container).toContainText(/\\(message deleted\\)/);\n\n // Hover over the post and click on the remove post button\n await this.container.hover();\n await this.removePostButton.waitFor();\n await this.removePostButton.click();\n }\n\n /**\n * `toContainText` verifies if the post contains the specified text.\n * @param text Text to be verified in the post\n */\n async toContainText(text: string) {\n await expect(this.container).toContainText(text);\n }\n\n /**\n * `toNotContainText` verifies if the post does not contain the specified text.\n * @param text Text to be verified not in the post\n */\n async toNotContainText(text: string) {\n await expect(this.container).not.toContainText(text);\n }\n}\n"],"names":["PostMenu","ThreadFooter","expect"],"mappings":";;;;;;AAAA;AACA;AAOc,MAAO,YAAY,CAAA;AACpB,IAAA,SAAS;AAET,IAAA,IAAI;AACJ,IAAA,WAAW;AAEX,IAAA,gBAAgB;AAEhB,IAAA,QAAQ;AACR,IAAA,YAAY;AAErB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC;QAE5C,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;QAErD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AAE1D,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAIA,SAAQ,CAAC,SAAS,CAAC,OAA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,MAAM,MAAM,GAAA;;QAER,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,qBAAqB,CAAC;;AAGjE,QAAA,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;AAC5B,QAAA,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE;AACrC,QAAA,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE;IACvC;AAEA;;;AAGG;IACH,MAAM,aAAa,CAAC,IAAY,EAAA;QAC5B,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC;IACpD;AAEA;;;AAGG;IACH,MAAM,gBAAgB,CAAC,IAAY,EAAA;AAC/B,QAAA,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC;IACxD;AACH;;;;"}
@@ -5,7 +5,7 @@ export default class ChannelsPostCreate {
5
5
  readonly attachmentButton: Locator;
6
6
  readonly emojiButton: Locator;
7
7
  readonly sendMessageButton: Locator;
8
- readonly scheduleDraftMessageButton: Locator;
8
+ readonly scheduleMessageButton: Locator;
9
9
  readonly priorityButton: Locator;
10
10
  readonly suggestionList: Locator;
11
11
  readonly filePreview: Locator;
@@ -24,10 +24,6 @@ export default class ChannelsPostCreate {
24
24
  * Sends the message already written in the input
25
25
  */
26
26
  sendMessage(): Promise<void>;
27
- /**
28
- * Click on Scheduled Draft button to open options
29
- */
30
- clickOnScheduleDraftDropdownButton(): Promise<void>;
31
27
  /**
32
28
  * Opens the message priority menu
33
29
  */
@@ -14,7 +14,7 @@ class ChannelsPostCreate {
14
14
  attachmentButton;
15
15
  emojiButton;
16
16
  sendMessageButton;
17
- scheduleDraftMessageButton;
17
+ scheduleMessageButton;
18
18
  priorityButton;
19
19
  suggestionList;
20
20
  filePreview;
@@ -29,9 +29,9 @@ class ChannelsPostCreate {
29
29
  this.attachmentButton = container.locator('#fileUploadButton');
30
30
  this.emojiButton = container.getByLabel('select an emoji');
31
31
  this.sendMessageButton = container.getByTestId('SendMessageButton');
32
- this.scheduleDraftMessageButton = container.getByLabel('Schedule message');
32
+ this.scheduleMessageButton = container.getByLabel('Schedule message');
33
33
  this.priorityButton = container.getByLabel('Message priority');
34
- this.suggestionList = container.getByTestId('suggestionList');
34
+ this.suggestionList = container.getByRole('listbox', { name: 'Suggestions' });
35
35
  this.filePreview = container.locator('.file-preview__container');
36
36
  }
37
37
  async toBeVisible() {
@@ -66,15 +66,6 @@ class ChannelsPostCreate {
66
66
  await test.expect(this.sendMessageButton).toBeEnabled();
67
67
  await this.sendMessageButton.click();
68
68
  }
69
- /**
70
- * Click on Scheduled Draft button to open options
71
- */
72
- async clickOnScheduleDraftDropdownButton() {
73
- await test.expect(this.input).toBeVisible();
74
- await test.expect(this.scheduleDraftMessageButton).toBeVisible();
75
- await test.expect(this.scheduleDraftMessageButton).toBeEnabled();
76
- await this.scheduleDraftMessageButton.click();
77
- }
78
69
  /**
79
70
  * Opens the message priority menu
80
71
  */
@@ -1 +1 @@
1
- {"version":3,"file":"post_create.js","sources":["../../../../src/ui/components/channels/post_create.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport path from 'node:path';\n\nimport {Locator, expect} from '@playwright/test';\n\nimport {duration} from '@/util';\nimport {assetPath} from '@/file';\nimport {waitUntil} from '@/test_action';\n\nexport default class ChannelsPostCreate {\n readonly container: Locator;\n readonly input;\n\n readonly attachmentButton;\n readonly emojiButton;\n readonly sendMessageButton;\n readonly scheduleDraftMessageButton;\n readonly priorityButton;\n readonly suggestionList;\n readonly filePreview;\n\n constructor(container: Locator, isRHS = false) {\n this.container = container;\n\n if (!isRHS) {\n this.input = container.getByTestId('post_textbox');\n } else {\n this.input = container.getByTestId('reply_textbox');\n }\n\n this.attachmentButton = container.locator('#fileUploadButton');\n this.emojiButton = container.getByLabel('select an emoji');\n this.sendMessageButton = container.getByTestId('SendMessageButton');\n this.scheduleDraftMessageButton = container.getByLabel('Schedule message');\n this.priorityButton = container.getByLabel('Message priority');\n this.suggestionList = container.getByTestId('suggestionList');\n this.filePreview = container.locator('.file-preview__container');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n }\n\n /**\n * It just writes the message in the input and doesn't send it\n * @param message : Message to be written in the input\n */\n async writeMessage(message: string) {\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n\n await this.input.fill(message);\n }\n\n /**\n * Returns the value of the message input\n */\n async getInputValue() {\n await expect(this.input).toBeVisible();\n return await this.input.inputValue();\n }\n\n /**\n * Sends the message already written in the input\n */\n async sendMessage() {\n await expect(this.input).toBeVisible();\n const messageInputValue = await this.getInputValue();\n expect(messageInputValue).not.toBe('');\n\n await expect(this.sendMessageButton).toBeVisible();\n await expect(this.sendMessageButton).toBeEnabled();\n\n await this.sendMessageButton.click();\n }\n\n /**\n * Click on Scheduled Draft button to open options\n */\n async clickOnScheduleDraftDropdownButton() {\n await expect(this.input).toBeVisible();\n\n await expect(this.scheduleDraftMessageButton).toBeVisible();\n await expect(this.scheduleDraftMessageButton).toBeEnabled();\n\n await this.scheduleDraftMessageButton.click();\n }\n\n /**\n * Opens the message priority menu\n */\n async openPriorityMenu() {\n await expect(this.priorityButton).toBeVisible();\n await expect(this.priorityButton).toBeEnabled();\n await this.priorityButton.click();\n }\n\n /**\n * Composes and sends a message\n */\n async postMessage(message: string, files?: string[]) {\n await this.writeMessage(message);\n\n if (files) {\n const filePaths = files.map((file) => path.join(assetPath, file));\n this.container.page().once('filechooser', async (fileChooser) => {\n await fileChooser.setFiles(filePaths);\n });\n\n // Click on the attachment button\n await this.attachmentButton.click();\n\n // Wait until the file preview is displayed\n await this.waitUntilFilePreviewContains(files);\n }\n\n await this.sendMessage();\n }\n\n async openEmojiPicker() {\n await expect(this.emojiButton).toBeVisible();\n await this.emojiButton.click();\n }\n\n async waitUntilFilePreviewContains(files: string[], timeout = duration.ten_sec) {\n await waitUntil(\n async () => {\n const previews = this.filePreview.locator('.file-preview');\n const details = this.filePreview.locator('.post-image__details');\n\n const [previewsCount, detailsCount] = await Promise.all([previews.count(), details.count()]);\n\n return previewsCount === files.length && detailsCount === files.length;\n },\n {timeout},\n );\n }\n}\n"],"names":["expect","file","assetPath","duration","waitUntil"],"mappings":";;;;;;;;AAAA;AACA;AAUc,MAAO,kBAAkB,CAAA;AAC1B,IAAA,SAAS;AACT,IAAA,KAAK;AAEL,IAAA,gBAAgB;AAChB,IAAA,WAAW;AACX,IAAA,iBAAiB;AACjB,IAAA,0BAA0B;AAC1B,IAAA,cAAc;AACd,IAAA,cAAc;AACd,IAAA,WAAW;AAEpB,IAAA,WAAA,CAAY,SAAkB,EAAE,KAAK,GAAG,KAAK,EAAA;AACzC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,KAAK,EAAE;YACR,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC;;aAC/C;YACH,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,eAAe,CAAC;;QAGvD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC,mBAAmB,CAAC;QAC9D,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,iBAAiB,CAAC;QAC1D,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,WAAW,CAAC,mBAAmB,CAAC;QACnE,IAAI,CAAC,0BAA0B,GAAG,SAAS,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAC1E,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAC9D,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC,WAAW,CAAC,gBAAgB,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,OAAO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AAQ,CAAC,OAAO,EAAA;AAC1E,QAAA,MAAMC,wBAAS,CACX,YAAW;YACP,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC;YAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,sBAAsB,CAAC;YAEhE,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;YAE5F,OAAO,aAAa,KAAK,KAAK,CAAC,MAAM,IAAI,YAAY,KAAK,KAAK,CAAC,MAAM;AAC1E,SAAC,EACD,EAAC,OAAO,EAAC,CACZ;;AAER;;;;"}
1
+ {"version":3,"file":"post_create.js","sources":["../../../../src/ui/components/channels/post_create.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport path from 'node:path';\n\nimport {Locator, expect} from '@playwright/test';\n\nimport {duration} from '@/util';\nimport {assetPath} from '@/file';\nimport {waitUntil} from '@/test_action';\n\nexport default class ChannelsPostCreate {\n readonly container: Locator;\n readonly input;\n\n readonly attachmentButton;\n readonly emojiButton;\n readonly sendMessageButton;\n readonly scheduleMessageButton;\n readonly priorityButton;\n readonly suggestionList;\n readonly filePreview;\n\n constructor(container: Locator, isRHS = false) {\n this.container = container;\n\n if (!isRHS) {\n this.input = container.getByTestId('post_textbox');\n } else {\n this.input = container.getByTestId('reply_textbox');\n }\n\n this.attachmentButton = container.locator('#fileUploadButton');\n this.emojiButton = container.getByLabel('select an emoji');\n this.sendMessageButton = container.getByTestId('SendMessageButton');\n this.scheduleMessageButton = container.getByLabel('Schedule message');\n this.priorityButton = container.getByLabel('Message priority');\n this.suggestionList = container.getByRole('listbox', {name: 'Suggestions'});\n this.filePreview = container.locator('.file-preview__container');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n }\n\n /**\n * It just writes the message in the input and doesn't send it\n * @param message : Message to be written in the input\n */\n async writeMessage(message: string) {\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n\n await this.input.fill(message);\n }\n\n /**\n * Returns the value of the message input\n */\n async getInputValue() {\n await expect(this.input).toBeVisible();\n return await this.input.inputValue();\n }\n\n /**\n * Sends the message already written in the input\n */\n async sendMessage() {\n await expect(this.input).toBeVisible();\n const messageInputValue = await this.getInputValue();\n expect(messageInputValue).not.toBe('');\n\n await expect(this.sendMessageButton).toBeVisible();\n await expect(this.sendMessageButton).toBeEnabled();\n\n await this.sendMessageButton.click();\n }\n\n /**\n * Opens the message priority menu\n */\n async openPriorityMenu() {\n await expect(this.priorityButton).toBeVisible();\n await expect(this.priorityButton).toBeEnabled();\n await this.priorityButton.click();\n }\n\n /**\n * Composes and sends a message\n */\n async postMessage(message: string, files?: string[]) {\n await this.writeMessage(message);\n\n if (files) {\n const filePaths = files.map((file) => path.join(assetPath, file));\n this.container.page().once('filechooser', async (fileChooser) => {\n await fileChooser.setFiles(filePaths);\n });\n\n // Click on the attachment button\n await this.attachmentButton.click();\n\n // Wait until the file preview is displayed\n await this.waitUntilFilePreviewContains(files);\n }\n\n await this.sendMessage();\n }\n\n async openEmojiPicker() {\n await expect(this.emojiButton).toBeVisible();\n await this.emojiButton.click();\n }\n\n async waitUntilFilePreviewContains(files: string[], timeout = duration.ten_sec) {\n await waitUntil(\n async () => {\n const previews = this.filePreview.locator('.file-preview');\n const details = this.filePreview.locator('.post-image__details');\n\n const [previewsCount, detailsCount] = await Promise.all([previews.count(), details.count()]);\n\n return previewsCount === files.length && detailsCount === files.length;\n },\n {timeout},\n );\n }\n}\n"],"names":["expect","file","assetPath","duration","waitUntil"],"mappings":";;;;;;;;AAAA;AACA;AAUc,MAAO,kBAAkB,CAAA;AAC1B,IAAA,SAAS;AACT,IAAA,KAAK;AAEL,IAAA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
17
17
  readonly deleteMenuItem: Locator;
18
+ readonly flagMessageMenuItem: Locator;
18
19
  constructor(container: Locator);
19
20
  toBeVisible(): Promise<void>;
21
+ flagMessageMenuItemNotToBeVisible(): Promise<void>;
20
22
  }
@@ -20,6 +20,7 @@ class PostDotMenu {
20
20
  editMenuItem;
21
21
  copyTextMenuItem;
22
22
  deleteMenuItem;
23
+ flagMessageMenuItem;
23
24
  constructor(container) {
24
25
  this.container = container;
25
26
  const getMenuItem = (hasText) => container.getByRole('menuitem').filter({ hasText });
@@ -37,10 +38,14 @@ class PostDotMenu {
37
38
  this.editMenuItem = getMenuItem('Edit');
38
39
  this.copyTextMenuItem = getMenuItem('Copy Text');
39
40
  this.deleteMenuItem = getMenuItem('Delete');
41
+ this.flagMessageMenuItem = getMenuItem('Flag Message');
40
42
  }
41
43
  async toBeVisible() {
42
44
  await test.expect(this.container).toBeVisible();
43
45
  }
46
+ async flagMessageMenuItemNotToBeVisible() {
47
+ await test.expect(this.flagMessageMenuItem).not.toBeVisible();
48
+ }
44
49
  }
45
50
 
46
51
  module.exports = PostDotMenu;
@@ -1 +1 @@
1
- {"version":3,"file":"post_dot_menu.js","sources":["../../../../src/ui/components/channels/post_dot_menu.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 PostDotMenu {\n readonly container: Locator;\n\n readonly replyMenuItem;\n readonly forwardMenuItem;\n readonly followMessageMenuItem;\n readonly markAsUnreadMenuItem;\n readonly remindMenuItem;\n readonly saveMenuItem;\n readonly removeFromSavedMenuItem;\n readonly pinToChannelMenuItem;\n readonly unpinFromChannelMenuItem;\n readonly moveThreadMenuItem;\n readonly copyLinkMenuItem;\n readonly editMenuItem;\n readonly copyTextMenuItem;\n readonly deleteMenuItem;\n\n constructor(container: Locator) {\n this.container = container;\n\n const getMenuItem = (hasText: string) => container.getByRole('menuitem').filter({hasText});\n\n this.replyMenuItem = getMenuItem('Reply');\n this.forwardMenuItem = getMenuItem('Forward');\n this.followMessageMenuItem = getMenuItem('Follow message');\n this.markAsUnreadMenuItem = getMenuItem('Mark as Unread');\n this.remindMenuItem = getMenuItem('Remind');\n this.saveMenuItem = getMenuItem('Save');\n this.removeFromSavedMenuItem = getMenuItem('Remove from Saved');\n this.pinToChannelMenuItem = getMenuItem('Pin to Channel');\n this.unpinFromChannelMenuItem = getMenuItem('Unpin from Channel');\n this.moveThreadMenuItem = getMenuItem('Move Thread');\n this.copyLinkMenuItem = getMenuItem('Copy Link');\n this.editMenuItem = getMenuItem('Edit');\n this.copyTextMenuItem = getMenuItem('Copy Text');\n this.deleteMenuItem = getMenuItem('Delete');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,WAAW,CAAA;AACnB,IAAA,SAAS;AAET,IAAA,aAAa;AACb,IAAA,eAAe;AACf,IAAA,qBAAqB;AACrB,IAAA,oBAAoB;AACpB,IAAA,cAAc;AACd,IAAA,YAAY;AACZ,IAAA,uBAAuB;AACvB,IAAA,oBAAoB;AACpB,IAAA,wBAAwB;AACxB,IAAA,kBAAkB;AAClB,IAAA,gBAAgB;AAChB,IAAA,YAAY;AACZ,IAAA,gBAAgB;AAChB,IAAA,cAAc;AAEvB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,MAAM,WAAW,GAAG,CAAC,OAAe,KAAK,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAC,OAAO,EAAC,CAAC;AAE1F,QAAA,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC;AACzC,QAAA,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,SAAS,CAAC;AAC7C,QAAA,IAAI,CAAC,qBAAqB,GAAG,WAAW,CAAC,gBAAgB,CAAC;AAC1D,QAAA,IAAI,CAAC,oBAAoB,GAAG,WAAW,CAAC,gBAAgB,CAAC;AACzD,QAAA,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC;AAC3C,QAAA,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC;AACvC,QAAA,IAAI,CAAC,uBAAuB,GAAG,WAAW,CAAC,mBAAmB,CAAC;AAC/D,QAAA,IAAI,CAAC,oBAAoB,GAAG,WAAW,CAAC,gBAAgB,CAAC;AACzD,QAAA,IAAI,CAAC,wBAAwB,GAAG,WAAW,CAAC,oBAAoB,CAAC;AACjE,QAAA,IAAI,CAAC,kBAAkB,GAAG,WAAW,CAAC,aAAa,CAAC;AACpD,QAAA,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,WAAW,CAAC;AAChD,QAAA,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC;AACvC,QAAA,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,WAAW,CAAC;AAChD,QAAA,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC;;AAG/C,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;;AAEjD;;;;"}
1
+ {"version":3,"file":"post_dot_menu.js","sources":["../../../../src/ui/components/channels/post_dot_menu.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 PostDotMenu {\n readonly container: Locator;\n\n readonly replyMenuItem;\n readonly forwardMenuItem;\n readonly followMessageMenuItem;\n readonly markAsUnreadMenuItem;\n readonly remindMenuItem;\n readonly saveMenuItem;\n readonly removeFromSavedMenuItem;\n readonly pinToChannelMenuItem;\n readonly unpinFromChannelMenuItem;\n readonly moveThreadMenuItem;\n readonly copyLinkMenuItem;\n readonly editMenuItem;\n readonly copyTextMenuItem;\n readonly deleteMenuItem;\n readonly flagMessageMenuItem;\n\n constructor(container: Locator) {\n this.container = container;\n\n const getMenuItem = (hasText: string) => container.getByRole('menuitem').filter({hasText});\n\n this.replyMenuItem = getMenuItem('Reply');\n this.forwardMenuItem = getMenuItem('Forward');\n this.followMessageMenuItem = getMenuItem('Follow message');\n this.markAsUnreadMenuItem = getMenuItem('Mark as Unread');\n this.remindMenuItem = getMenuItem('Remind');\n this.saveMenuItem = getMenuItem('Save');\n this.removeFromSavedMenuItem = getMenuItem('Remove from Saved');\n this.pinToChannelMenuItem = getMenuItem('Pin to Channel');\n this.unpinFromChannelMenuItem = getMenuItem('Unpin from Channel');\n this.moveThreadMenuItem = getMenuItem('Move Thread');\n this.copyLinkMenuItem = getMenuItem('Copy Link');\n this.editMenuItem = getMenuItem('Edit');\n this.copyTextMenuItem = getMenuItem('Copy Text');\n this.deleteMenuItem = getMenuItem('Delete');\n this.flagMessageMenuItem = getMenuItem('Flag Message');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n async flagMessageMenuItemNotToBeVisible() {\n await expect(this.flagMessageMenuItem).not.toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,WAAW,CAAA;AACnB,IAAA,SAAS;AAET,IAAA,aAAa;AACb,IAAA,eAAe;AACf,IAAA,qBAAqB;AACrB,IAAA,oBAAoB;AACpB,IAAA,cAAc;AACd,IAAA,YAAY;AACZ,IAAA,uBAAuB;AACvB,IAAA,oBAAoB;AACpB,IAAA,wBAAwB;AACxB,IAAA,kBAAkB;AAClB,IAAA,gBAAgB;AAChB,IAAA,YAAY;AACZ,IAAA,gBAAgB;AAChB,IAAA,cAAc;AACd,IAAA,mBAAmB;AAE5B,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,MAAM,WAAW,GAAG,CAAC,OAAe,KAAK,SAAS,CAAC,SAAS,CAAC,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AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"post_edit.js","sources":["../../../../src/ui/components/channels/post_edit.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport path from 'node:path';\n\nimport {Locator, expect} from '@playwright/test';\n\nimport DeletePostConfirmationDialog from './delete_post_confirmation_dialog';\nimport RestorePostConfirmationDialog from './restore_post_confirmation_dialog';\n\nimport {assetPath} from '@/file';\n\nexport default class ChannelsPostEdit {\n readonly container: Locator;\n readonly input;\n\n readonly attachmentButton;\n readonly emojiButton;\n readonly sendMessageButton;\n readonly deleteConfirmationDialog;\n readonly restorePostConfirmationDialog;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.input = container.getByTestId('edit_textbox');\n\n this.attachmentButton = container.locator('#fileUploadButton');\n this.emojiButton = container.getByLabel('select an emoji');\n this.sendMessageButton = container.locator('.save');\n this.deleteConfirmationDialog = new DeletePostConfirmationDialog(container.page().locator('#deletePostModal'));\n this.restorePostConfirmationDialog = new RestorePostConfirmationDialog(\n container.page().locator('#restorePostModal'),\n );\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n }\n\n async toNotBeVisible() {\n await expect(this.input).not.toBeVisible();\n }\n\n async writeMessage(message: string) {\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n\n await this.input.clear();\n await this.input.fill(message);\n }\n\n async addFiles(files: string[]) {\n const filePaths = files.map((file) => path.join(assetPath, file));\n this.container.page().once('filechooser', async (fileChooser) => {\n await fileChooser.setFiles(filePaths);\n });\n\n await this.attachmentButton.click();\n }\n\n async removeFile(fileName: string) {\n const files = await this.container.locator(`.file-preview`).all();\n\n for (let i = 0; i < files.length; i++) {\n const textContent = await files[i].textContent();\n if (textContent?.includes(fileName)) {\n const removeButton = files[i].locator('.icon-close');\n await removeButton.click();\n break;\n }\n }\n }\n\n async sendMessage() {\n await this.input.scrollIntoViewIfNeeded();\n\n await expect(this.sendMessageButton).toBeVisible();\n await expect(this.sendMessageButton).toBeEnabled();\n\n await this.sendMessageButton.click();\n }\n\n async postMessage(message: string) {\n await this.writeMessage(message);\n await this.sendMessage();\n }\n\n async toContainText(text: string) {\n await expect(this.container).toContainText(text);\n }\n}\n"],"names":["DeletePostConfirmationDialog","RestorePostConfirmationDialog","expect","file","assetPath"],"mappings":";;;;;;;;AAAA;AACA;AAWc,MAAO,gBAAgB,CAAA;AACxB,IAAA,SAAS;AACT,IAAA,KAAK;AAEL,IAAA,gBAAgB;AAChB,IAAA,WAAW;AACX,IAAA,iBAAiB;AACjB,IAAA,wBAAwB;AACxB,IAAA,6BAA6B;AAEtC,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC;QAElD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC,mBAAmB,CAAC;QAC9D,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,iBAAiB,CAAC;QAC1D,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;AACnD,QAAA,IAAI,CAAC,wBAAwB,GAAG,IAAIA,+BAA4B,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC9G,QAAA,IAAI,CAAC,6BAA6B,GAAG,IAAIC,gCAA6B,CAClE,SAAS,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAChD;;AAGL,IAAA,MAAM,WAAW,GAAA;QACb,MAAMC,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;AAE1C,QAAA,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;QAC1B,MAAMA,WAAM,CAAC,IAAI,CAAC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K,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;AACpD,gBAAA,MAAM,YAAY,CAAC,KAAK,EAAE;gBAC1B;;;;AAKZ,IAAA,MAAM,WAAW,GAAA;AACb,QAAA,MAAM,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE;QAEzC,MAAMD,WAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE;QAClD,MAAMA,WAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE;AAElD,QAAA,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE;;IAGxC,MAAM,WAAW,CAAC,OAAe,EAAA;AAC7B,QAAA,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;AAChC,QAAA,MAAM,IAAI,CAAC,WAAW,EAAE;;IAG5B,MAAM,aAAa,CAAC,IAAY,EAAA;QAC5B,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC;;AAEvD;;;;"}
1
+ {"version":3,"file":"post_edit.js","sources":["../../../../src/ui/components/channels/post_edit.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport path from 'node:path';\n\nimport {Locator, expect} from '@playwright/test';\n\nimport DeletePostConfirmationDialog from './delete_post_confirmation_dialog';\nimport RestorePostConfirmationDialog from './restore_post_confirmation_dialog';\n\nimport {assetPath} from '@/file';\n\nexport default class ChannelsPostEdit {\n readonly container: Locator;\n readonly input;\n\n readonly attachmentButton;\n readonly emojiButton;\n readonly sendMessageButton;\n readonly deleteConfirmationDialog;\n readonly restorePostConfirmationDialog;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.input = container.getByTestId('edit_textbox');\n\n this.attachmentButton = container.locator('#fileUploadButton');\n this.emojiButton = container.getByLabel('select an emoji');\n this.sendMessageButton = container.locator('.save');\n this.deleteConfirmationDialog = new DeletePostConfirmationDialog(container.page().locator('#deletePostModal'));\n this.restorePostConfirmationDialog = new RestorePostConfirmationDialog(\n container.page().locator('#restorePostModal'),\n );\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n }\n\n async toNotBeVisible() {\n await expect(this.input).not.toBeVisible();\n }\n\n async writeMessage(message: string) {\n await this.input.waitFor();\n await expect(this.input).toBeVisible();\n\n await this.input.clear();\n await this.input.fill(message);\n }\n\n async addFiles(files: string[]) {\n const filePaths = files.map((file) => path.join(assetPath, file));\n this.container.page().once('filechooser', async (fileChooser) => {\n await fileChooser.setFiles(filePaths);\n });\n\n await this.attachmentButton.click();\n }\n\n async removeFile(fileName: string) {\n const files = await this.container.locator(`.file-preview`).all();\n\n for (let i = 0; i < files.length; i++) {\n const textContent = await files[i].textContent();\n if (textContent?.includes(fileName)) {\n const removeButton = files[i].locator('.icon-close');\n await removeButton.click();\n break;\n }\n }\n }\n\n async sendMessage() {\n await this.input.scrollIntoViewIfNeeded();\n\n await expect(this.sendMessageButton).toBeVisible();\n await expect(this.sendMessageButton).toBeEnabled();\n\n await this.sendMessageButton.click();\n }\n\n async postMessage(message: string) {\n await this.writeMessage(message);\n await this.sendMessage();\n }\n\n async toContainText(text: string) {\n await expect(this.container).toContainText(text);\n }\n}\n"],"names":["DeletePostConfirmationDialog","RestorePostConfirmationDialog","expect","file","assetPath"],"mappings":";;;;;;;;AAAA;AACA;AAWc,MAAO,gBAAgB,CAAA;AACxB,IAAA,SAAS;AACT,IAAA,KAAK;AAEL,IAAA,gBAAgB;AAChB,IAAA,WAAW;AACX,IAAA,iBAAiB;AACjB,IAAA,wBAAwB;AACxB,IAAA,6BAA6B;AAEtC,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC;QAElD,IAAI,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AC,IAAY,EAAA;QAC5B,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC;IACpD;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"post_menu.js","sources":["../../../../src/ui/components/channels/post_menu.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 PostMenu {\n readonly container: Locator;\n\n readonly plusOneEmojiButton;\n readonly grinningEmojiButton;\n readonly whiteCheckMarkEmojiButton;\n readonly addReactionButton;\n readonly saveButton;\n readonly replyButton;\n readonly actionsButton;\n readonly dotMenuButton;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.plusOneEmojiButton = container.getByRole('button', {name: '+1 emoji'});\n this.grinningEmojiButton = container.getByRole('button', {name: 'grinning emoji'});\n this.whiteCheckMarkEmojiButton = container.getByRole('button', {name: 'white check mark emoji'});\n this.addReactionButton = container.getByRole('button', {name: 'add reaction'});\n this.saveButton = container.getByRole('button', {name: 'save'});\n this.actionsButton = container.getByRole('button', {name: 'actions'});\n this.replyButton = container.getByRole('button', {name: 'reply'});\n this.dotMenuButton = container.getByRole('button', {name: 'more'});\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n /**\n * Clicks on the reply button from the post menu.\n */\n async reply() {\n await this.replyButton.waitFor();\n await this.replyButton.click();\n }\n\n /**\n * Clicks on the dot menu button from the post menu.\n */\n async openDotMenu() {\n await this.dotMenuButton.waitFor();\n await this.dotMenuButton.click();\n }\n\n /**\n * Clicks on dot menu button.\n */\n async clickOnDotMenu() {\n await this.dotMenuButton.click();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,QAAQ,CAAA;AAChB,IAAA,SAAS;AAET,IAAA,kBAAkB;AAClB,IAAA,mBAAmB;AACnB,IAAA,yBAAyB;AACzB,IAAA,iBAAiB;AACjB,IA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;AAChC,QAAA,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;AAGlC;;AAEG;AACH,IAAA,MAAM,WAAW,GAAA;AACb,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;AAClC,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;;AAGpC;;AAEG;AACH,IAAA,MAAM,cAAc,GAAA;AAChB,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;;AAEvC;;;;"}
1
+ {"version":3,"file":"post_menu.js","sources":["../../../../src/ui/components/channels/post_menu.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 PostMenu {\n readonly container: Locator;\n\n readonly plusOneEmojiButton;\n readonly grinningEmojiButton;\n readonly whiteCheckMarkEmojiButton;\n readonly addReactionButton;\n readonly saveButton;\n readonly replyButton;\n readonly actionsButton;\n readonly dotMenuButton;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.plusOneEmojiButton = container.getByRole('button', {name: '+1 emoji'});\n this.grinningEmojiButton = container.getByRole('button', {name: 'grinning emoji'});\n this.whiteCheckMarkEmojiButton = container.getByRole('button', {name: 'white check mark emoji'});\n this.addReactionButton = container.getByRole('button', {name: 'add reaction'});\n this.saveButton = container.getByRole('button', {name: 'save'});\n this.actionsButton = container.getByRole('button', {name: 'actions'});\n this.replyButton = container.getByRole('button', {name: 'reply'});\n this.dotMenuButton = container.getByRole('button', {name: 'more'});\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n\n /**\n * Clicks on the reply button from the post menu.\n */\n async reply() {\n await this.replyButton.waitFor();\n await this.replyButton.click();\n }\n\n /**\n * Clicks on the dot menu button from the post menu.\n */\n async openDotMenu() {\n await this.dotMenuButton.waitFor();\n await this.dotMenuButton.click();\n }\n\n /**\n * Clicks on dot menu button.\n */\n async clickOnDotMenu() {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ACtE;AAEA,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;IAC9C;AAEA;;AAEG;AACH,IAAA,MAAM,KAAK,GAAA;AACP,QAAA,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;AAChC,QAAA,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;IAClC;AAEA;;AAEG;AACH,IAAA,MAAM,WAAW,GAAA;AACb,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;AAClC,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;IACpC;AAEA;;AAEG;AACH,IAAA,MAAM,cAAc,GAAA;AAChB,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;IACpC;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"post_reminder_menu.js","sources":["../../../../src/ui/components/channels/post_reminder_menu.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 PostReminderMenu {\n readonly container: Locator;\n\n readonly thirtyMinsMenuItem;\n readonly oneHourMenuItem;\n readonly twoHoursMenuItem;\n readonly tomorrowMenuItem;\n readonly customMenuItem;\n\n constructor(container: Locator) {\n this.container = container;\n\n const getMenuItem = (hasText: string) => container.getByRole('menuitem').filter({hasText});\n\n this.thirtyMinsMenuItem = getMenuItem('30 mins');\n this.oneHourMenuItem = getMenuItem('1 hour');\n this.twoHoursMenuItem = getMenuItem('2 hours');\n this.tomorrowMenuItem = getMenuItem('Tomorrow');\n this.customMenuItem = getMenuItem('Custom');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,gBAAgB,CAAA;AACxB,IAAA,SAAS;AAET,IAAA,kBAAkB;AAClB,IAAA,eAAe;AACf,IAAA,gBAAgB;AAChB,IAAA,gBAAgB;AAChB,IAAA,cAAc;AAEvB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,MAAM,WAAW,GAAG,CAAC,OAAe,KAAK,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAC,OAAO,EAAC,CAAC;AAE1F,QAAA,IAAI,CAAC,kBAAkB,GAAG,WAAW,CAAC,SAAS,CAAC;AAChD,QAAA,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC;AAC5C,QAAA,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,SAAS,CAAC;AAC9C,QAAA,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,UAAU,CAAC;AAC/C,QAAA,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC;;AAG/C,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;;AAEjD;;;;"}
1
+ {"version":3,"file":"post_reminder_menu.js","sources":["../../../../src/ui/components/channels/post_reminder_menu.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 PostReminderMenu {\n readonly container: Locator;\n\n readonly thirtyMinsMenuItem;\n readonly oneHourMenuItem;\n readonly twoHoursMenuItem;\n readonly tomorrowMenuItem;\n readonly customMenuItem;\n\n constructor(container: Locator) {\n this.container = container;\n\n const getMenuItem = (hasText: string) => container.getByRole('menuitem').filter({hasText});\n\n this.thirtyMinsMenuItem = getMenuItem('30 mins');\n this.oneHourMenuItem = getMenuItem('1 hour');\n this.twoHoursMenuItem = getMenuItem('2 hours');\n this.tomorrowMenuItem = getMenuItem('Tomorrow');\n this.customMenuItem = getMenuItem('Custom');\n }\n\n async toBeVisible() {\n await expect(this.container).toBeVisible();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,gBAAgB,CAAA;AACxB,IAAA,SAAS;AAET,IAAA,kBAAkB;AAClB,IAAA,eAAe;AACf,IAAA,gBAAgB;AAChB,IAAA,gBAAgB;AAChB,IAAA,cAAc;AAEvB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,MAAM,WAAW,GAAG,CAAC,OAAe,KAAK,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAC,OAAO,EAAC,CAAC;AAE1F,QAAA,IAAI,CAAC,kBAAkB,GAAG,WAAW,CAAC,SAAS,CAAC;AAChD,QAAA,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC;AAC5C,QAAA,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,SAAS,CAAC;AAC9C,QAAA,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,UAAU,CAAC;AAC/C,QAAA,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC;IAC/C;AAEA,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;IAC9C;AACH;;;;"}
@@ -0,0 +1,27 @@
1
+ import { Locator } from '@playwright/test';
2
+ export default class ProfileModal {
3
+ readonly container: Locator;
4
+ readonly profileSettingsButton: Locator;
5
+ readonly securityButton: Locator;
6
+ readonly profileSettingsTab: ProfileSettingsTab;
7
+ readonly securityTab: SecurityTab;
8
+ readonly closeButton: Locator;
9
+ readonly saveButton: Locator;
10
+ readonly cancelButton: Locator;
11
+ constructor(container: Locator);
12
+ toBeVisible(): Promise<void>;
13
+ openProfileSettingsTab(): Promise<ProfileSettingsTab>;
14
+ openSecurityTab(): Promise<SecurityTab>;
15
+ closeModal(): Promise<void>;
16
+ }
17
+ declare class ProfileSettingsTab {
18
+ readonly container: Locator;
19
+ constructor(container: Locator);
20
+ toBeVisible(): Promise<void>;
21
+ }
22
+ declare class SecurityTab {
23
+ readonly container: Locator;
24
+ constructor(container: Locator);
25
+ toBeVisible(): Promise<void>;
26
+ }
27
+ export {};