MM-52641 MM-52645 Playwright/Accessibility: Initial setup and accessibility fix on login page (#23254)
* MM-52641 Playwright/Accessibility: initial setup * upgrade Playwright to 1.36.1 * fix accessibility at login page * fix lint * update snapshot
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
077c16ef61
Коммит
e377d985cd
19
e2e-tests/playwright/tests/accessibility/common/login.spec.ts
Обычный файл
19
e2e-tests/playwright/tests/accessibility/common/login.spec.ts
Обычный файл
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {expect, test} from '@e2e-support/test_fixture';
|
||||
|
||||
test('/login', async ({pw, pages, page, axe}) => {
|
||||
// # Go to login page
|
||||
const {adminClient} = await pw.getAdminClient();
|
||||
const adminConfig = await adminClient.getConfig();
|
||||
const loginPage = new pages.LoginPage(page, adminConfig);
|
||||
await loginPage.goto();
|
||||
await loginPage.toBeVisible();
|
||||
|
||||
// # Analyze the page
|
||||
const accessibilityScanResults = await axe.loginPage().analyze();
|
||||
|
||||
// * Should have no violation
|
||||
expect(accessibilityScanResults.violations).toHaveLength(0);
|
||||
});
|
||||
@@ -20,8 +20,8 @@ test('MM-T5435_1 Global Drafts link in sidebar should be hidden when another use
|
||||
// # Create a post in the channel by admin
|
||||
const adminPost = await adminClient.createPost(
|
||||
createRandomPost({
|
||||
channel_id: channel.id,
|
||||
user_id: adminUser.id,
|
||||
channel_id: channel.id,
|
||||
user_id: adminUser.id,
|
||||
})
|
||||
);
|
||||
|
||||
@@ -35,7 +35,7 @@ test('MM-T5435_1 Global Drafts link in sidebar should be hidden when another use
|
||||
|
||||
const lastPostByAdmin = await channelPage.getLastPost();
|
||||
await lastPostByAdmin.toBeVisible();
|
||||
|
||||
|
||||
// # Open the last post sent by admin in RHS
|
||||
await lastPostByAdmin.hover();
|
||||
await lastPostByAdmin.postMenu.toBeVisible();
|
||||
@@ -52,7 +52,7 @@ test('MM-T5435_1 Global Drafts link in sidebar should be hidden when another use
|
||||
await sidebarRight.postMessage(draftMessageByUser);
|
||||
|
||||
// # Close the RHS for draft to be saved
|
||||
await sidebarRight.close()
|
||||
await sidebarRight.close();
|
||||
|
||||
// * Verify drafts link in channel sidebar is visible
|
||||
await channelPage.sidebarLeft.draftsVisible();
|
||||
@@ -111,7 +111,7 @@ test('MM-T5435_2 Global Drafts link in sidebar should be hidden when user delete
|
||||
await sidebarRight.postMessage('I should be in drafts');
|
||||
|
||||
// # Close the RHS for draft to be saved
|
||||
await sidebarRight.close()
|
||||
await sidebarRight.close();
|
||||
|
||||
// * Verify drafts link in channel sidebar is visible
|
||||
await channelPage.sidebarLeft.draftsVisible();
|
||||
@@ -120,7 +120,7 @@ test('MM-T5435_2 Global Drafts link in sidebar should be hidden when user delete
|
||||
await post.hover();
|
||||
await post.postMenu.toBeVisible();
|
||||
await post.postMenu.openDotMenu();
|
||||
await channelPage.postDotMenu.toBeVisible()
|
||||
await channelPage.postDotMenu.toBeVisible();
|
||||
await channelPage.postDotMenu.delete();
|
||||
|
||||
// # Confirm the delete from the modal
|
||||
|
||||
Ссылка в новой задаче
Block a user