@elastic/eui
Version:
Elastic UI Component Library
35 lines (33 loc) • 1.85 kB
JavaScript
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/// <reference types="cypress" />
/// <reference types="cypress-real-events" />
/// <reference types="../../../cypress/support" />
import React from 'react';
import { EuiIcon } from './icon';
import { jsx as ___EmotionJSX } from "@emotion/react";
describe('EuiIcons', function () {
describe('Automated accessibility check for editor icons', function () {
var EditorIcons = ['editorAlignCenter', 'editorAlignLeft', 'editorAlignRight', 'editorBold', 'editorChecklist', 'editorCodeBlock', 'editorComment', 'editorDistributeHorizontal', 'editorDistributeVertical', 'editorHeading', 'editorItalic', 'editorItemAlignBottom', 'editorItemAlignCenter', 'editorItemAlignLeft', 'editorItemAlignMiddle', 'editorItemAlignRight', 'editorItemAlignTop', 'editorLink', 'editorOrderedList', 'editorPositionBottomLeft', 'editorPositionBottomRight', 'editorPositionTopLeft', 'editorPositionTopRight', 'editorRedo', 'editorStrike', 'editorTable', 'editorUnderline', 'editorUndo', 'editorUnorderedList'];
var EditorGrid = function EditorGrid() {
return ___EmotionJSX("div", null, EditorIcons.map(function (glyph) {
return ___EmotionJSX(EuiIcon, {
className: "eui-alignMiddle",
type: glyph
});
}));
};
it('has zero violations on first render', function () {
cy.mount(___EmotionJSX(EditorGrid, null));
cy.get('div[data-cy-root]').find('svg', {
timeout: 5000
}).should('have.length', 29);
cy.checkAxe();
});
});
});