mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
* E2E/Playwright: Migrate RFQA browser tests (batch 4, 61-80) Migrate the fourth batch of Rainforest QA browser tests into Playwright (migration plan None-core #34-53, keys MM-T480..MM-T1257): 17 new/covered specs across notifications, search, channel_settings, sidebar_left, keyboard_shortcuts, and direct_messages_modal, plus 3 duplicate keys folded into existing tests (MM-T480, MM-T1256, MM-T1257). POM/infra: add a ChannelMenu page object for the channel header dropdown, an EditChannelHeaderModal, a header field on the channel-settings info tab, a channel-wide-mentions checkbox on NotificationsSettings, a getConfirmModal helper, and a clickNotification browser-API mock helper. Give the channel header menu and the confirm modal proper accessible names so they can be targeted semantically. Notification specs run on all browsers now that the Notification API stub works headless on Chromium and Firefox. * E2E/Playwright: Migrate RFQA browser tests (batch 5, 81-100) Migrate the fifth batch of Rainforest QA browser tests into Playwright across keyboard_shortcuts, search, archived_channels, channel_settings, plugin_marketplace, messaging, and emoji_picker (keys MM-T1247..MM-T2365), folding duplicate coverage into existing keyboard-shortcut specs and documenting skipped cases inline. POM/infra: add AddPeopleToChannelModal and MarketplaceModal page objects, manage/add member buttons on the channel members RHS, and an App Marketplace entry on the global header; target the search "Jump" link through the existing SearchResultsPanel POM. Also fix a webapp bug where a post body disappeared when an inline edit was cancelled mid-animation (found via the up-arrow edit shortcut spec). * E2E/Playwright: Fail on missing scroll bounding boxes * E2E/Playwright: Group related batch 5 specs * E2E/Playwright: Avoid duplicate creator membership * E2E/Playwright: Group Rainforest batches 1 through 4 --------- Co-authored-by: Hanzo Dev <[email protected]>
76 lines
3.3 KiB
TypeScript
76 lines
3.3 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {expect, test} from '@mattermost/playwright-lib';
|
|
|
|
/**
|
|
* @objective Verify selecting an emoji from the picker inserts it at the current caret position.
|
|
*/
|
|
test('MM-T95 Selecting an emoji from emoji picker should insert it at the cursor position', async ({pw}) => {
|
|
const {user, team} = await pw.initSetup();
|
|
|
|
// # Log in and place the caret between "Hello" and "World"
|
|
const {channelsPage} = await pw.testBrowser.login(user);
|
|
await channelsPage.goto(team.name, 'off-topic');
|
|
await channelsPage.toBeVisible();
|
|
await channelsPage.centerView.postCreate.writeMessage('HelloWorld!');
|
|
for (let i = 0; i < 'World!'.length; i++) {
|
|
await channelsPage.centerView.postCreate.input.press('ArrowLeft');
|
|
}
|
|
|
|
// # Select the grinning emoji from the picker
|
|
await channelsPage.centerView.postCreate.openEmojiPicker();
|
|
await channelsPage.emojiGifPickerPopup.toBeVisible();
|
|
await channelsPage.emojiGifPickerPopup.clickEmoji('grinning');
|
|
|
|
// * Verify the emoji was inserted at the caret and can be posted
|
|
await expect(channelsPage.centerView.postCreate.input).toHaveValue('Hello 😀 World!');
|
|
await channelsPage.centerView.postCreate.sendMessage();
|
|
const lastPost = await channelsPage.getLastPost();
|
|
await lastPost.toContainText('Hello 😀 World!');
|
|
});
|
|
|
|
/**
|
|
* @objective Verify an emoji followed by punctuation renders as an emoji without separating the punctuation.
|
|
*/
|
|
test('MM-T222 Emoji characters followed by punctuation', async ({pw}) => {
|
|
const {user, team} = await pw.initSetup();
|
|
|
|
// # Post an emoticon followed by punctuation
|
|
const {channelsPage} = await pw.testBrowser.login(user);
|
|
await channelsPage.goto(team.name, 'off-topic');
|
|
await channelsPage.toBeVisible();
|
|
await channelsPage.postMessage(':)=');
|
|
|
|
// * Verify the emoticon renders and the punctuation remains immediately adjacent, with no stray
|
|
// whitespace inserted between the rendered emoji and the punctuation
|
|
const lastPost = await channelsPage.getLastPost();
|
|
await expect(lastPost.emoticon.first()).toHaveAttribute('aria-label', ':slightly_smiling_face:');
|
|
await expect(lastPost.messageText.first()).toHaveText(':)=');
|
|
});
|
|
|
|
/**
|
|
* @objective Verify that a leading colon is ignored when searching in the emoji picker.
|
|
*/
|
|
test('MM-T156 ignores a leading colon when searching the emoji picker', {tag: '@messaging'}, async ({pw}) => {
|
|
// # Create and log in as a test user
|
|
const {user, team} = await pw.initSetup();
|
|
const {channelsPage} = await pw.testBrowser.login(user);
|
|
await channelsPage.goto(team.name, 'town-square');
|
|
await channelsPage.toBeVisible();
|
|
|
|
// # Post a message and open the emoji reaction picker on it
|
|
await channelsPage.postMessage(`emoji picker search ${pw.random.id()}`);
|
|
const post = await channelsPage.getLastPost();
|
|
await post.openReactionPicker();
|
|
|
|
// * Verify the emoji picker is open
|
|
await channelsPage.reactionEmojiPicker.toBeVisible();
|
|
|
|
// # Search using a leading colon
|
|
await channelsPage.reactionEmojiPicker.searchEmoji(':tax');
|
|
|
|
// * Verify the leading colon is ignored and the taxi emoji is returned
|
|
await expect(channelsPage.reactionEmojiPicker.getEmoji('taxi')).toBeVisible();
|
|
});
|