Migrate MM-53377 regression test from Cypress to Playwright (#29460)
* feat: Migrate MM-53377 regression test from Cypress to Playwright * fix: Update mm_53377 regression test to use admin client for setup * fix: Correct admin client usage in mm_53377 regression test * refactor: Standardize mm_53377 Playwright test with consistent naming and imports * fix: Mark MM-T53377 test as fixme for investigation * Migrating mm_53377_regression_test_spec.js cypress test to playwright * Fixing linter errors * Addressing PR review comment * Fixing broken test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1b164c8302
Коммит
b8efccae69
@@ -11,6 +11,7 @@ export default class ChannelsPostCreate {
|
||||
readonly emojiButton;
|
||||
readonly sendMessageButton;
|
||||
readonly scheduleDraftMessageButton;
|
||||
readonly suggestionList;
|
||||
|
||||
constructor(container: Locator, isRHS = false) {
|
||||
this.container = container;
|
||||
@@ -25,6 +26,7 @@ export default class ChannelsPostCreate {
|
||||
this.emojiButton = container.getByLabel('select an emoji');
|
||||
this.sendMessageButton = container.getByTestId('SendMessageButton');
|
||||
this.scheduleDraftMessageButton = container.getByLabel('Schedule message');
|
||||
this.suggestionList = container.getByTestId('suggestionList');
|
||||
}
|
||||
|
||||
async toBeVisible() {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {expect, Locator} from '@playwright/test';
|
||||
|
||||
export default class UserProfilePopover {
|
||||
readonly container: Locator;
|
||||
|
||||
constructor(container: Locator) {
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
async toBeVisible() {
|
||||
await expect(this.container).toBeVisible();
|
||||
}
|
||||
|
||||
async close() {
|
||||
await this.container.getByLabel('Close user profile popover').click();
|
||||
}
|
||||
}
|
||||
|
||||
export {UserProfilePopover};
|
||||
@@ -24,6 +24,7 @@ import {GenericConfirmModal} from './channels/generic_confirm_modal';
|
||||
|
||||
import {ScheduledDraftMenu} from './channels/scheduled_draft_menu';
|
||||
import {ScheduledDraftModal} from './channels/scheduled_draft_modal';
|
||||
import {UserProfilePopover} from './channels/user_profile_popover';
|
||||
import {SystemConsoleSidebar} from './system_console/sidebar';
|
||||
import {SystemConsoleNavbar} from './system_console/navbar';
|
||||
|
||||
@@ -61,6 +62,7 @@ const components = {
|
||||
SystemUsersFilterPopover,
|
||||
SystemUsersFilterMenu,
|
||||
SystemUsersColumnToggleMenu,
|
||||
UserProfilePopover,
|
||||
};
|
||||
|
||||
export {
|
||||
|
||||
@@ -18,6 +18,7 @@ export default class ChannelsPage {
|
||||
readonly sidebarLeft;
|
||||
readonly sidebarRight;
|
||||
readonly appBar;
|
||||
readonly userProfilePopover;
|
||||
|
||||
readonly findChannelsModal;
|
||||
readonly deletePostModal;
|
||||
@@ -53,6 +54,7 @@ export default class ChannelsPage {
|
||||
this.emojiGifPickerPopup = new components.EmojiGifPicker(page.locator('#emojiGifPicker'));
|
||||
this.scheduledDraftDropdown = new components.ScheduledDraftMenu(page.locator('#dropdown_send_post_options'));
|
||||
this.scheduledDraftModal = new components.ScheduledDraftModal(page.locator('div.modal-content'));
|
||||
this.userProfilePopover = new components.UserProfilePopover(page.locator('.user-profile-popover'));
|
||||
|
||||
// Posts
|
||||
this.postContainer = page.locator('div.post-message__text');
|
||||
|
||||
Ссылка в новой задаче
Block a user