@kitconcept/volto-light-theme 3.0.0-alpha.0 → 3.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/acceptance.yml +46 -1
- package/CHANGELOG.md +35 -0
- package/Makefile +15 -1
- package/README.md +36 -0
- package/UPGRADE-GUIDE.md +38 -0
- package/acceptance/ci-a11y.yml +31 -0
- package/acceptance/cypress/support/commands.js +22 -0
- package/acceptance/cypress/support/e2e.js +7 -2
- package/acceptance/cypress/tests/a11y/accordionBlock.cy.js +30 -0
- package/acceptance/cypress/tests/a11y/basic.cy.js +26 -0
- package/acceptance/cypress/tests/a11y/buttonBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/eventContenttype.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/fileContenttype.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/gridBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/gridImageBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/gridListingBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/gridTeaserBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/gridTextBlock.cy.js +33 -0
- package/acceptance/cypress/tests/a11y/headingBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/highlightBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/imageBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/imageContenttype.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/introductionBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/linkContenttype.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/listingBlock.cy.js +31 -0
- package/acceptance/cypress/tests/a11y/mapsBlock.cy.js +27 -0
- package/acceptance/cypress/tests/a11y/newsItemContenttype.cy.js +27 -0
- package/acceptance/cypress/tests/a11y/pageContent.cy.js +27 -0
- package/acceptance/cypress/tests/a11y/searchBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/separatorBlock.cy.js +28 -0
- package/acceptance/cypress/tests/a11y/tableBlock.cy.js +26 -0
- package/acceptance/cypress/tests/a11y/teaserBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/textBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/tocBlock.cy.js +18 -0
- package/acceptance/cypress/tests/a11y/videoBlock.cy.js +27 -0
- package/acceptance/cypress/tests/{basic.cy.js → main/basic.cy.js} +1 -1
- package/acceptance/cypress.config.js +9 -1
- package/acceptance/docker-compose-a11y.yml +55 -0
- package/package.json +2 -2
- package/src/components/Blocks/Image/View.jsx +2 -1
- package/src/components/Blocks/Listing/ImageGallery.jsx +2 -0
- package/src/components/Blocks/Listing/ListingBody.jsx +9 -1
- package/src/components/LanguageSelector/LanguageSelector.js +72 -0
- package/src/components/MobileNavigation/MobileNavigation.jsx +24 -2
- package/src/components/SearchWidget/SearchWidget.jsx +0 -1
- package/src/customizations/volto/components/theme/LanguageSelector/LanguageSelector.js +11 -0
- package/src/theme/_footer.scss +8 -1
- package/src/theme/_header.scss +35 -17
- package/src/theme/_layout.scss +3 -3
- package/src/theme/_variables.scss +37 -38
- package/src/theme/blocks/_introduction.scss +4 -0
- /package/acceptance/cypress/tests/{blocks-map.cy.js → main/blocks-map.cy.js} +0 -0
- /package/acceptance/cypress/tests/{blocks-table.cy.js → main/blocks-table.cy.js} +0 -0
- /package/acceptance/cypress/tests/{listing-grid.cy.js → main/listing-grid.cy.js} +0 -0
- /package/acceptance/cypress/tests/{nav.cy.js → main/nav.cy.js} +0 -0
|
@@ -32,7 +32,7 @@ jobs:
|
|
|
32
32
|
parallel: false
|
|
33
33
|
browser: chrome
|
|
34
34
|
working-directory: acceptance
|
|
35
|
-
spec: cypress/tests
|
|
35
|
+
spec: cypress/tests/main/**/*.js
|
|
36
36
|
install: false
|
|
37
37
|
start: |
|
|
38
38
|
docker compose -f ci.yml --profile prod up
|
|
@@ -51,3 +51,48 @@ jobs:
|
|
|
51
51
|
with:
|
|
52
52
|
name: cypress-videos-acceptance
|
|
53
53
|
path: acceptance/cypress/videos
|
|
54
|
+
|
|
55
|
+
acceptance-a11y:
|
|
56
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- name: Checkout
|
|
60
|
+
uses: actions/checkout@v3
|
|
61
|
+
|
|
62
|
+
- name: Set up Docker Buildx
|
|
63
|
+
uses: docker/setup-buildx-action@v2
|
|
64
|
+
|
|
65
|
+
- name: Install Cypress
|
|
66
|
+
run: |
|
|
67
|
+
cd acceptance
|
|
68
|
+
yarn
|
|
69
|
+
|
|
70
|
+
- name: "Cypress: Acceptance tests"
|
|
71
|
+
uses: cypress-io/github-action@v6
|
|
72
|
+
env:
|
|
73
|
+
BABEL_ENV: production
|
|
74
|
+
CYPRESS_RETRIES: 2
|
|
75
|
+
CYPRESS_a11y: 1
|
|
76
|
+
with:
|
|
77
|
+
parallel: false
|
|
78
|
+
browser: chrome
|
|
79
|
+
working-directory: acceptance
|
|
80
|
+
spec: cypress/tests/a11y/**/*.js
|
|
81
|
+
install: false
|
|
82
|
+
start: |
|
|
83
|
+
docker compose -f ci-a11y.yml --profile prod up
|
|
84
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:8080/Plone http://localhost:3000'
|
|
85
|
+
|
|
86
|
+
# Upload Cypress screenshots
|
|
87
|
+
- uses: actions/upload-artifact@v3
|
|
88
|
+
if: failure()
|
|
89
|
+
with:
|
|
90
|
+
name: cypress-screenshots-acceptance
|
|
91
|
+
path: acceptance/cypress/screenshots
|
|
92
|
+
|
|
93
|
+
# Upload Cypress videos
|
|
94
|
+
- uses: actions/upload-artifact@v3
|
|
95
|
+
if: failure()
|
|
96
|
+
with:
|
|
97
|
+
name: cypress-videos-acceptance
|
|
98
|
+
path: acceptance/cypress/videos
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,41 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 3.0.0-alpha.2 (2024-01-17)
|
|
12
|
+
|
|
13
|
+
### Breaking
|
|
14
|
+
|
|
15
|
+
- Color background go to full-width now instead of snapping to 1440. @sneridagh
|
|
16
|
+
See decision in https://github.com/kitconcept/volto-light-theme/issues/323 [#323](https://github.com/kitconcept/volto-light-theme/pull/323)
|
|
17
|
+
|
|
18
|
+
### Bugfix
|
|
19
|
+
|
|
20
|
+
- Fix Responsive breakpoints have gaps for navigation @iRohitSingh [#265](https://github.com/kitconcept/volto-light-theme/pull/265)
|
|
21
|
+
- Replaced static values of spacing mixins with variables @ichim-david [#286](https://github.com/kitconcept/volto-light-theme/pull/286)
|
|
22
|
+
- Fix paragraph in edit mode is not reflected in view mode of Introduction
|
|
23
|
+
Block @iRohitSingh [#324](https://github.com/kitconcept/volto-light-theme/pull/324)
|
|
24
|
+
- Increase BlocksChooser index higher than the sidebar one. @sneridagh [#327](https://github.com/kitconcept/volto-light-theme/pull/327)
|
|
25
|
+
|
|
26
|
+
### Internal
|
|
27
|
+
|
|
28
|
+
- Add Search icon is missing on tablet & mobile screen sizes @iRohitSingh [#266](https://github.com/kitconcept/volto-light-theme/pull/266)
|
|
29
|
+
|
|
30
|
+
## 3.0.0-alpha.1 (2024-01-02)
|
|
31
|
+
|
|
32
|
+
### Breaking
|
|
33
|
+
|
|
34
|
+
- Change the Language Selector to only display the first 2 Characters of each Language @Molochem [#321](https://github.com/kitconcept/volto-light-theme/pull/321)
|
|
35
|
+
|
|
36
|
+
### Feature
|
|
37
|
+
|
|
38
|
+
- Added a11y tests infrastructure @sneridagh [#300](https://github.com/kitconcept/volto-light-theme/pull/300)
|
|
39
|
+
|
|
40
|
+
### Bugfix
|
|
41
|
+
|
|
42
|
+
- Fix wrong styling for all the groups by background in view mode @sneridagh
|
|
43
|
+
Added style support for Image block @sneridagh
|
|
44
|
+
Added style support for Listing block @sneridagh [#322](https://github.com/kitconcept/volto-light-theme/pull/322)
|
|
45
|
+
|
|
11
46
|
## 3.0.0-alpha.0 (2023-12-27)
|
|
12
47
|
|
|
13
48
|
### Breaking
|
package/Makefile
CHANGED
|
@@ -28,11 +28,13 @@ ADDON_NAME='@kitconcept/volto-light-theme'
|
|
|
28
28
|
ADDON_PATH='volto-light-theme'
|
|
29
29
|
COMPOSE_FILE=dockerfiles/docker-compose.yml
|
|
30
30
|
ACCEPTANCE_COMPOSE=acceptance/docker-compose.yml
|
|
31
|
+
ACCEPTANCE_COMPOSE_A11Y=acceptance/docker-compose-a11y.yml
|
|
31
32
|
CMD=CURRENT_DIR=${CURRENT_DIR} ADDON_NAME=${ADDON_NAME} ADDON_PATH=${ADDON_PATH} VOLTO_VERSION=${VOLTO_VERSION} PLONE_VERSION=${PLONE_VERSION} docker compose
|
|
32
33
|
DOCKER_COMPOSE=${CMD} -p ${ADDON_PATH} -f ${COMPOSE_FILE}
|
|
33
34
|
DEV_COMPOSE=COMPOSE_PROFILES=dev ${DOCKER_COMPOSE}
|
|
34
35
|
LIVE_COMPOSE=COMPOSE_PROFILES=dev ${DOCKER_COMPOSE}
|
|
35
36
|
ACCEPTANCE=${CMD} -p ${ADDON_PATH}-acceptance -f ${ACCEPTANCE_COMPOSE}
|
|
37
|
+
ACCEPTANCE_A11Y=${CMD} -p ${ADDON_PATH}-acceptance -f ${ACCEPTANCE_COMPOSE_A11Y}
|
|
36
38
|
|
|
37
39
|
.PHONY: build-backend
|
|
38
40
|
build-backend: ## Build
|
|
@@ -124,7 +126,7 @@ start-test-acceptance-server-prod: ## Start acceptance server in prod (used by C
|
|
|
124
126
|
|
|
125
127
|
.PHONY: test-acceptance
|
|
126
128
|
test-acceptance: ## Start Cypress (for use it while developing)
|
|
127
|
-
(cd acceptance && ./node_modules/.bin/cypress open)
|
|
129
|
+
(cd acceptance && ./node_modules/.bin/cypress open --config specPattern='cypress/tests/main/**/*.{js,jsx,ts,tsx}')
|
|
128
130
|
|
|
129
131
|
.PHONY: test-acceptance-headless
|
|
130
132
|
test-acceptance-headless: ## Run cypress tests in CI
|
|
@@ -138,6 +140,18 @@ stop-test-acceptance-server: ## Stop acceptance server (for use it while finishe
|
|
|
138
140
|
status-test-acceptance-server: ## Status of Acceptance Server (for use it while developing)
|
|
139
141
|
${ACCEPTANCE} ps
|
|
140
142
|
|
|
143
|
+
.PHONY: start-test-acceptance-server-a11y
|
|
144
|
+
start-test-acceptance-server-a11y: ## Start a11y acceptance server (for use it in while developing)
|
|
145
|
+
${ACCEPTANCE_A11Y} --profile dev up
|
|
146
|
+
|
|
147
|
+
.PHONY: stop-test-acceptance-server-a11y
|
|
148
|
+
stop-test-acceptance-server-a11y: ## Stop a11y acceptance server (for use it while finished developing)
|
|
149
|
+
${ACCEPTANCE_A11Y} --profile dev down
|
|
150
|
+
|
|
151
|
+
.PHONY: test-acceptance-a11y
|
|
152
|
+
test-acceptance-a11y: ## Start Cypress (for use it while developing)
|
|
153
|
+
(cd acceptance && CYPRESS_a11y=1 ./node_modules/.bin/cypress open --config specPattern='cypress/tests/a11y/**/*.{js,jsx,ts,tsx}')
|
|
154
|
+
|
|
141
155
|
.PHONY: debug-frontend
|
|
142
156
|
debug-frontend: ## Run bash in the Frontend container (for debug infrastructure purposes)
|
|
143
157
|
${DEV_COMPOSE} run --entrypoint bash addon-dev
|
package/README.md
CHANGED
|
@@ -181,6 +181,10 @@ It's behind a feature flag, as opt-out:
|
|
|
181
181
|
config.settings.enableFatMenu = true;
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
+
## Upgrade Guide
|
|
185
|
+
|
|
186
|
+
See a detailed upgrade guide in: https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md
|
|
187
|
+
|
|
184
188
|
## Development Setup
|
|
185
189
|
|
|
186
190
|
This theme works under Volto 17 alpha 16 onwards.
|
|
@@ -333,6 +337,38 @@ When finished, don't forget to shutdown the backend server.
|
|
|
333
337
|
make stop-test-acceptance-server
|
|
334
338
|
```
|
|
335
339
|
|
|
340
|
+
### Accessibility Acceptance tests
|
|
341
|
+
|
|
342
|
+
Run once
|
|
343
|
+
|
|
344
|
+
```shell
|
|
345
|
+
make install-acceptance
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
For starting the servers
|
|
349
|
+
|
|
350
|
+
Run
|
|
351
|
+
|
|
352
|
+
```shell
|
|
353
|
+
make start-test-acceptance-server-a11y
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
The frontend is run in dev mode, so development while writing tests is possible.
|
|
357
|
+
|
|
358
|
+
Run
|
|
359
|
+
|
|
360
|
+
```shell
|
|
361
|
+
make test-acceptance-a11y
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
To run Cypress tests afterwards.
|
|
365
|
+
|
|
366
|
+
When finished, don't forget to shutdown the backend server.
|
|
367
|
+
|
|
368
|
+
```shell
|
|
369
|
+
make stop-test-acceptance-server-a11y
|
|
370
|
+
```
|
|
371
|
+
|
|
336
372
|
### Release
|
|
337
373
|
|
|
338
374
|
Run
|
package/UPGRADE-GUIDE.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Upgrade Guide
|
|
2
|
+
|
|
3
|
+
## volto-light-theme 3.0.0
|
|
4
|
+
|
|
5
|
+
### Blocks background colors go full width
|
|
6
|
+
|
|
7
|
+
The background colors previously used to snap to 1440px.
|
|
8
|
+
From 3.0.0-alpha.0 this changed to be unconstrained by default, and expand to the end of the horizontal viewport.
|
|
9
|
+
|
|
10
|
+
### Upgraded support for volto-slider-block 6.0.0
|
|
11
|
+
|
|
12
|
+
VLT upgraded the dependency on `@kitconcept/volto-slider-block` to use `6.0.0`.
|
|
13
|
+
|
|
14
|
+
This is a drop-in replacement, so no action is required for the existing slider blocks you may have already in your sites.
|
|
15
|
+
However, the CSS classes of the structural slider block elements changed in this version.
|
|
16
|
+
The inner (visible objects) CSS classes remain unchanged.
|
|
17
|
+
If you have customized them in your project, you may have to update them, although the structural class names are rarely customized aside from vertical spacing properties.
|
|
18
|
+
They are mapped 1:1 with the previous ones, following this table correspondence:
|
|
19
|
+
|
|
20
|
+
| Old className | New className |
|
|
21
|
+
| --------------- | ---------------- |
|
|
22
|
+
| slick-slider | slider-wrapper |
|
|
23
|
+
| slick-list | slider-viewport |
|
|
24
|
+
| slick-track | slider-container |
|
|
25
|
+
| slick-slide | slider-slide |
|
|
26
|
+
| slick-arrow | slider-button |
|
|
27
|
+
| slick-prev | slider-button-prev |
|
|
28
|
+
| slick-next | slider-slide-next |
|
|
29
|
+
| slick-next | slider-slide-next |
|
|
30
|
+
| slick-dots | slider-dots |
|
|
31
|
+
| slick-dot | slider-dot |
|
|
32
|
+
|
|
33
|
+
For more information, please check the https://github.com/kitconcept/volto-slider-block/blob/main/README.md [#288](https://github.com/kitconcept/volto-light-theme/pull/288)
|
|
34
|
+
|
|
35
|
+
### Language switcher shows the two letters abbreviation of the languages
|
|
36
|
+
|
|
37
|
+
Volto default is to show the full name of the language in the language switcher.
|
|
38
|
+
VLT now shows only the two letters abbreviation of the language.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
version: "3"
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
|
|
5
|
+
addon-acceptance:
|
|
6
|
+
build:
|
|
7
|
+
context: ../
|
|
8
|
+
dockerfile: ./dockerfiles/Dockerfile
|
|
9
|
+
args:
|
|
10
|
+
ADDON_NAME: "${ADDON_NAME}"
|
|
11
|
+
ADDON_PATH: "${ADDON_PATH}"
|
|
12
|
+
VOLTO_VERSION: ${VOLTO_VERSION:-17}
|
|
13
|
+
environment:
|
|
14
|
+
RAZZLE_INTERNAL_API_PATH: http://backend-acceptance-a11y:8080/Plone
|
|
15
|
+
RAZZLE_API_PATH: http://localhost:8080/Plone
|
|
16
|
+
ports:
|
|
17
|
+
- 3000:3000
|
|
18
|
+
depends_on:
|
|
19
|
+
- backend-acceptance-a11y
|
|
20
|
+
profiles:
|
|
21
|
+
- prod
|
|
22
|
+
|
|
23
|
+
backend-acceptance-a11y:
|
|
24
|
+
image: ghcr.io/kitconcept/voltolighttheme:latest
|
|
25
|
+
environment:
|
|
26
|
+
CORS_: true
|
|
27
|
+
ports:
|
|
28
|
+
- 8080:8080
|
|
29
|
+
profiles:
|
|
30
|
+
- dev
|
|
31
|
+
- prod
|
|
@@ -1 +1,23 @@
|
|
|
1
1
|
import '@plone/volto-testing/cypress/support/commands';
|
|
2
|
+
|
|
3
|
+
// Print cypress-axe violations to the terminal
|
|
4
|
+
function printAccessibilityViolations(violations) {
|
|
5
|
+
cy.task(
|
|
6
|
+
'table',
|
|
7
|
+
violations.map(({ id, impact, description, nodes }) => ({
|
|
8
|
+
impact,
|
|
9
|
+
description: `${description} (${id})`,
|
|
10
|
+
nodes: nodes.length,
|
|
11
|
+
})),
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
Cypress.Commands.add(
|
|
16
|
+
'checkAccessibility',
|
|
17
|
+
(subject, { skipFailures = false } = {}) => {
|
|
18
|
+
cy.checkA11y(subject, null, printAccessibilityViolations, skipFailures);
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
prevSubject: 'optional',
|
|
22
|
+
},
|
|
23
|
+
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import 'cypress-axe';
|
|
2
2
|
import 'cypress-file-upload';
|
|
3
3
|
import './commands';
|
|
4
|
+
import 'cypress-axe';
|
|
4
5
|
import { setup, teardown } from './reset-fixture';
|
|
5
6
|
|
|
6
7
|
beforeEach(function () {
|
|
@@ -9,10 +10,14 @@ beforeEach(function () {
|
|
|
9
10
|
cy.setCookie('confirm_facebook', '1');
|
|
10
11
|
cy.setCookie('confirm_youtube', '1');
|
|
11
12
|
cy.log('Setting up API fixture');
|
|
12
|
-
|
|
13
|
+
if (!Cypress.env('a11y')) {
|
|
14
|
+
setup();
|
|
15
|
+
}
|
|
13
16
|
});
|
|
14
17
|
|
|
15
18
|
afterEach(function () {
|
|
16
19
|
cy.log('Tearing down API fixture');
|
|
17
|
-
|
|
20
|
+
if (!Cypress.env('a11y')) {
|
|
21
|
+
teardown();
|
|
22
|
+
}
|
|
18
23
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Accordion Block
|
|
11
|
+
it('Accordion Block (/block/block-accordion)', () => {
|
|
12
|
+
cy.navigate('/block/block-accordion');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
rules: [
|
|
17
|
+
// the example page intentionally omits the h1
|
|
18
|
+
{
|
|
19
|
+
id: 'page-has-heading-one',
|
|
20
|
+
enabled: false,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'duplicate-id',
|
|
24
|
+
enabled: false,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
});
|
|
28
|
+
cy.checkAccessibility();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
describe('a11y tests', () => {
|
|
3
|
+
beforeEach(() => {
|
|
4
|
+
// Cypress starts out with a blank slate for each test
|
|
5
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
6
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
7
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
8
|
+
cy.visit('/');
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('Home page (/)', () => {
|
|
12
|
+
cy.navigate('/');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
rules: [
|
|
17
|
+
// the example home page intentionally omits the h1
|
|
18
|
+
{
|
|
19
|
+
id: 'page-has-heading-one',
|
|
20
|
+
enabled: false,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
});
|
|
24
|
+
cy.checkAccessibility();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
//Button
|
|
11
|
+
it('Button-Block (/block/button-block)', () => {
|
|
12
|
+
cy.navigate('/block/button-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
//Event
|
|
11
|
+
it('Event (/content-types/event)', () => {
|
|
12
|
+
cy.navigate('/content-types/event');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
//File
|
|
11
|
+
it('File (/content-types/file)', () => {
|
|
12
|
+
cy.navigate('/content-types/file');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// grid block
|
|
11
|
+
it('Grid-Block (/block/grid-block)', () => {
|
|
12
|
+
cy.navigate('/block/grid-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// grid block Image
|
|
11
|
+
it('Grid-Block Image (/block/grid-block/image)', () => {
|
|
12
|
+
cy.navigate('/block/grid-block/image');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// grid block listing
|
|
11
|
+
it('Grid-Block Listing (/block/grid-block/listing)', () => {
|
|
12
|
+
cy.navigate('/block/grid-block/listing');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// grid Teaser block
|
|
11
|
+
it('Grid-Block Teaser (/block/grid-block/teaser)', () => {
|
|
12
|
+
cy.navigate('/block/grid-block/teaser');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// grid tex block
|
|
11
|
+
it('Grid-Block text (/block/grid-block/text)', () => {
|
|
12
|
+
cy.navigate('/block/grid-block/text');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
rules: [
|
|
17
|
+
// there are copies of slate h2,
|
|
18
|
+
// which have with the same id
|
|
19
|
+
{
|
|
20
|
+
id: 'duplicate-id-active',
|
|
21
|
+
enabled: false,
|
|
22
|
+
},
|
|
23
|
+
// there are missing heading of grid-block
|
|
24
|
+
// because we are using multiple grid block
|
|
25
|
+
{
|
|
26
|
+
id: 'empty-heading',
|
|
27
|
+
enabled: false,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
});
|
|
31
|
+
cy.checkAccessibility();
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Heading
|
|
11
|
+
it('Heading-Block (/block/heading-block)', () => {
|
|
12
|
+
cy.navigate('/block/heading-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Highlight Block
|
|
11
|
+
it('Highlight-Block (/block/highlight-block)', () => {
|
|
12
|
+
cy.navigate('/block/highlight-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Image-Block
|
|
11
|
+
it('Image-Block (/block/image-block)', () => {
|
|
12
|
+
cy.navigate('/block/image-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
//Image
|
|
11
|
+
it('Image (/content-types/image)', () => {
|
|
12
|
+
cy.navigate('/content-types/image');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Introduction-Block
|
|
11
|
+
it('Introduction-Block (/block/introduction-block)', () => {
|
|
12
|
+
cy.navigate('/block/introduction-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
describe('a11y tests', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
// Cypress starts out with a blank slate for each test
|
|
4
|
+
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
5
|
+
// Since we want to visit the same URL at the start of all our tests,
|
|
6
|
+
// we include it in our beforeEach function so that it runs before each test
|
|
7
|
+
cy.visit('/');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
//Link
|
|
11
|
+
it('link (/content-types/internal-link)', () => {
|
|
12
|
+
cy.navigate('/content-types/internal-link');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|