- Fix: Avoid errors occurring in Chrome now for supportsGoodTextCharPos

- Linting: Avoid Jamilih file in doc linting
- Testing: Add testcafe (ESLint plugin/rules, accessibility test
  (failing), ui test beginnings (passing))
- Docs: Add "Testing" prefix to contributing file
- npm: Bump to 3.0.0-rc.3
This commit is contained in:
Brett Zamir
2018-09-30 12:05:50 +08:00
parent 1a214ae444
commit 71b2b33e41
19 changed files with 2474 additions and 35 deletions

View File

@@ -0,0 +1,43 @@
// https://github.com/DevExpress/testcafe
// https://devexpress.github.io/testcafe/documentation/test-api/
// https://github.com/helen-dikareva/axe-testcafe
import axeCheck from 'axe-testcafe';
fixture`TestCafe Axe accessibility tests (Editor - no parameters)`
.page`http://localhost:8000/editor/svg-editor.html`;
test('Editor - no parameters', async t => {
await axeCheck(t); // , axeContent, axeOptions: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axerun
});
fixture`TestCafe Axe accessibility tests (Editor - with all extensions)`
.page`http://localhost:8000/editor/svg-editor.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js`;
test('Editor ES - with all extensions', async t => {
await axeCheck(t); // , axeContent, axeOptions: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axerun
});
/* eslint-disable qunit/no-commented-tests */
// Waiting for https://github.com/DevExpress/testcafe-hammerhead/issues/1725 (also https://github.com/DevExpress/testcafe/issues/2734 )
/**
fixture`TestCafe Axe accessibility tests (Editor ES - no parameters)`
.page`http://localhost:8000/editor/svg-editor-es.html`;
test('Editor ES - no parameters', async t => {
await axeCheck(t); // , axeContent, axeOptions: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axerun
});
fixture`TestCafe Axe accessibility tests (Editor ES - with all extensions)`
.page`http://localhost:8000/editor/svg-editor-es.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js`;
test('Editor ES - with all extensions', async t => {
await axeCheck(t); // , axeContent, axeOptions: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axerun
});
fixture`TestCafe Axe accessibility tests (Embedded - no parameters)`
.page`http://localhost:8000/editor/embedapi.html`;
test('Embedded - no parameters', async t => {
await axeCheck(t); // , axeContent, axeOptions: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axerun
});
*/

22
test/ui-tests/ui.js Normal file
View File

@@ -0,0 +1,22 @@
// https://github.com/DevExpress/testcafe
// https://devexpress.github.io/testcafe/documentation/test-api/
// https://github.com/helen-dikareva/axe-testcafe
import {Selector} from 'testcafe';
fixture`TestCafe UI tests`
.page`http://localhost:8000/editor/svg-editor.html`;
test('Editor - No parameters: Export button', async t => {
await t
.click('#dialog_buttons > input[type=button][value=OK]')
.click('#main_icon')
.expect(Selector('#tool_export')).ok('Has open button');
});
test('Editor - No parameters: Export button clicking', async t => {
await t
.click('#dialog_buttons > input[type=button][value=OK]')
.click('#main_icon')
.click('#tool_export')
.expect(Selector('#dialog_content select')).ok('Export dialog opens');
});