-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into customstylewrapperandimprovedgroupingwithCus…
…tomCSSProps * main: Release 3.0.0-alpha.1 Some style fixes. Added support for new StyleWrapper custom CSS props in Listing and Image blocks (#322) Updated the Language Selector (#321) Add a11y tests infrastructure (#300)
- Loading branch information
Showing
48 changed files
with
927 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
addon-acceptance: | ||
build: | ||
context: ../ | ||
dockerfile: ./dockerfiles/Dockerfile | ||
args: | ||
ADDON_NAME: "${ADDON_NAME}" | ||
ADDON_PATH: "${ADDON_PATH}" | ||
VOLTO_VERSION: ${VOLTO_VERSION:-17} | ||
environment: | ||
RAZZLE_INTERNAL_API_PATH: http://backend-acceptance-a11y:8080/Plone | ||
RAZZLE_API_PATH: http://localhost:8080/Plone | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- backend-acceptance-a11y | ||
profiles: | ||
- prod | ||
|
||
backend-acceptance-a11y: | ||
image: ghcr.io/kitconcept/voltolighttheme:latest | ||
environment: | ||
CORS_: true | ||
ports: | ||
- 8080:8080 | ||
profiles: | ||
- dev | ||
- prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
import '@plone/volto-testing/cypress/support/commands'; | ||
|
||
// Print cypress-axe violations to the terminal | ||
function printAccessibilityViolations(violations) { | ||
cy.task( | ||
'table', | ||
violations.map(({ id, impact, description, nodes }) => ({ | ||
impact, | ||
description: `${description} (${id})`, | ||
nodes: nodes.length, | ||
})), | ||
); | ||
} | ||
|
||
Cypress.Commands.add( | ||
'checkAccessibility', | ||
(subject, { skipFailures = false } = {}) => { | ||
cy.checkA11y(subject, null, printAccessibilityViolations, skipFailures); | ||
}, | ||
{ | ||
prevSubject: 'optional', | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
describe('a11y tests', () => { | ||
beforeEach(() => { | ||
// Cypress starts out with a blank slate for each test | ||
// so we must tell it to visit our website with the `cy.visit()` command. | ||
// Since we want to visit the same URL at the start of all our tests, | ||
// we include it in our beforeEach function so that it runs before each test | ||
cy.visit('/'); | ||
}); | ||
|
||
// Accordion Block | ||
it('Accordion Block (/block/block-accordion)', () => { | ||
cy.navigate('/block/block-accordion'); | ||
cy.wait(2000); | ||
cy.injectAxe(); | ||
cy.configureAxe({ | ||
rules: [ | ||
// the example page intentionally omits the h1 | ||
{ | ||
id: 'page-has-heading-one', | ||
enabled: false, | ||
}, | ||
{ | ||
id: 'duplicate-id', | ||
enabled: false, | ||
}, | ||
], | ||
}); | ||
cy.checkAccessibility(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
describe('a11y tests', () => { | ||
beforeEach(() => { | ||
// Cypress starts out with a blank slate for each test | ||
// so we must tell it to visit our website with the `cy.visit()` command. | ||
// Since we want to visit the same URL at the start of all our tests, | ||
// we include it in our beforeEach function so that it runs before each test | ||
cy.visit('/'); | ||
}); | ||
|
||
it('Home page (/)', () => { | ||
cy.navigate('/'); | ||
cy.wait(2000); | ||
cy.injectAxe(); | ||
cy.configureAxe({ | ||
rules: [ | ||
// the example home page intentionally omits the h1 | ||
{ | ||
id: 'page-has-heading-one', | ||
enabled: false, | ||
}, | ||
], | ||
}); | ||
cy.checkAccessibility(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
describe('a11y tests', () => { | ||
beforeEach(() => { | ||
// Cypress starts out with a blank slate for each test | ||
// so we must tell it to visit our website with the `cy.visit()` command. | ||
// Since we want to visit the same URL at the start of all our tests, | ||
// we include it in our beforeEach function so that it runs before each test | ||
cy.visit('/'); | ||
}); | ||
|
||
//Button | ||
it('Button-Block (/block/button-block)', () => { | ||
cy.navigate('/block/button-block'); | ||
cy.wait(2000); | ||
cy.injectAxe(); | ||
cy.configureAxe(); | ||
cy.checkAccessibility(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
describe('a11y tests', () => { | ||
beforeEach(() => { | ||
// Cypress starts out with a blank slate for each test | ||
// so we must tell it to visit our website with the `cy.visit()` command. | ||
// Since we want to visit the same URL at the start of all our tests, | ||
// we include it in our beforeEach function so that it runs before each test | ||
cy.visit('/'); | ||
}); | ||
|
||
//Event | ||
it('Event (/content-types/event)', () => { | ||
cy.navigate('/content-types/event'); | ||
cy.wait(2000); | ||
cy.injectAxe(); | ||
cy.configureAxe(); | ||
cy.checkAccessibility(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
describe('a11y tests', () => { | ||
beforeEach(() => { | ||
// Cypress starts out with a blank slate for each test | ||
// so we must tell it to visit our website with the `cy.visit()` command. | ||
// Since we want to visit the same URL at the start of all our tests, | ||
// we include it in our beforeEach function so that it runs before each test | ||
cy.visit('/'); | ||
}); | ||
|
||
//File | ||
it('File (/content-types/file)', () => { | ||
cy.navigate('/content-types/file'); | ||
cy.wait(2000); | ||
cy.injectAxe(); | ||
cy.configureAxe(); | ||
cy.checkAccessibility(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
describe('a11y tests', () => { | ||
beforeEach(() => { | ||
// Cypress starts out with a blank slate for each test | ||
// so we must tell it to visit our website with the `cy.visit()` command. | ||
// Since we want to visit the same URL at the start of all our tests, | ||
// we include it in our beforeEach function so that it runs before each test | ||
cy.visit('/'); | ||
}); | ||
|
||
// grid block | ||
it('Grid-Block (/block/grid-block)', () => { | ||
cy.navigate('/block/grid-block'); | ||
cy.wait(2000); | ||
cy.injectAxe(); | ||
cy.configureAxe(); | ||
cy.checkAccessibility(); | ||
}); | ||
}); |
Oops, something went wrong.