CLD-5948 Playwright/E2E: Update dependencies, server default config and its types, and remove Boards and mobile view tests (#24583)

* update dependencies

* update dependencies

* remove mobile view

* remove boards

* update default config  and its types

* update snapshots

* fix formatting

* check works and fix styling
Этот коммит содержится в:
Saturnino Abril
2023-09-20 05:28:35 +08:00
коммит произвёл GitHub
родитель 88d043a971
Коммит b7b08dbc0f
63 изменённых файлов: 657 добавлений и 834 удалений

Просмотреть файл

@@ -1,44 +0,0 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {expect, test} from '@e2e-support/test_fixture';
import {shouldSkipInSmallScreen} from '@e2e-support/flag';
shouldSkipInSmallScreen();
test('MM-T4274 Create an Empty Board', async ({pw, pages}) => {
// Create and sign in a new user
const {user} = await pw.initSetup();
// Log in a user in new browser context
const {page} = await pw.testBrowser.login(user);
// Visit a default channel page
const channelsPage = new pages.ChannelsPage(page);
await channelsPage.goto();
await channelsPage.toBeVisible();
// Switch to Boards page
await channelsPage.globalHeader.switchProduct('Boards');
// Should have redirected to boards create page
const boardsCreatePage = new pages.BoardsCreatePage(page);
await boardsCreatePage.toBeVisible();
// Create empty board
await boardsCreatePage.createEmptyBoard();
// Should have redirected to boards view page
const boardsViewPage = new pages.BoardsViewPage(page);
await boardsViewPage.toBeVisible();
await boardsViewPage.shouldHaveUntitledBoard();
// Type new title and hit enter
const title = 'Testing';
await boardsViewPage.editableTitle.fill(title);
await boardsViewPage.editableTitle.press('Enter');
// Should update the title in heading and in sidebar
expect(await boardsViewPage.editableTitle.getAttribute('value')).toBe(title);
await boardsViewPage.sidebar.waitForTitle(title);
});

Просмотреть файл

@@ -22,7 +22,7 @@ test('MM-T5435_1 Global Drafts link in sidebar should be hidden when another use
createRandomPost({
channel_id: channel.id,
user_id: adminUser.id,
})
}),
);
// # Log in as user in new browser context

Просмотреть файл

@@ -28,7 +28,8 @@ test('MM-T5445 Should search, select and post correct Gif when Gif picker is ope
await channelPage.emojiGifPickerPopup.searchGif('hello');
// # Select the first gif
const {img: firstSearchGifResult, alt: altOfFirstSearchGifResult} = await channelPage.emojiGifPickerPopup.getNthGif(0);
const {img: firstSearchGifResult, alt: altOfFirstSearchGifResult} =
await channelPage.emojiGifPickerPopup.getNthGif(0);
await firstSearchGifResult.click();
// # Send the selected gif as a message
@@ -82,7 +83,8 @@ test('MM-T5446 Should search, select and post correct Gif when Gif picker is ope
await channelPage.emojiGifPickerPopup.searchGif('hello');
// # Select the first gif
const {img: firstSearchGifResult, alt: altOfFirstSearchGifResult} = await channelPage.emojiGifPickerPopup.getNthGif(0);
const {img: firstSearchGifResult, alt: altOfFirstSearchGifResult} =
await channelPage.emojiGifPickerPopup.getNthGif(0);
await firstSearchGifResult.click();
// # Send the selected gif as a message in the thread

Просмотреть файл

@@ -37,9 +37,7 @@ test('MM-T5424 Find channel search returns only 50 results when there are more t
await channelsPage.toBeVisible();
// # Click on "Find channel" and type "test_channel"
if (pw.isSmallScreen()) {
await channelsPage.centerView.headerMobile.toggleSidebar();
}
await channelsPage.centerView.headerMobile.toggleSidebar();
await channelsPage.sidebarLeft.findChannelButton.click();
await channelsPage.findChannelsModal.toBeVisible();