mirror of
https://github.com/hanzoai/team.git
synced 2026-10-30 14:49: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: Migrate RFQA browser tests (batch 6, 101-120) Migrate the sixth batch of Rainforest QA browser tests into Playwright (migration plan None-core #74-93, keys MM-T2547..MM-T5604) across multi_team, channel_settings, system_console, keyboard_shortcuts, search, plugin_marketplace, messaging, channel_bookmarks, and custom_groups. Fold duplicate coverage into existing specs (MM-T3680 into the marketplace spec; MM-T4872 is already covered by the batch-5 search-prefill spec) and document the plugin-install skip (MM-T4023, same external-download limitation as MM-T1987). POM/infra: add a ChannelBookmarksCreateModal page object and Bookmarks Bar submenu actions on the ChannelMenu, plus a channel-bookmarks-bar locator and bookmark-create-modal on ChannelsPage. * E2E/Playwright: Fail on missing scroll bounding boxes * E2E/Playwright: Locate user group dialog semantically * E2E/Playwright: Address batch 6 review feedback * E2E/Playwright: Locate user group rows semantically * E2E/Playwright: Complete Rainforest migration batch 7 * CI: Rerun flaky webapp unit test * E2E/Playwright: Keep batch 7 test data isolated * E2E/Playwright: Group related batch 7 specs * E2E/Playwright: Address batch 7 review feedback * E2E/Playwright: Use bookmark bar POM in grouped spec * add method to retrieve all bookmark links and update tests for bookmark order verification --------- Co-authored-by: Hanzo Dev <[email protected]>
83 lines
3.5 KiB
TypeScript
83 lines
3.5 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import path from 'node:path';
|
|
|
|
import {expect, test} from '@mattermost/playwright-lib';
|
|
|
|
/**
|
|
* @objective Verify that on a licensed server the Bookmarks Bar option is available in the channel menu with
|
|
* an "Add a link" action, even when the channel has no bookmarks yet.
|
|
*
|
|
* MM-T5601 covers the same behavior as MM-T5600 and is covered by this test.
|
|
*/
|
|
test('MM-T5600 MM-T5601 shows the Bookmarks Bar option in the channel menu', {tag: '@channels'}, async ({pw}) => {
|
|
const {user, team} = await pw.initSetup();
|
|
const {channelsPage} = await pw.testBrowser.login(user);
|
|
await channelsPage.goto(team.name, 'town-square');
|
|
await channelsPage.toBeVisible();
|
|
|
|
// # Open the channel menu
|
|
const channelMenu = await channelsPage.openChannelMenu();
|
|
|
|
// * Verify the Bookmarks Bar option is available
|
|
await expect(channelMenu.bookmarksBar).toBeVisible();
|
|
|
|
// # Open the Bookmarks Bar submenu
|
|
await channelMenu.openBookmarksSubmenu();
|
|
|
|
// * Verify the "Add a link" action is available
|
|
await expect(channelMenu.addBookmarkLink).toBeVisible();
|
|
});
|
|
|
|
/**
|
|
* @objective Verify a user can add a link bookmark from the channel menu's Bookmarks Bar submenu and see it
|
|
* in the channel bookmarks bar.
|
|
*/
|
|
test('MM-T5602 adds a link bookmark to the channel bookmarks bar', {tag: '@channels'}, async ({pw}) => {
|
|
const {user, team} = await pw.initSetup();
|
|
const {channelsPage} = await pw.testBrowser.login(user);
|
|
await channelsPage.goto(team.name, 'town-square');
|
|
await channelsPage.toBeVisible();
|
|
|
|
// # Open the Bookmarks Bar submenu from the channel menu and choose "Add a link"
|
|
const channelMenu = await channelsPage.openChannelMenu();
|
|
await channelMenu.openBookmarksSubmenu();
|
|
await channelMenu.addBookmarkLink.click();
|
|
|
|
// # Enter a link and add the bookmark
|
|
await channelsPage.bookmarkCreateModal.toBeVisible();
|
|
await channelsPage.bookmarkCreateModal.addLink('https://www.mattermost.com');
|
|
|
|
// * Verify the bookmark appears in the channel bookmarks bar
|
|
await channelsPage.channelBookmarksBar.toBeVisible();
|
|
await expect(channelsPage.channelBookmarksBar.getBookmark(/mattermost/i)).toBeVisible();
|
|
});
|
|
|
|
/**
|
|
* @objective Verify a user can add a file bookmark from the channel menu's Bookmarks Bar submenu and see it
|
|
* in the channel bookmarks bar.
|
|
*/
|
|
test('MM-T5603 adds a file bookmark to the channel bookmarks bar', {tag: '@channels'}, async ({pw}) => {
|
|
const {user, team} = await pw.initSetup();
|
|
const {channelsPage, page} = await pw.testBrowser.login(user);
|
|
await channelsPage.goto(team.name, 'town-square');
|
|
await channelsPage.toBeVisible();
|
|
|
|
// # Open the Bookmarks Bar submenu and choose "Attach a file", selecting a file
|
|
const channelMenu = await channelsPage.openChannelMenu();
|
|
await channelMenu.openBookmarksSubmenu();
|
|
const fileChooserPromise = page.waitForEvent('filechooser');
|
|
await channelMenu.addBookmarkFile.click();
|
|
const fileChooser = await fileChooserPromise;
|
|
await fileChooser.setFiles(path.resolve('asset/mattermost-icon_128x128.png'));
|
|
|
|
// # Confirm the file bookmark
|
|
await channelsPage.bookmarkCreateModal.toBeVisible();
|
|
await channelsPage.bookmarkCreateModal.addButton.click();
|
|
|
|
// * Verify the file bookmark appears in the channel bookmarks bar
|
|
await channelsPage.channelBookmarksBar.toBeVisible();
|
|
await expect(channelsPage.channelBookmarksBar.getBookmark(/mattermost-icon/i)).toBeVisible();
|
|
});
|