Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Added Cypress Axe.
Browse files Browse the repository at this point in the history
Fixes issue #20 using cypress axe.
Signed-off-by: Donald Labaj [email protected]
  • Loading branch information
dlabaj committed Nov 12, 2020
1 parent b175a8a commit aed96fa
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 9 deletions.
2 changes: 2 additions & 0 deletions e2e/features/step_definitions/coreUX.stepdef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import { Given, Then } from 'cypress-cucumber-preprocessor/steps';

Given('I am on the strimzi-ui homepage', () => {
cy.visit('localhost:3000/index.html');
cy.injectAxe();
});

Then(`the welcome message appears`, () => {
cy.get('#root').contains(`Welcome to the Strimzi UI`);
cy.checkA11y();
});
1 change: 1 addition & 0 deletions e2e/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
* Copyright Strimzi authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
import 'cypress-axe';
2 changes: 1 addition & 1 deletion e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"types": ["cypress", "node"]
"types": ["cypress", "cypress-axe", "node"]
},
"include": ["./**/*.ts"]
}
43 changes: 39 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@
"pino-filter": "^1.0.0",
"pino-http": "^5.3.0",
"pino-pretty": "^4.3.0",
"sass": "^1.29.0",
"react-i18next": "^11.7.3",
"sass": "^1.26.10",
"react-i18next": "^11.7.3",
"subscriptions-transport-ws": "^0.9.18",
"terser-webpack-plugin": "^3.0.7",
"typescript": "^4.0.3",
Expand All @@ -80,6 +79,7 @@
"@storybook/react": "^6.0.28",
"@testing-library/jest-dom": "^5.11.5",
"@testing-library/react": "^11.1.1",
"@types/cypress-axe": "^0.8.0",
"@types/cypress-cucumber-preprocessor": "^4.0.0",
"@types/express": "^4.17.8",
"@types/jest": "^26.0.15",
Expand All @@ -90,16 +90,18 @@
"@types/supertest": "^2.0.10",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"axe-core": "^4.0.2",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"commitlint": "^11.0.0",
"css-loader": "^5.0.1",
"cypress": "^5.5.0",
"cypress": "^5.6.0",
"cypress-axe": "^0.10.0",
"cypress-cucumber-preprocessor": "^4.0.0",
"eslint": "^7.12.1",
"eslint-plugin-i18next": "^5.0.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-i18next": "^5.0.0",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
Expand Down

0 comments on commit aed96fa

Please sign in to comment.