Files
M-ZubairAhmedandGitHub 9b7005d79b [MM-53102] Add support for multi-word highlights without notifications in web (#24050)
- Adds a new section under settings/notifications for adding custom multi-word keywords that get highlighted without notification
- Adds a new classname for highlighting words although the styling is the same as mentions highlights
- Added a few components to the ReduxFromProps pattern
- Adds supported type for the hook of PluginComponent type
- Add upsell for highlight without notification
- Moved 'setting_item.tsx' to the components folder
- Improved prop names and function structure for setting_item, setting_item_max and setting_item_min
- Moved 'toggle_modal_button.tsx' to the components folder
- Removed t and utility messages from a few components
- Fixed bug where the tooltip was not getting rendered on restrictedButtons
- Improved the mobile view of the settings modal
- Adds E2E for the feature
2023-11-11 19:33:28 +05:30

69 lines
2.2 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Page} from '@playwright/test';
import {components} from '@e2e-support/ui/components';
export default class ChannelsPage {
readonly channels = 'Channels';
readonly page: Page;
readonly globalHeader;
readonly centerView;
readonly sidebarLeft;
readonly sidebarRight;
readonly appBar;
readonly findChannelsModal;
readonly deletePostModal;
readonly settingsModal;
readonly postDotMenu;
readonly postReminderMenu;
readonly emojiGifPickerPopup;
constructor(page: Page) {
this.page = page;
// The main areas of the app
this.globalHeader = new components.GlobalHeader(page.locator('#global-header'));
this.centerView = new components.ChannelsCenterView(page.getByTestId('channel_view'));
this.sidebarLeft = new components.ChannelsSidebarLeft(page.locator('#SidebarContainer'));
this.sidebarRight = new components.ChannelsSidebarRight(page.locator('#sidebar-right'));
this.appBar = new components.ChannelsAppBar(page.locator('.app-bar'));
// Modals
this.findChannelsModal = new components.FindChannelsModal(page.getByRole('dialog', {name: 'Find Channels'}));
this.deletePostModal = new components.DeletePostModal(page.locator('#deletePostModal'));
this.settingsModal = new components.SettingsModal(page.getByRole('dialog', {name: 'Settings'}));
// Menus
this.postDotMenu = new components.PostDotMenu(page.getByRole('menu', {name: 'Post extra options'}));
this.postReminderMenu = new components.PostReminderMenu(page.getByRole('menu', {name: 'Set a reminder for:'}));
// Popovers
this.emojiGifPickerPopup = new components.EmojiGifPicker(page.locator('#emojiGifPicker'));
}
async toBeVisible() {
await this.centerView.toBeVisible();
}
async goto(teamName = '', channelName = '') {
let channelsUrl = '/';
if (teamName) {
channelsUrl += `${teamName}`;
if (channelName) {
channelsUrl += `/${channelName}`;
}
}
await this.page.goto(channelsUrl);
}
}
export {ChannelsPage};