@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.
- package/dist/browser_context.d.ts +4 -2
- package/dist/browser_context.js +24 -4
- package/dist/browser_context.js.map +1 -1
- package/dist/constant.d.ts +2 -0
- package/dist/constant.js +5 -0
- package/dist/constant.js.map +1 -1
- package/dist/file.js +2 -1
- package/dist/file.js.map +1 -1
- package/dist/flag.js +1 -1
- package/dist/flag.js.map +1 -1
- package/dist/global_setup.js +26 -4
- package/dist/global_setup.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +93 -3
- package/dist/index.js.map +1 -1
- package/dist/mock_browser_api.js.map +1 -1
- package/dist/server/channel.js.map +1 -1
- package/dist/server/client.d.ts +6 -0
- package/dist/server/client.js +6 -0
- package/dist/server/client.js.map +1 -1
- package/dist/server/default_config.d.ts +1 -0
- package/dist/server/default_config.js +100 -29
- package/dist/server/default_config.js.map +1 -1
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +9 -0
- package/dist/server/init.d.ts +9 -8
- package/dist/server/init.js +3 -11
- package/dist/server/init.js.map +1 -1
- package/dist/server/post.js.map +1 -1
- package/dist/server/team.d.ts +8 -1
- package/dist/server/team.js +13 -2
- package/dist/server/team.js.map +1 -1
- package/dist/server/user.d.ts +9 -2
- package/dist/server/user.js +36 -2
- package/dist/server/user.js.map +1 -1
- package/dist/test_action.d.ts +9 -0
- package/dist/test_action.js +39 -2
- package/dist/test_action.js.map +1 -1
- package/dist/test_config.js +1 -1
- package/dist/test_config.js.map +1 -1
- package/dist/test_fixture.d.ts +10 -3
- package/dist/test_fixture.js +19 -4
- package/dist/test_fixture.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +3 -0
- package/dist/ui/components/channels/app_bar.js.map +1 -1
- package/dist/ui/components/channels/center_view.d.ts +17 -13
- package/dist/ui/components/channels/center_view.js +55 -25
- package/dist/ui/components/channels/center_view.js.map +1 -1
- package/dist/ui/components/channels/channel_settings/channel_settings_modal.d.ts +17 -0
- package/dist/ui/components/channels/channel_settings/channel_settings_modal.js +49 -0
- package/dist/ui/components/channels/channel_settings/channel_settings_modal.js.map +1 -0
- package/dist/ui/components/channels/channel_settings/configuration_settings.d.ts +11 -0
- package/dist/ui/components/channels/channel_settings/configuration_settings.js +48 -0
- package/dist/ui/components/channels/channel_settings/configuration_settings.js.map +1 -0
- package/dist/ui/components/channels/{scheduled_draft_menu.d.ts → channel_settings/info_settings.d.ts} +1 -3
- package/dist/ui/components/channels/channel_settings/info_settings.js +18 -0
- package/dist/ui/components/channels/channel_settings/info_settings.js.map +1 -0
- package/dist/ui/components/channels/delete_post_confirmation_dialog.js.map +1 -1
- package/dist/ui/components/channels/delete_post_modal.js.map +1 -1
- package/dist/ui/components/channels/delete_scheduled_post_modal.d.ts +10 -0
- package/dist/ui/components/channels/delete_scheduled_post_modal.js +26 -0
- package/dist/ui/components/channels/delete_scheduled_post_modal.js.map +1 -0
- package/dist/ui/components/channels/draft_post.d.ts +16 -0
- package/dist/ui/components/channels/draft_post.js +39 -0
- package/dist/ui/components/channels/draft_post.js.map +1 -0
- package/dist/ui/components/channels/emoji_gif_picker.d.ts +2 -0
- package/dist/ui/components/channels/emoji_gif_picker.js +6 -0
- package/dist/ui/components/channels/emoji_gif_picker.js.map +1 -1
- package/dist/ui/components/channels/find_channels_modal.js.map +1 -1
- package/dist/ui/components/channels/flag_post_confirmation_dialog.d.ts +24 -0
- package/dist/ui/components/channels/flag_post_confirmation_dialog.js +74 -0
- package/dist/ui/components/channels/flag_post_confirmation_dialog.js.map +1 -0
- package/dist/ui/components/channels/generic_confirm_modal.js.map +1 -1
- package/dist/ui/components/channels/header.d.ts +2 -0
- package/dist/ui/components/channels/header.js +6 -0
- package/dist/ui/components/channels/header.js.map +1 -1
- package/dist/ui/components/channels/invite_people_modal.d.ts +6 -0
- package/dist/ui/components/channels/invite_people_modal.js +18 -0
- package/dist/ui/components/channels/invite_people_modal.js.map +1 -0
- package/dist/ui/components/channels/message_priority.d.ts +0 -1
- package/dist/ui/components/channels/message_priority.js +2 -7
- package/dist/ui/components/channels/message_priority.js.map +1 -1
- package/dist/ui/components/channels/post.d.ts +7 -0
- package/dist/ui/components/channels/post.js +18 -0
- package/dist/ui/components/channels/post.js.map +1 -1
- package/dist/ui/components/channels/post_create.d.ts +1 -5
- package/dist/ui/components/channels/post_create.js +3 -12
- package/dist/ui/components/channels/post_create.js.map +1 -1
- package/dist/ui/components/channels/post_dot_menu.d.ts +2 -0
- package/dist/ui/components/channels/post_dot_menu.js +5 -0
- package/dist/ui/components/channels/post_dot_menu.js.map +1 -1
- package/dist/ui/components/channels/post_edit.js.map +1 -1
- package/dist/ui/components/channels/post_menu.js.map +1 -1
- package/dist/ui/components/channels/post_reminder_menu.js.map +1 -1
- package/dist/ui/components/channels/profile_modal.d.ts +27 -0
- package/dist/ui/components/channels/profile_modal.js +66 -0
- package/dist/ui/components/channels/profile_modal.js.map +1 -0
- package/dist/ui/components/channels/restore_post_confirmation_dialog.js.map +1 -1
- package/dist/ui/components/channels/schedule_message_menu.d.ts +12 -0
- package/dist/ui/components/channels/schedule_message_menu.js +31 -0
- package/dist/ui/components/channels/schedule_message_menu.js.map +1 -0
- package/dist/ui/components/channels/schedule_message_modal.d.ts +20 -0
- package/dist/ui/components/channels/schedule_message_modal.js +91 -0
- package/dist/ui/components/channels/schedule_message_modal.js.map +1 -0
- package/dist/ui/components/channels/scheduled_draft_modal.js.map +1 -1
- package/dist/ui/components/channels/scheduled_post.d.ts +20 -0
- package/dist/ui/components/channels/scheduled_post.js +47 -0
- package/dist/ui/components/channels/scheduled_post.js.map +1 -0
- package/dist/ui/components/channels/scheduled_post_indicator.d.ts +12 -0
- package/dist/ui/components/channels/scheduled_post_indicator.js +32 -0
- package/dist/ui/components/channels/scheduled_post_indicator.js.map +1 -0
- package/dist/ui/components/channels/{search_popover.d.ts → search_box.d.ts} +1 -1
- package/dist/ui/components/channels/{search_popover.js → search_box.js} +4 -3
- package/dist/ui/components/channels/search_box.js.map +1 -0
- package/dist/ui/components/channels/send_message_now_modal.d.ts +10 -0
- package/dist/ui/components/channels/send_message_now_modal.js +26 -0
- package/dist/ui/components/channels/send_message_now_modal.js.map +1 -0
- package/dist/ui/components/channels/settings/advanced_settings.d.ts +15 -0
- package/dist/ui/components/channels/settings/advanced_settings.js +35 -0
- package/dist/ui/components/channels/settings/advanced_settings.js.map +1 -0
- package/dist/ui/components/channels/settings/display_settings.d.ts +27 -0
- package/dist/ui/components/channels/settings/display_settings.js +77 -0
- package/dist/ui/components/channels/settings/display_settings.js.map +1 -0
- package/dist/ui/components/channels/settings/{notification_settings.d.ts → notifications_settings.d.ts} +12 -0
- package/dist/ui/components/channels/settings/{notification_settings.js → notifications_settings.js} +23 -1
- package/dist/ui/components/channels/settings/notifications_settings.js.map +1 -0
- package/dist/ui/components/channels/settings/settings_modal.d.ts +19 -4
- package/dist/ui/components/channels/settings/settings_modal.js +48 -7
- package/dist/ui/components/channels/settings/settings_modal.js.map +1 -1
- package/dist/ui/components/channels/settings/sidebar_settings.d.ts +12 -0
- package/dist/ui/components/channels/settings/sidebar_settings.js +28 -0
- package/dist/ui/components/channels/settings/sidebar_settings.js.map +1 -0
- package/dist/ui/components/channels/sidebar_left.d.ts +16 -3
- package/dist/ui/components/channels/sidebar_left.js +26 -9
- package/dist/ui/components/channels/sidebar_left.js.map +1 -1
- package/dist/ui/components/channels/sidebar_right.d.ts +3 -2
- package/dist/ui/components/channels/sidebar_right.js +6 -6
- package/dist/ui/components/channels/sidebar_right.js.map +1 -1
- package/dist/ui/components/channels/team_menu.d.ts +19 -0
- package/dist/ui/components/channels/team_menu.js +51 -0
- package/dist/ui/components/channels/team_menu.js.map +1 -0
- package/dist/ui/components/channels/team_settings/team_settings_modal.d.ts +6 -0
- package/dist/ui/components/channels/team_settings/team_settings_modal.js +18 -0
- package/dist/ui/components/channels/team_settings/team_settings_modal.js.map +1 -0
- package/dist/ui/components/channels/thread_footer.js.map +1 -1
- package/dist/ui/components/channels/user_profile_popover.js.map +1 -1
- package/dist/ui/components/footer.js.map +1 -1
- package/dist/ui/components/global_header.d.ts +7 -2
- package/dist/ui/components/global_header.js +13 -1
- package/dist/ui/components/global_header.js.map +1 -1
- package/dist/ui/components/index.d.ts +33 -5
- package/dist/ui/components/index.js +90 -10
- package/dist/ui/components/index.js.map +1 -1
- package/dist/ui/components/main_header.js.map +1 -1
- package/dist/ui/components/system_console/navbar.js.map +1 -1
- package/dist/ui/components/system_console/sections/site_configuration/notifications.d.ts +24 -0
- package/dist/ui/components/system_console/sections/site_configuration/notifications.js +63 -0
- package/dist/ui/components/system_console/sections/site_configuration/notifications.js.map +1 -0
- package/dist/ui/components/system_console/sections/system_users/column_toggle_menu.js.map +1 -1
- package/dist/ui/components/system_console/sections/system_users/feature_discovery.js.map +1 -1
- package/dist/ui/components/system_console/sections/system_users/filter_menu.js.map +1 -1
- package/dist/ui/components/system_console/sections/system_users/filter_popover.js.map +1 -1
- package/dist/ui/components/system_console/sections/system_users/mobile_security.d.ts +29 -2
- package/dist/ui/components/system_console/sections/system_users/mobile_security.js +75 -1
- package/dist/ui/components/system_console/sections/system_users/mobile_security.js.map +1 -1
- package/dist/ui/components/system_console/sections/system_users/system_users.js.map +1 -1
- package/dist/ui/components/system_console/sidebar.js.map +1 -1
- package/dist/ui/components/user_account_menu.d.ts +13 -0
- package/dist/ui/components/user_account_menu.js +32 -0
- package/dist/ui/components/user_account_menu.js.map +1 -0
- package/dist/ui/pages/channels.d.ts +46 -11
- package/dist/ui/pages/channels.js +119 -12
- package/dist/ui/pages/channels.js.map +1 -1
- package/dist/ui/pages/content_review_dm.d.ts +44 -0
- package/dist/ui/pages/content_review_dm.js +154 -0
- package/dist/ui/pages/content_review_dm.js.map +1 -0
- package/dist/ui/pages/drafts.d.ts +9 -25
- package/dist/ui/pages/drafts.js +25 -94
- package/dist/ui/pages/drafts.js.map +1 -1
- package/dist/ui/pages/index.d.ts +9 -5
- package/dist/ui/pages/index.js +10 -5
- package/dist/ui/pages/index.js.map +1 -1
- package/dist/ui/pages/landing_login.js.map +1 -1
- package/dist/ui/pages/login.d.ts +2 -2
- package/dist/ui/pages/login.js +1 -1
- package/dist/ui/pages/login.js.map +1 -1
- package/dist/ui/pages/reset_password.d.ts +2 -2
- package/dist/ui/pages/reset_password.js +1 -1
- package/dist/ui/pages/reset_password.js.map +1 -1
- package/dist/ui/pages/scheduled_posts.d.ts +23 -0
- package/dist/ui/pages/scheduled_posts.js +63 -0
- package/dist/ui/pages/scheduled_posts.js.map +1 -0
- package/dist/ui/pages/signup.d.ts +2 -2
- package/dist/ui/pages/signup.js +1 -1
- package/dist/ui/pages/signup.js.map +1 -1
- package/dist/ui/pages/system_console.d.ts +16 -14
- package/dist/ui/pages/system_console.js +10 -1
- package/dist/ui/pages/system_console.js.map +1 -1
- package/dist/ui/pages/threads.d.ts +13 -0
- package/dist/ui/pages/threads.js +44 -0
- package/dist/ui/pages/threads.js.map +1 -0
- package/dist/util.d.ts +17 -4
- package/dist/util.js +65 -5
- package/dist/util.js.map +1 -1
- package/dist/visual/index.js +9 -3
- package/dist/visual/index.js.map +1 -1
- package/dist/visual/percy.js.map +1 -1
- package/package.json +14 -15
- package/dist/ui/components/channels/scheduled_draft_menu.js +0 -23
- package/dist/ui/components/channels/scheduled_draft_menu.js.map +0 -1
- package/dist/ui/components/channels/search_popover.js.map +0 -1
- package/dist/ui/components/channels/settings/notification_settings.js.map +0 -1
- package/dist/ui/pages/scheduled_draft.d.ts +0 -38
- package/dist/ui/pages/scheduled_draft.js +0 -144
- package/dist/ui/pages/scheduled_draft.js.map +0 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
var asyncWaitUntil = require('async-wait-until');
|
|
3
5
|
var index = require('../components/index.js');
|
|
6
|
+
var util = require('../../util.js');
|
|
7
|
+
var channel_settings_modal = require('../components/channels/channel_settings/channel_settings_modal.js');
|
|
4
8
|
|
|
5
9
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
10
|
// See LICENSE.txt for license information.
|
|
@@ -8,52 +12,79 @@ class ChannelsPage {
|
|
|
8
12
|
channels = 'Channels';
|
|
9
13
|
page;
|
|
10
14
|
globalHeader;
|
|
11
|
-
|
|
15
|
+
userAccountMenuButton;
|
|
16
|
+
searchBox;
|
|
12
17
|
centerView;
|
|
13
|
-
scheduledDraftDropdown;
|
|
14
|
-
scheduledDraftModal;
|
|
15
18
|
sidebarLeft;
|
|
16
19
|
sidebarRight;
|
|
17
20
|
appBar;
|
|
18
21
|
userProfilePopover;
|
|
19
22
|
messagePriority;
|
|
20
|
-
|
|
23
|
+
channelSettingsModal;
|
|
21
24
|
deletePostModal;
|
|
25
|
+
findChannelsModal;
|
|
26
|
+
invitePeopleModal;
|
|
27
|
+
profileModal;
|
|
22
28
|
settingsModal;
|
|
29
|
+
teamSettingsModal;
|
|
30
|
+
scheduledDraftModal;
|
|
31
|
+
scheduleMessageModal;
|
|
23
32
|
postContainer;
|
|
24
33
|
postDotMenu;
|
|
25
34
|
postReminderMenu;
|
|
35
|
+
userAccountMenu;
|
|
36
|
+
teamMenu;
|
|
26
37
|
emojiGifPickerPopup;
|
|
38
|
+
scheduleMessageMenu;
|
|
27
39
|
constructor(page) {
|
|
28
40
|
this.page = page;
|
|
29
41
|
// The main areas of the app
|
|
30
|
-
this.globalHeader = new index.components.GlobalHeader(page.locator('#global-header'));
|
|
31
|
-
this.
|
|
32
|
-
this.centerView = new index.components.ChannelsCenterView(page.getByTestId('channel_view'));
|
|
42
|
+
this.globalHeader = new index.components.GlobalHeader(this, page.locator('#global-header'));
|
|
43
|
+
this.searchBox = new index.components.SearchBox(page.locator('#searchBox'));
|
|
44
|
+
this.centerView = new index.components.ChannelsCenterView(page.getByTestId('channel_view'), page);
|
|
33
45
|
this.sidebarLeft = new index.components.ChannelsSidebarLeft(page.locator('#SidebarContainer'));
|
|
34
46
|
this.sidebarRight = new index.components.ChannelsSidebarRight(page.locator('#sidebar-right'));
|
|
35
47
|
this.appBar = new index.components.ChannelsAppBar(page.locator('.app-bar'));
|
|
36
48
|
this.messagePriority = new index.components.MessagePriority(page.locator('body'));
|
|
49
|
+
this.userAccountMenuButton = page.getByRole('button', { name: "User's account menu" });
|
|
37
50
|
// Modals
|
|
38
|
-
this.
|
|
51
|
+
this.channelSettingsModal = new channel_settings_modal(page.getByRole('dialog', { name: 'Channel Settings' }));
|
|
39
52
|
this.deletePostModal = new index.components.DeletePostModal(page.locator('#deletePostModal'));
|
|
53
|
+
this.findChannelsModal = new index.components.FindChannelsModal(page.getByRole('dialog', { name: 'Find Channels' }));
|
|
54
|
+
this.profileModal = new index.components.ProfileModal(page.getByRole('dialog', { name: 'Profile' }));
|
|
40
55
|
this.settingsModal = new index.components.SettingsModal(page.getByRole('dialog', { name: 'Settings' }));
|
|
56
|
+
this.teamSettingsModal = new index.components.TeamSettingsModal(page.getByRole('dialog', { name: 'Team Settings' }));
|
|
41
57
|
// Menus
|
|
42
58
|
this.postDotMenu = new index.components.PostDotMenu(page.getByRole('menu', { name: 'Post extra options' }));
|
|
43
59
|
this.postReminderMenu = new index.components.PostReminderMenu(page.getByRole('menu', { name: 'Set a reminder for:' }));
|
|
60
|
+
this.userAccountMenu = new index.components.UserAccountMenu(page.locator('#userAccountMenu'));
|
|
61
|
+
this.scheduleMessageMenu = new index.components.ScheduleMessageMenu(page.locator('#dropdown_send_post_options'));
|
|
62
|
+
this.teamMenu = new index.components.TeamMenu(page.locator('#sidebarTeamMenu'));
|
|
44
63
|
// Popovers
|
|
45
64
|
this.emojiGifPickerPopup = new index.components.EmojiGifPicker(page.locator('#emojiGifPicker'));
|
|
46
|
-
this.scheduledDraftDropdown = new index.components.ScheduledDraftMenu(page.locator('#dropdown_send_post_options'));
|
|
47
65
|
this.scheduledDraftModal = new index.components.ScheduledDraftModal(page.locator('div.modal-content'));
|
|
66
|
+
this.scheduleMessageModal = new index.components.ScheduleMessageModal(page.getByRole('dialog', { name: 'Schedule message' }));
|
|
48
67
|
this.userProfilePopover = new index.components.UserProfilePopover(page.locator('.user-profile-popover'));
|
|
49
68
|
// Posts
|
|
50
69
|
this.postContainer = page.locator('div.post-message__text');
|
|
70
|
+
page.locator('#channelHeaderDropdownMenu');
|
|
51
71
|
}
|
|
52
72
|
async toBeVisible() {
|
|
53
73
|
await this.centerView.toBeVisible();
|
|
54
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* `toNotContainText` verifies if the page does not contain the specified text.
|
|
77
|
+
* @param text Text to be verified not in the page
|
|
78
|
+
*/
|
|
79
|
+
async toNotContainText(text) {
|
|
80
|
+
await test.expect(this.page.locator('body')).not.toContainText(text);
|
|
81
|
+
}
|
|
55
82
|
async getLastPost() {
|
|
56
|
-
return this.
|
|
83
|
+
return this.centerView.getLastPost();
|
|
84
|
+
}
|
|
85
|
+
async getInvitePeopleModal(teamDisplayName) {
|
|
86
|
+
this.invitePeopleModal = new index.components.InvitePeopleModal(this.page.getByRole('dialog', { name: `Invite people to ${teamDisplayName}` }));
|
|
87
|
+
return this.invitePeopleModal;
|
|
57
88
|
}
|
|
58
89
|
async goto(teamName = '', channelName = '') {
|
|
59
90
|
let channelsUrl = '/';
|
|
@@ -65,13 +96,89 @@ class ChannelsPage {
|
|
|
65
96
|
}
|
|
66
97
|
}
|
|
67
98
|
await this.page.goto(channelsUrl);
|
|
99
|
+
return channelsUrl;
|
|
68
100
|
}
|
|
69
101
|
/**
|
|
70
102
|
* `postMessage` posts a message in the current channel
|
|
71
103
|
* @param message Message to post
|
|
104
|
+
* @param files Files to attach to the message
|
|
72
105
|
*/
|
|
73
|
-
async postMessage(message) {
|
|
74
|
-
await this.centerView.
|
|
106
|
+
async postMessage(message, files) {
|
|
107
|
+
await this.centerView.postMessage(message, files);
|
|
108
|
+
}
|
|
109
|
+
async replyToLastPost(message) {
|
|
110
|
+
const rootPost = await this.getLastPost();
|
|
111
|
+
await rootPost.reply();
|
|
112
|
+
const sidebarRight = this.sidebarRight;
|
|
113
|
+
await sidebarRight.toBeVisible();
|
|
114
|
+
await sidebarRight.postMessage('Replying to a thread');
|
|
115
|
+
// * Verify the message has been sent
|
|
116
|
+
await asyncWaitUntil.waitUntil(async () => {
|
|
117
|
+
const post = await this.sidebarRight.getLastPost();
|
|
118
|
+
const content = await post.container.textContent();
|
|
119
|
+
return content?.includes(message);
|
|
120
|
+
}, { timeout: util.duration.ten_sec });
|
|
121
|
+
const lastPost = await sidebarRight.getLastPost();
|
|
122
|
+
return { rootPost, sidebarRight, lastPost };
|
|
123
|
+
}
|
|
124
|
+
async openChannelSettings() {
|
|
125
|
+
await this.centerView.header.openChannelMenu();
|
|
126
|
+
await this.page.locator('#channelSettings[role="menuitem"]').click();
|
|
127
|
+
await this.channelSettingsModal.toBeVisible();
|
|
128
|
+
return this.channelSettingsModal;
|
|
129
|
+
}
|
|
130
|
+
async openSettings() {
|
|
131
|
+
await this.globalHeader.openSettings();
|
|
132
|
+
await this.settingsModal.toBeVisible();
|
|
133
|
+
return this.settingsModal;
|
|
134
|
+
}
|
|
135
|
+
async newChannel(name, channelType) {
|
|
136
|
+
await this.page.locator('#browseOrAddChannelMenuButton').click();
|
|
137
|
+
await this.page.locator('#createNewChannelMenuItem').click();
|
|
138
|
+
await this.page.locator('#input_new-channel-modal-name').fill(name);
|
|
139
|
+
if (channelType === 'P') {
|
|
140
|
+
await this.page.locator('#public-private-selector-button-P').click();
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
await this.page.locator('#public-private-selector-button-O').click();
|
|
144
|
+
}
|
|
145
|
+
await this.page.getByText('Create channel').click();
|
|
146
|
+
}
|
|
147
|
+
async openUserAccountMenu() {
|
|
148
|
+
await this.userAccountMenuButton.click();
|
|
149
|
+
await test.expect(this.userAccountMenu.container).toBeVisible();
|
|
150
|
+
return this.userAccountMenu;
|
|
151
|
+
}
|
|
152
|
+
async openProfileModal() {
|
|
153
|
+
await this.openUserAccountMenu();
|
|
154
|
+
await this.userAccountMenu.profile.click();
|
|
155
|
+
await test.expect(this.profileModal.container).toBeVisible();
|
|
156
|
+
return this.profileModal;
|
|
157
|
+
}
|
|
158
|
+
async openProfilePopover(post) {
|
|
159
|
+
// Find and click the post's user avatar to open the profile popover
|
|
160
|
+
await post.hover();
|
|
161
|
+
await post.profileIcon.click();
|
|
162
|
+
// Wait for the profile popover to be visible
|
|
163
|
+
const popover = this.userProfilePopover;
|
|
164
|
+
await test.expect(popover.container).toBeVisible();
|
|
165
|
+
return popover;
|
|
166
|
+
}
|
|
167
|
+
async scheduleMessage(message, dayFromToday = 0, timeOptionIndex = 0) {
|
|
168
|
+
await this.centerView.postCreate.writeMessage(message);
|
|
169
|
+
await test.expect(this.centerView.postCreate.scheduleMessageButton).toBeVisible();
|
|
170
|
+
await this.centerView.postCreate.scheduleMessageButton.click();
|
|
171
|
+
await this.scheduleMessageMenu.toBeVisible();
|
|
172
|
+
await this.scheduleMessageMenu.selectCustomTime();
|
|
173
|
+
return await this.scheduleMessageModal.scheduleMessage(dayFromToday, timeOptionIndex);
|
|
174
|
+
}
|
|
175
|
+
async scheduleMessageFromThread(message, dayFromToday = 0, timeOptionIndex = 0) {
|
|
176
|
+
await this.sidebarRight.postCreate.writeMessage(message);
|
|
177
|
+
await test.expect(this.sidebarRight.postCreate.scheduleMessageButton).toBeVisible();
|
|
178
|
+
await this.sidebarRight.postCreate.scheduleMessageButton.click();
|
|
179
|
+
await this.scheduleMessageMenu.toBeVisible();
|
|
180
|
+
await this.scheduleMessageMenu.selectCustomTime();
|
|
181
|
+
return await this.scheduleMessageModal.scheduleMessage(dayFromToday, timeOptionIndex);
|
|
75
182
|
}
|
|
76
183
|
}
|
|
77
184
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.js","sources":["../../../src/ui/pages/channels.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Page} from '@playwright/test';\n\nimport {components} from '@/ui/components';\n\nexport default class ChannelsPage {\n readonly channels = 'Channels';\n\n readonly page: Page;\n\n readonly globalHeader;\n readonly searchPopover;\n readonly centerView;\n readonly scheduledDraftDropdown;\n readonly scheduledDraftModal;\n readonly sidebarLeft;\n readonly sidebarRight;\n readonly appBar;\n readonly userProfilePopover;\n readonly messagePriority;\n\n readonly findChannelsModal;\n readonly deletePostModal;\n readonly settingsModal;\n\n readonly postContainer;\n readonly postDotMenu;\n readonly postReminderMenu;\n\n readonly emojiGifPickerPopup;\n\n constructor(page: Page) {\n this.page = page;\n\n // The main areas of the app\n this.globalHeader = new components.GlobalHeader(page.locator('#global-header'));\n this.searchPopover = new components.SearchPopover(page.locator('#searchPopover'));\n this.centerView = new components.ChannelsCenterView(page.getByTestId('channel_view'));\n this.sidebarLeft = new components.ChannelsSidebarLeft(page.locator('#SidebarContainer'));\n this.sidebarRight = new components.ChannelsSidebarRight(page.locator('#sidebar-right'));\n this.appBar = new components.ChannelsAppBar(page.locator('.app-bar'));\n this.messagePriority = new components.MessagePriority(page.locator('body'));\n\n // Modals\n this.findChannelsModal = new components.FindChannelsModal(page.getByRole('dialog', {name: 'Find Channels'}));\n this.deletePostModal = new components.DeletePostModal(page.locator('#deletePostModal'));\n this.settingsModal = new components.SettingsModal(page.getByRole('dialog', {name: 'Settings'}));\n\n // Menus\n this.postDotMenu = new components.PostDotMenu(page.getByRole('menu', {name: 'Post extra options'}));\n this.postReminderMenu = new components.PostReminderMenu(page.getByRole('menu', {name: 'Set a reminder for:'}));\n\n // Popovers\n this.emojiGifPickerPopup = new components.EmojiGifPicker(page.locator('#emojiGifPicker'));\n this.scheduledDraftDropdown = new components.ScheduledDraftMenu(page.locator('#dropdown_send_post_options'));\n this.scheduledDraftModal = new components.ScheduledDraftModal(page.locator('div.modal-content'));\n this.userProfilePopover = new components.UserProfilePopover(page.locator('.user-profile-popover'));\n\n // Posts\n this.postContainer = page.locator('div.post-message__text');\n }\n\n async toBeVisible() {\n await this.centerView.toBeVisible();\n }\n\n async getLastPost() {\n return this.postContainer.last();\n }\n\n async goto(teamName = '', channelName = '') {\n let channelsUrl = '/';\n if (teamName) {\n channelsUrl += `${teamName}`;\n if (channelName) {\n const prefix = channelName.startsWith('@') ? '/messages' : '/channels';\n channelsUrl += `${prefix}/${channelName}`;\n }\n }\n await this.page.goto(channelsUrl);\n }\n\n /**\n * `postMessage` posts a message in the current channel\n * @param message Message to post\n */\n async postMessage(message: string) {\n await this.centerView.postCreate.postMessage(message);\n }\n}\n"],"names":["components"],"mappings":";;;;AAAA;AACA;AAMc,MAAO,YAAY,CAAA;IACpB,QAAQ,GAAG,UAAU;AAErB,IAAA,IAAI;AAEJ,IAAA,YAAY;AACZ,IAAA,aAAa;AACb,IAAA,UAAU;AACV,IAAA,sBAAsB;AACtB,IAAA,mBAAmB;AACnB,IAAA,WAAW;AACX,IAAA,YAAY;AACZ,IAAA,MAAM;AACN,IAAA,kBAAkB;AAClB,IAAA,eAAe;AAEf,IAAA,iBAAiB;AACjB,IAAA,eAAe;AACf,IAAA,aAAa;AAEb,IAAA,aAAa;AACb,IAAA,WAAW;AACX,IAAA,gBAAgB;AAEhB,IAAA,mBAAmB;AAE5B,IAAA,WAAA,CAAY,IAAU,EAAA;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;;AAGhB,QAAA,IAAI,CAAC,YAAY,GAAG,IAAIA,gBAAU,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC/E,QAAA,IAAI,CAAC,aAAa,GAAG,IAAIA,gBAAU,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjF,QAAA,IAAI,CAAC,UAAU,GAAG,IAAIA,gBAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC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|
|
1
|
+
{"version":3,"file":"channels.js","sources":["../../../src/ui/pages/channels.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {expect, Page} from '@playwright/test';\nimport {waitUntil} from 'async-wait-until';\n\nimport {ChannelsPost, ChannelSettingsModal, SettingsModal, components, InvitePeopleModal} from '@/ui/components';\nimport {duration} from '@/util';\nexport default class ChannelsPage {\n readonly channels = 'Channels';\n\n readonly page: Page;\n\n readonly globalHeader;\n readonly userAccountMenuButton;\n readonly searchBox;\n readonly centerView;\n readonly sidebarLeft;\n readonly sidebarRight;\n readonly appBar;\n readonly userProfilePopover;\n readonly messagePriority;\n\n readonly channelSettingsModal;\n readonly deletePostModal;\n readonly findChannelsModal;\n public invitePeopleModal: InvitePeopleModal | undefined;\n readonly profileModal;\n readonly settingsModal;\n readonly teamSettingsModal;\n readonly scheduledDraftModal;\n readonly scheduleMessageModal;\n\n readonly postContainer;\n readonly postDotMenu;\n readonly postReminderMenu;\n readonly userAccountMenu;\n readonly teamMenu;\n\n readonly emojiGifPickerPopup;\n readonly scheduleMessageMenu;\n\n constructor(page: Page) {\n this.page = page;\n\n // The main areas of the app\n this.globalHeader = new components.GlobalHeader(this, page.locator('#global-header'));\n this.searchBox = new components.SearchBox(page.locator('#searchBox'));\n this.centerView = new components.ChannelsCenterView(page.getByTestId('channel_view'), page);\n this.sidebarLeft = new components.ChannelsSidebarLeft(page.locator('#SidebarContainer'));\n this.sidebarRight = new components.ChannelsSidebarRight(page.locator('#sidebar-right'));\n this.appBar = new components.ChannelsAppBar(page.locator('.app-bar'));\n this.messagePriority = new components.MessagePriority(page.locator('body'));\n this.userAccountMenuButton = page.getByRole('button', {name: \"User's account menu\"});\n\n // Modals\n this.channelSettingsModal = new ChannelSettingsModal(page.getByRole('dialog', {name: 'Channel Settings'}));\n this.deletePostModal = new components.DeletePostModal(page.locator('#deletePostModal'));\n this.findChannelsModal = new components.FindChannelsModal(page.getByRole('dialog', {name: 'Find Channels'}));\n this.profileModal = new components.ProfileModal(page.getByRole('dialog', {name: 'Profile'}));\n this.settingsModal = new components.SettingsModal(page.getByRole('dialog', {name: 'Settings'}));\n this.teamSettingsModal = new components.TeamSettingsModal(page.getByRole('dialog', {name: 'Team Settings'}));\n\n // Menus\n this.postDotMenu = new components.PostDotMenu(page.getByRole('menu', {name: 'Post extra options'}));\n this.postReminderMenu = new components.PostReminderMenu(page.getByRole('menu', {name: 'Set a reminder for:'}));\n this.userAccountMenu = new components.UserAccountMenu(page.locator('#userAccountMenu'));\n this.scheduleMessageMenu = new components.ScheduleMessageMenu(page.locator('#dropdown_send_post_options'));\n this.teamMenu = new components.TeamMenu(page.locator('#sidebarTeamMenu'));\n\n // Popovers\n this.emojiGifPickerPopup = new components.EmojiGifPicker(page.locator('#emojiGifPicker'));\n this.scheduledDraftModal = new components.ScheduledDraftModal(page.locator('div.modal-content'));\n this.scheduleMessageModal = new components.ScheduleMessageModal(\n page.getByRole('dialog', {name: 'Schedule message'}),\n );\n this.userProfilePopover = new components.UserProfilePopover(page.locator('.user-profile-popover'));\n\n // Posts\n this.postContainer = page.locator('div.post-message__text');\n\n page.locator('#channelHeaderDropdownMenu');\n }\n\n async toBeVisible() {\n await this.centerView.toBeVisible();\n }\n\n /**\n * `toNotContainText` verifies if the page does not contain the specified text.\n * @param text Text to be verified not in the page\n */\n async toNotContainText(text: string) {\n await expect(this.page.locator('body')).not.toContainText(text);\n }\n\n async getLastPost() {\n return this.centerView.getLastPost();\n }\n\n async getInvitePeopleModal(teamDisplayName: string) {\n this.invitePeopleModal = new components.InvitePeopleModal(\n this.page.getByRole('dialog', {name: `Invite people to ${teamDisplayName}`}),\n );\n return this.invitePeopleModal;\n }\n\n async goto(teamName = '', channelName = '') {\n let channelsUrl = '/';\n if (teamName) {\n channelsUrl += `${teamName}`;\n if (channelName) {\n const prefix = channelName.startsWith('@') ? '/messages' : '/channels';\n channelsUrl += `${prefix}/${channelName}`;\n }\n }\n await this.page.goto(channelsUrl);\n\n return channelsUrl;\n }\n\n /**\n * `postMessage` posts a message in the current channel\n * @param message Message to post\n * @param files Files to attach to the message\n */\n async postMessage(message: string, files?: string[]) {\n await this.centerView.postMessage(message, files);\n }\n\n async replyToLastPost(message: string) {\n const rootPost = await this.getLastPost();\n await rootPost.reply();\n\n const sidebarRight = this.sidebarRight;\n await sidebarRight.toBeVisible();\n await sidebarRight.postMessage('Replying to a thread');\n\n // * Verify the message has been sent\n await waitUntil(\n async () => {\n const post = await this.sidebarRight.getLastPost();\n const content = await post.container.textContent();\n\n return content?.includes(message);\n },\n {timeout: duration.ten_sec},\n );\n\n const lastPost = await sidebarRight.getLastPost();\n\n return {rootPost, sidebarRight, lastPost};\n }\n\n async openChannelSettings(): Promise<ChannelSettingsModal> {\n await this.centerView.header.openChannelMenu();\n await this.page.locator('#channelSettings[role=\"menuitem\"]').click();\n await this.channelSettingsModal.toBeVisible();\n\n return this.channelSettingsModal;\n }\n\n async openSettings(): Promise<SettingsModal> {\n await this.globalHeader.openSettings();\n await this.settingsModal.toBeVisible();\n return this.settingsModal;\n }\n\n async newChannel(name: string, channelType: string) {\n await this.page.locator('#browseOrAddChannelMenuButton').click();\n await this.page.locator('#createNewChannelMenuItem').click();\n await this.page.locator('#input_new-channel-modal-name').fill(name);\n\n if (channelType === 'P') {\n await this.page.locator('#public-private-selector-button-P').click();\n } else {\n await this.page.locator('#public-private-selector-button-O').click();\n }\n\n await this.page.getByText('Create channel').click();\n }\n\n async openUserAccountMenu() {\n await this.userAccountMenuButton.click();\n await expect(this.userAccountMenu.container).toBeVisible();\n return this.userAccountMenu;\n }\n\n async openProfileModal() {\n await this.openUserAccountMenu();\n await this.userAccountMenu.profile.click();\n await expect(this.profileModal.container).toBeVisible();\n return this.profileModal;\n }\n\n async openProfilePopover(post: ChannelsPost) {\n // Find and click the post's user avatar to open the profile popover\n await post.hover();\n await post.profileIcon.click();\n\n // Wait for the profile popover to be visible\n const popover = this.userProfilePopover;\n await expect(popover.container).toBeVisible();\n\n return popover;\n }\n\n async scheduleMessage(message: string, dayFromToday: number = 0, timeOptionIndex: number = 0) {\n await this.centerView.postCreate.writeMessage(message);\n\n await expect(this.centerView.postCreate.scheduleMessageButton).toBeVisible();\n await this.centerView.postCreate.scheduleMessageButton.click();\n\n await this.scheduleMessageMenu.toBeVisible();\n await this.scheduleMessageMenu.selectCustomTime();\n\n return await this.scheduleMessageModal.scheduleMessage(dayFromToday, timeOptionIndex);\n }\n\n async scheduleMessageFromThread(message: string, dayFromToday: number = 0, timeOptionIndex: number = 0) {\n await this.sidebarRight.postCreate.writeMessage(message);\n\n await expect(this.sidebarRight.postCreate.scheduleMessageButton).toBeVisible();\n await this.sidebarRight.postCreate.scheduleMessageButton.click();\n\n await this.scheduleMessageMenu.toBeVisible();\n await this.scheduleMessageMenu.selectCustomTime();\n\n return await this.scheduleMessageModal.scheduleMessage(dayFromToday, timeOptionIndex);\n }\n}\n"],"names":["components","ChannelSettingsModal","expect","waitUntil","duration"],"mappings":";;;;;;;;AAAA;AACA;AAOc,MAAO,YAAY,CAAA;IACpB,QAAQ,GAAG,UAAU;AAErB,IAAA,IAAI;AAEJ,IAAA,YAAY;AACZ,IAAA,qBAAqB;AACrB,IAAA,SAAS;AACT,IAAA,UAAU;AACV,IAAA,WAAW;AACX,IAAA,YAAY;AACZ,IAAA,MAAM;AACN,IAAA,kBAAkB;AAClB,IAAA,eAAe;AAEf,IAAA,oBAAoB;AACpB,IAAA,eAAe;AACf,IAAA,iBAAiB;AACnB,IAAA,iBAAiB;AACf,IAAA,YAAY;AACZ,IAAA,aAAa;AACb,IAAA,iBAAiB;AACjB,IAAA,mBAAmB;AACnB,IAAA,oBAAoB;AAEpB,IAAA,aAAa;AACb,IAAA,WAAW;AACX,IAAA,gBAAgB;AAChB,IAAA,eAAe;AACf,IAAA,QAAQ;AAER,IAAA,mBAAmB;AACnB,IAAA,mBAAmB;AAE5B,IAAA,WAAA,CAAY,IAAU,EAAA;AACl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YAAY,EAAE,eAAe,CAAC;IACzF;IAEA,MAAM,yBAAyB,CAAC,OAAe,EAAE,YAAA,GAAuB,CAAC,EAAE,eAAA,GAA0B,CAAC,EAAA;QAClG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC;AAExD,QAAA,MAAMA,WAAM,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,WAAW,EAAE;QAC9E,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,qBAAqB,CAAC,KAAK,EAAE;AAEhE,QAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE;AAC5C,QAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,EAAE;QAEjD,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,YAAY,EAAE,eAAe,CAAC;IACzF;AACH;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
export default class ContentReviewPage {
|
|
3
|
+
private readonly page;
|
|
4
|
+
private readonly cards;
|
|
5
|
+
private readonly rhsCard;
|
|
6
|
+
private reportCard?;
|
|
7
|
+
readonly keepMessageButton: Locator;
|
|
8
|
+
readonly removeMessageButton: Locator;
|
|
9
|
+
readonly postActionConformationModal: Locator;
|
|
10
|
+
readonly cancelButton: Locator;
|
|
11
|
+
readonly confirmRemoveMessageButton: Locator;
|
|
12
|
+
readonly confirmKeepMessageButton: Locator;
|
|
13
|
+
readonly confirmationModalComment: Locator;
|
|
14
|
+
constructor(page: Page);
|
|
15
|
+
setReportCardByPostID(postID: string): Promise<void>;
|
|
16
|
+
private ensureReportCardSet;
|
|
17
|
+
openViewDetails(): Promise<void>;
|
|
18
|
+
waitForPageLoaded(): Promise<void>;
|
|
19
|
+
getLastCard(): Promise<Locator>;
|
|
20
|
+
openCardByMessage(message: string): Promise<void>;
|
|
21
|
+
private field;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the value text for a given field label (e.g. "Status", "Reason", etc.)
|
|
24
|
+
*/
|
|
25
|
+
getValueForField(fieldName: string): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Asserts that a field's value matches the expected text
|
|
28
|
+
*/
|
|
29
|
+
expectSelectProperty(fieldName: string, expectedValue: string): Promise<void>;
|
|
30
|
+
expectTextProperty(fieldName: string, expected: string): Promise<void>;
|
|
31
|
+
expectUser(fieldName: string, expected: string): Promise<void>;
|
|
32
|
+
expectTeam(expected: string): Promise<void>;
|
|
33
|
+
expectChannel(expected: string): Promise<void>;
|
|
34
|
+
expectMessageContains(expected: string): Promise<void>;
|
|
35
|
+
waitForRHSVisible(): Promise<void>;
|
|
36
|
+
verifyFlaggedPostStatus(expected: string): Promise<void>;
|
|
37
|
+
verifyFlaggedPostReason(expected: string): Promise<void>;
|
|
38
|
+
verifyFlaggedPostMessage(expected: string): Promise<void>;
|
|
39
|
+
clickKeepMessage(): Promise<void>;
|
|
40
|
+
clickRemoveMessage(): Promise<void>;
|
|
41
|
+
enterConfirmationComment(comment: string): Promise<void>;
|
|
42
|
+
confirmRemove(): Promise<void>;
|
|
43
|
+
confirmKeep(): Promise<void>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
var util = require('../../util.js');
|
|
5
|
+
|
|
6
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
7
|
+
// See LICENSE.txt for license information.
|
|
8
|
+
class ContentReviewPage {
|
|
9
|
+
page;
|
|
10
|
+
cards;
|
|
11
|
+
rhsCard;
|
|
12
|
+
reportCard;
|
|
13
|
+
keepMessageButton;
|
|
14
|
+
removeMessageButton;
|
|
15
|
+
postActionConformationModal;
|
|
16
|
+
cancelButton;
|
|
17
|
+
confirmRemoveMessageButton;
|
|
18
|
+
confirmKeepMessageButton;
|
|
19
|
+
confirmationModalComment;
|
|
20
|
+
constructor(page) {
|
|
21
|
+
this.page = page;
|
|
22
|
+
this.cards = page.locator('[data-testid="property-card-view"]');
|
|
23
|
+
this.rhsCard = page.getByTestId('rhsPostView').getByTestId('property-card-view');
|
|
24
|
+
this.keepMessageButton = this.rhsCard.getByTestId('data-spillage-action-keep-message');
|
|
25
|
+
this.removeMessageButton = this.rhsCard.getByTestId('data-spillage-action-remove-message');
|
|
26
|
+
this.postActionConformationModal = page.locator('div.GenericModal__wrapper');
|
|
27
|
+
this.cancelButton = this.postActionConformationModal.getByRole('button', { name: 'Cancel' });
|
|
28
|
+
this.confirmRemoveMessageButton = this.postActionConformationModal.getByRole('button', {
|
|
29
|
+
name: 'Remove message',
|
|
30
|
+
});
|
|
31
|
+
this.confirmKeepMessageButton = this.postActionConformationModal.getByRole('button', { name: 'Keep message' });
|
|
32
|
+
this.confirmationModalComment = this.postActionConformationModal.getByTestId('RemoveFlaggedMessageConfirmationModal__comment');
|
|
33
|
+
}
|
|
34
|
+
async setReportCardByPostID(postID) {
|
|
35
|
+
this.reportCard = this.page
|
|
36
|
+
.locator('div.DataSpillageReport')
|
|
37
|
+
.filter({ has: this.page.locator(`#postMessageText_${postID}`) });
|
|
38
|
+
}
|
|
39
|
+
ensureReportCardSet() {
|
|
40
|
+
if (!this.reportCard) {
|
|
41
|
+
throw new Error('Report card not set. Call setReportCardByPostID(postID) first.');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async openViewDetails() {
|
|
45
|
+
this.ensureReportCardSet();
|
|
46
|
+
const button = this.reportCard.locator('button:has-text("View Details")');
|
|
47
|
+
await button.scrollIntoViewIfNeeded();
|
|
48
|
+
await button.click();
|
|
49
|
+
}
|
|
50
|
+
async waitForPageLoaded() {
|
|
51
|
+
await this.page.waitForResponse((res) => res.url().includes('as_content_reviewer=true') && res.status() === 200);
|
|
52
|
+
await this.page.waitForTimeout(1000);
|
|
53
|
+
await this.page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
|
|
54
|
+
this.ensureReportCardSet();
|
|
55
|
+
await test.expect(this.reportCard).toBeVisible();
|
|
56
|
+
}
|
|
57
|
+
async getLastCard() {
|
|
58
|
+
const count = await this.cards.count();
|
|
59
|
+
if (count === 0)
|
|
60
|
+
throw new Error('No content review cards found.');
|
|
61
|
+
return this.cards.nth(count - 1);
|
|
62
|
+
}
|
|
63
|
+
async openCardByMessage(message) {
|
|
64
|
+
const targetCard = this.page
|
|
65
|
+
.locator('div.DataSpillageReport')
|
|
66
|
+
.filter({ has: this.page.locator(`.row:has-text("${message}")`) });
|
|
67
|
+
await targetCard.first().click();
|
|
68
|
+
}
|
|
69
|
+
field(fieldName) {
|
|
70
|
+
return this.rhsCard.locator('.row', {
|
|
71
|
+
has: this.rhsCard.locator(`.field:has-text("${fieldName}")`),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Gets the value text for a given field label (e.g. "Status", "Reason", etc.)
|
|
76
|
+
*/
|
|
77
|
+
async getValueForField(fieldName) {
|
|
78
|
+
await test.expect(this.rhsCard).toBeVisible({ timeout: 10000 });
|
|
79
|
+
const valueLocator = this.rhsCard.locator(`.row:has(.field:has-text("${fieldName}")) .value`);
|
|
80
|
+
await test.expect(valueLocator).toBeVisible({ timeout: 5000 });
|
|
81
|
+
return valueLocator.innerText();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Asserts that a field's value matches the expected text
|
|
85
|
+
*/
|
|
86
|
+
async expectSelectProperty(fieldName, expectedValue) {
|
|
87
|
+
const actualValue = await this.getValueForField(fieldName);
|
|
88
|
+
test.expect(actualValue.trim()).toBe(expectedValue);
|
|
89
|
+
}
|
|
90
|
+
async expectTextProperty(fieldName, expected) {
|
|
91
|
+
await test.expect(this.field(fieldName).locator('.TextProperty')).toHaveText(expected);
|
|
92
|
+
}
|
|
93
|
+
async expectUser(fieldName, expected) {
|
|
94
|
+
await test.expect(this.rhsCard).toBeVisible({ timeout: 10000 });
|
|
95
|
+
const userButton = this.rhsCard.locator(`.row:has(.field:has-text("${fieldName}")) .user-popover`);
|
|
96
|
+
// Wait for either visible or attached then read text
|
|
97
|
+
await userButton.waitFor({ state: 'attached', timeout: 10000 });
|
|
98
|
+
const text = (await userButton.innerText()).trim();
|
|
99
|
+
test.expect(text).toBe(expected);
|
|
100
|
+
}
|
|
101
|
+
async expectTeam(expected) {
|
|
102
|
+
await test.expect(this.rhsCard.locator('.TeamPropertyRenderer')).toContainText(expected);
|
|
103
|
+
}
|
|
104
|
+
async expectChannel(expected) {
|
|
105
|
+
await test.expect(this.rhsCard.locator('.ChannelPropertyRenderer')).toContainText(expected);
|
|
106
|
+
}
|
|
107
|
+
async expectMessageContains(expected) {
|
|
108
|
+
await test.expect(this.rhsCard.locator('.post-message__text')).toContainText(expected);
|
|
109
|
+
}
|
|
110
|
+
async waitForRHSVisible() {
|
|
111
|
+
await this.page.waitForResponse((res) => res.url().includes('as_content_reviewer=true') && res.status() === 200);
|
|
112
|
+
const gotIt = this.page.getByRole('button', { name: 'Got it' });
|
|
113
|
+
if (await gotIt.isVisible()) {
|
|
114
|
+
await gotIt.click();
|
|
115
|
+
}
|
|
116
|
+
await util.wait(5000);
|
|
117
|
+
}
|
|
118
|
+
async verifyFlaggedPostStatus(expected) {
|
|
119
|
+
this.ensureReportCardSet();
|
|
120
|
+
await test.expect(this.reportCard.locator('.row:has-text("Status") .SelectProperty')).toHaveText(expected);
|
|
121
|
+
}
|
|
122
|
+
async verifyFlaggedPostReason(expected) {
|
|
123
|
+
this.ensureReportCardSet();
|
|
124
|
+
await test.expect(this.reportCard.locator('.row:has-text("Reason") .SelectProperty')).toHaveText(expected);
|
|
125
|
+
}
|
|
126
|
+
async verifyFlaggedPostMessage(expected) {
|
|
127
|
+
this.ensureReportCardSet();
|
|
128
|
+
await test.expect(this.reportCard.locator('.row:has-text("Message") .post-message__text')).toHaveText(expected);
|
|
129
|
+
}
|
|
130
|
+
async clickKeepMessage() {
|
|
131
|
+
await this.keepMessageButton.scrollIntoViewIfNeeded();
|
|
132
|
+
await this.keepMessageButton.click();
|
|
133
|
+
await this.postActionConformationModal.waitFor({ state: 'visible' });
|
|
134
|
+
}
|
|
135
|
+
async clickRemoveMessage() {
|
|
136
|
+
await this.removeMessageButton.scrollIntoViewIfNeeded();
|
|
137
|
+
await this.removeMessageButton.click();
|
|
138
|
+
await this.postActionConformationModal.waitFor({ state: 'visible' });
|
|
139
|
+
}
|
|
140
|
+
async enterConfirmationComment(comment) {
|
|
141
|
+
await this.confirmationModalComment.fill(comment);
|
|
142
|
+
}
|
|
143
|
+
async confirmRemove() {
|
|
144
|
+
await this.confirmRemoveMessageButton.click();
|
|
145
|
+
await this.postActionConformationModal.waitFor({ state: 'hidden' });
|
|
146
|
+
}
|
|
147
|
+
async confirmKeep() {
|
|
148
|
+
await this.confirmKeepMessageButton.click();
|
|
149
|
+
await this.postActionConformationModal.waitFor({ state: 'hidden' });
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
module.exports = ContentReviewPage;
|
|
154
|
+
//# sourceMappingURL=content_review_dm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content_review_dm.js","sources":["../../../src/ui/pages/content_review_dm.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Page, Locator, expect} from '@playwright/test';\n\nimport {wait} from '@/util';\n\nexport default class ContentReviewPage {\n private readonly page: Page;\n private readonly cards: Locator;\n private readonly rhsCard: Locator;\n private reportCard?: Locator;\n readonly keepMessageButton: Locator;\n readonly removeMessageButton: Locator;\n readonly postActionConformationModal: Locator;\n readonly cancelButton: Locator;\n readonly confirmRemoveMessageButton: Locator;\n readonly confirmKeepMessageButton: Locator;\n readonly confirmationModalComment: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.cards = page.locator('[data-testid=\"property-card-view\"]');\n this.rhsCard = page.getByTestId('rhsPostView').getByTestId('property-card-view');\n this.keepMessageButton = this.rhsCard.getByTestId('data-spillage-action-keep-message');\n this.removeMessageButton = this.rhsCard.getByTestId('data-spillage-action-remove-message');\n this.postActionConformationModal = page.locator('div.GenericModal__wrapper');\n this.cancelButton = this.postActionConformationModal.getByRole('button', {name: 'Cancel'});\n this.confirmRemoveMessageButton = this.postActionConformationModal.getByRole('button', {\n name: 'Remove message',\n });\n this.confirmKeepMessageButton = this.postActionConformationModal.getByRole('button', {name: 'Keep message'});\n this.confirmationModalComment = this.postActionConformationModal.getByTestId(\n 'RemoveFlaggedMessageConfirmationModal__comment',\n );\n }\n\n async setReportCardByPostID(postID: string) {\n this.reportCard = this.page\n .locator('div.DataSpillageReport')\n .filter({has: this.page.locator(`#postMessageText_${postID}`)});\n }\n\n private ensureReportCardSet() {\n if (!this.reportCard) {\n throw new Error('Report card not set. Call setReportCardByPostID(postID) first.');\n }\n }\n\n async openViewDetails() {\n this.ensureReportCardSet();\n const button = this.reportCard!.locator('button:has-text(\"View Details\")');\n await button.scrollIntoViewIfNeeded();\n await button.click();\n }\n\n async waitForPageLoaded() {\n await this.page.waitForResponse(\n (res) => res.url().includes('as_content_reviewer=true') && res.status() === 200,\n );\n await this.page.waitForTimeout(1000);\n await this.page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));\n this.ensureReportCardSet();\n await expect(this.reportCard!).toBeVisible();\n }\n\n async getLastCard(): Promise<Locator> {\n const count = await this.cards.count();\n if (count === 0) throw new Error('No content review cards found.');\n return this.cards.nth(count - 1);\n }\n\n async openCardByMessage(message: string) {\n const targetCard = this.page\n .locator('div.DataSpillageReport')\n .filter({has: this.page.locator(`.row:has-text(\"${message}\")`)});\n await targetCard.first().click();\n }\n\n private field(fieldName: string): Locator {\n return this.rhsCard.locator('.row', {\n has: this.rhsCard.locator(`.field:has-text(\"${fieldName}\")`),\n });\n }\n\n /**\n * Gets the value text for a given field label (e.g. \"Status\", \"Reason\", etc.)\n */\n async getValueForField(fieldName: string): Promise<string> {\n await expect(this.rhsCard).toBeVisible({timeout: 10000});\n const valueLocator = this.rhsCard.locator(`.row:has(.field:has-text(\"${fieldName}\")) .value`);\n await expect(valueLocator).toBeVisible({timeout: 5000});\n return valueLocator.innerText();\n }\n\n /**\n * Asserts that a field's value matches the expected text\n */\n async expectSelectProperty(fieldName: string, expectedValue: string): Promise<void> {\n const actualValue = await this.getValueForField(fieldName);\n expect(actualValue.trim()).toBe(expectedValue);\n }\n\n async expectTextProperty(fieldName: string, expected: string) {\n await expect(this.field(fieldName).locator('.TextProperty')).toHaveText(expected);\n }\n\n async expectUser(fieldName: string, expected: string) {\n await expect(this.rhsCard).toBeVisible({timeout: 10000});\n\n const userButton = this.rhsCard.locator(`.row:has(.field:has-text(\"${fieldName}\")) .user-popover`);\n\n // Wait for either visible or attached then read text\n await userButton.waitFor({state: 'attached', timeout: 10000});\n const text = (await userButton.innerText()).trim();\n expect(text).toBe(expected);\n }\n\n async expectTeam(expected: string) {\n await expect(this.rhsCard.locator('.TeamPropertyRenderer')).toContainText(expected);\n }\n\n async expectChannel(expected: string) {\n await expect(this.rhsCard.locator('.ChannelPropertyRenderer')).toContainText(expected);\n }\n\n async expectMessageContains(expected: string) {\n await expect(this.rhsCard.locator('.post-message__text')).toContainText(expected);\n }\n\n async waitForRHSVisible() {\n await this.page.waitForResponse(\n (res) => res.url().includes('as_content_reviewer=true') && res.status() === 200,\n );\n\n const gotIt = this.page.getByRole('button', {name: 'Got it'});\n if (await gotIt.isVisible()) {\n await gotIt.click();\n }\n await wait(5000);\n }\n\n async verifyFlaggedPostStatus(expected: string) {\n this.ensureReportCardSet();\n await expect(this.reportCard!.locator('.row:has-text(\"Status\") .SelectProperty')).toHaveText(expected);\n }\n\n async verifyFlaggedPostReason(expected: string) {\n this.ensureReportCardSet();\n await expect(this.reportCard!.locator('.row:has-text(\"Reason\") .SelectProperty')).toHaveText(expected);\n }\n\n async verifyFlaggedPostMessage(expected: string) {\n this.ensureReportCardSet();\n await expect(this.reportCard!.locator('.row:has-text(\"Message\") .post-message__text')).toHaveText(expected);\n }\n\n async clickKeepMessage() {\n await this.keepMessageButton.scrollIntoViewIfNeeded();\n await this.keepMessageButton.click();\n await this.postActionConformationModal.waitFor({state: 'visible'});\n }\n\n async clickRemoveMessage() {\n await this.removeMessageButton.scrollIntoViewIfNeeded();\n await this.removeMessageButton.click();\n await this.postActionConformationModal.waitFor({state: 'visible'});\n }\n\n async enterConfirmationComment(comment: string) {\n await this.confirmationModalComment.fill(comment);\n }\n\n async confirmRemove() {\n await this.confirmRemoveMessageButton.click();\n await this.postActionConformationModal.waitFor({state: 'hidden'});\n }\n\n async confirmKeep() {\n await this.confirmKeepMessageButton.click();\n await this.postActionConformationModal.waitFor({state: 'hidden'});\n }\n}\n"],"names":["expect","wait"],"mappings":";;;;;AAAA;AACA;AAMc,MAAO,iBAAiB,CAAA;AACjB,IAAA,IAAI;AACJ,IAAA,KAAK;AACL,IAAA,OAAO;AAChB,IAAA,UAAU;AACT,IAAA,iBAAiB;AACjB,IAAA,mBAAmB;AACnB,IAAA,2BAA2B;AAC3B,IAAA,YAAY;AACZ,IAAA,0BAA0B;AAC1B,IAAA,wBAAwB;AACxB,IAAA,wBAAwB;AAEjC,IAAA,WAAA,CAAY,IAAU,EAAA;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,oCAAoC,CAAC;AAC/D,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC;QAChF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,mCAAmC,CAAC;QACtF,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,qCAAqC,CAAC;QAC1F,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC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AAC,CAAC;IACrE;AAEA,IAAA,MAAM,WAAW,GAAA;AACb,QAAA,MAAM,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE;AAC3C,QAAA,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAC,CAAC;IACrE;AACH;;;;"}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import { Page } from '@playwright/test';
|
|
2
|
-
export default class
|
|
2
|
+
export default class DraftsPage {
|
|
3
3
|
readonly page: Page;
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly noscheduledDraftIcon: import("playwright-core").Locator;
|
|
10
|
-
readonly scheduleIcon: import("playwright-core").Locator;
|
|
11
|
-
readonly rescheduleIconToolTip: import("playwright-core").Locator;
|
|
12
|
-
readonly draftBody: import("playwright-core").Locator;
|
|
13
|
-
readonly scheduledDraftPageInfo: import("playwright-core").Locator;
|
|
14
|
-
readonly scheduledDraftPanel: (messageContent: string) => import("playwright-core").Locator;
|
|
15
|
-
readonly scheduledDraftSendNowButton: import("playwright-core").Locator;
|
|
16
|
-
readonly scheduledDraftSendNowButtonToolTip: import("playwright-core").Locator;
|
|
4
|
+
readonly draftsHeader: import("playwright-core").Locator;
|
|
5
|
+
readonly tab: import("playwright-core").Locator;
|
|
6
|
+
readonly badge: import("playwright-core").Locator;
|
|
7
|
+
readonly noDrafts: import("playwright-core").Locator;
|
|
8
|
+
readonly scheduleMessageModal: import("@/ui/components").ScheduleMessageModal;
|
|
17
9
|
constructor(page: Page);
|
|
18
|
-
|
|
10
|
+
goto(teamName: string): Promise<void>;
|
|
19
11
|
toBeVisible(): Promise<void>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
verifyOnHoverActionItems(messageContent: string): Promise<void>;
|
|
23
|
-
verifyDeleteIcon(): Promise<void>;
|
|
24
|
-
verifyScheduleIcon(messageContent: string): Promise<void>;
|
|
25
|
-
verifySendNowIcon(): Promise<void>;
|
|
26
|
-
getTimeStampOfMessage(messageContent: string): Promise<string>;
|
|
27
|
-
openScheduleModal(messageContent: string): Promise<void>;
|
|
28
|
-
deleteScheduledMessage(messageContent: string): Promise<void>;
|
|
29
|
-
sendScheduledMessage(messageContent: string): Promise<void>;
|
|
12
|
+
getBadgeCountOnTab(): Promise<string | null>;
|
|
13
|
+
getLastPost(): Promise<import("@/ui/components").DraftPost>;
|
|
30
14
|
}
|