MM-53813: Fix(accessibility): on channels page (#24122)

* fix(accessibility): on channels page

* fix lint and update dynamic-virtualized-list

* fix snapshot and update per feedback

* fix e2e tests

* fix test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Saturnino Abril
2023-07-28 11:17:11 -04:00
коммит произвёл GitHub
родитель a47af39d80
Коммит 93a2c3281a
46 изменённых файлов: 149 добавлений и 141 удалений

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

@@ -0,0 +1,26 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {expect, test} from '@e2e-support/test_fixture';
test('Intro to channel', async ({pw, pages, axe}) => {
// 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();
await channelsPage.postMessage('hello');
await channelsPage.sendMessage();
// # Analyze the page
// Disable 'color-contrast' to be addressed by MM-53814
const accessibilityScanResults = await axe.builder(page, ['color-contrast']).analyze();
// * Should have no violation
expect(accessibilityScanResults.violations).toHaveLength(0);
});

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

@@ -12,7 +12,7 @@ test('/login', async ({pw, pages, page, axe}) => {
await loginPage.toBeVisible();
// # Analyze the page
const accessibilityScanResults = await axe.loginPage().analyze();
const accessibilityScanResults = await axe.builder(loginPage.page).analyze();
// * Should have no violation
expect(accessibilityScanResults.violations).toHaveLength(0);