refactor: convert accessibility specs to ts (#28348)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e41ab1a3b8
Коммит
ce63a20980
@@ -10,11 +10,13 @@
|
|||||||
// Stage: @prod
|
// Stage: @prod
|
||||||
// Group: @channels @enterprise @accessibility
|
// Group: @channels @enterprise @accessibility
|
||||||
|
|
||||||
|
import {Channel} from '@mattermost/types/channels';
|
||||||
|
import {Team} from '@mattermost/types/teams';
|
||||||
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
||||||
|
|
||||||
describe('Verify Accessibility Support in different input fields', () => {
|
describe('Verify Accessibility Support in different input fields', () => {
|
||||||
let testTeam;
|
let testTeam: Team;
|
||||||
let testChannel;
|
let testChannel: Channel;
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
// * Check if server has license for Guest Accounts
|
// * Check if server has license for Guest Accounts
|
||||||
@@ -9,12 +9,15 @@
|
|||||||
|
|
||||||
// Group: @channels @enterprise @accessibility
|
// Group: @channels @enterprise @accessibility
|
||||||
|
|
||||||
|
import {Channel} from '@mattermost/types/channels';
|
||||||
|
import {Team} from '@mattermost/types/teams';
|
||||||
|
import {UserProfile} from '@mattermost/types/users';
|
||||||
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
||||||
|
|
||||||
describe('Verify Accessibility Support in Modals & Dialogs', () => {
|
describe('Verify Accessibility Support in Modals & Dialogs', () => {
|
||||||
let testTeam;
|
let testTeam: Team;
|
||||||
let testChannel;
|
let testChannel: Channel;
|
||||||
let testUser;
|
let testUser: UserProfile;
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
// * Check if server has license for Guest Accounts
|
// * Check if server has license for Guest Accounts
|
||||||
@@ -109,12 +112,12 @@ describe('Verify Accessibility Support in Modals & Dialogs', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function verifyMainMenuModal(menuItem, modalName) {
|
function verifyMainMenuModal(menuItem: string, modalName?: string) {
|
||||||
cy.uiGetLHSHeader().click();
|
cy.uiGetLHSHeader().click();
|
||||||
verifyModal(menuItem, modalName);
|
verifyModal(menuItem, modalName);
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifyChannelMenuModal(menuItem, modalName) {
|
function verifyChannelMenuModal(menuItem: string, modalName?: string) {
|
||||||
cy.get('#channelHeaderDropdownIcon').click();
|
cy.get('#channelHeaderDropdownIcon').click();
|
||||||
verifyModal(menuItem, modalName);
|
verifyModal(menuItem, modalName);
|
||||||
}
|
}
|
||||||
@@ -124,7 +127,7 @@ function verifyUserMenuModal(menuItem) {
|
|||||||
verifyModal(menuItem);
|
verifyModal(menuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifyModal(menuItem, modalName) {
|
function verifyModal(menuItem: string, modalName?: string) {
|
||||||
// * Verify that menu is open
|
// * Verify that menu is open
|
||||||
cy.findByRole('menu');
|
cy.findByRole('menu');
|
||||||
|
|
||||||
@@ -10,13 +10,16 @@
|
|||||||
// Stage: @prod
|
// Stage: @prod
|
||||||
// Group: @channels @enterprise @accessibility
|
// Group: @channels @enterprise @accessibility
|
||||||
|
|
||||||
|
import {Channel} from '@mattermost/types/channels';
|
||||||
|
import {Team} from '@mattermost/types/teams';
|
||||||
|
import {UserProfile} from '@mattermost/types/users';
|
||||||
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
||||||
|
|
||||||
describe('Verify Accessibility Support in Modals & Dialogs', () => {
|
describe('Verify Accessibility Support in Modals & Dialogs', () => {
|
||||||
let testTeam;
|
let testTeam: Team;
|
||||||
let testChannel;
|
let testChannel: Channel;
|
||||||
let testUser;
|
let testUser: UserProfile;
|
||||||
let selectedRowText;
|
let selectedRowText: string;
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
// * Check if server has license for Guest Accounts
|
// * Check if server has license for Guest Accounts
|
||||||
@@ -46,8 +49,8 @@ describe('Verify Accessibility Support in Modals & Dialogs', () => {
|
|||||||
cy.uiAddDirectMessage().click();
|
cy.uiAddDirectMessage().click();
|
||||||
|
|
||||||
// * Verify the accessibility support in Direct Messages Dialog
|
// * Verify the accessibility support in Direct Messages Dialog
|
||||||
cy.findAllByRole('dialog', 'Direct Messages').eq(0).within(() => {
|
cy.findAllByRole('dialog', {name: 'Direct Messages'}).eq(0).within(() => {
|
||||||
cy.findByRole('heading', 'Direct Messages');
|
cy.findByRole('heading', {name: 'Direct Messages'});
|
||||||
|
|
||||||
// * Verify the accessibility support in search input
|
// * Verify the accessibility support in search input
|
||||||
cy.findByRole('textbox', {name: 'Search for people'}).
|
cy.findByRole('textbox', {name: 'Search for people'}).
|
||||||
Ссылка в новой задаче
Block a user