@kitconcept/volto-light-theme 2.1.0 → 3.0.0-alpha.1

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.
Files changed (57) hide show
  1. package/.github/workflows/acceptance.yml +46 -1
  2. package/CHANGELOG.md +56 -0
  3. package/Makefile +16 -2
  4. package/README.md +48 -15
  5. package/acceptance/ci-a11y.yml +31 -0
  6. package/acceptance/cypress/support/commands.js +22 -0
  7. package/acceptance/cypress/support/e2e.js +7 -2
  8. package/acceptance/cypress/tests/a11y/accordionBlock.cy.js +30 -0
  9. package/acceptance/cypress/tests/a11y/basic.cy.js +26 -0
  10. package/acceptance/cypress/tests/a11y/buttonBlock.cy.js +18 -0
  11. package/acceptance/cypress/tests/a11y/eventContenttype.cy.js +18 -0
  12. package/acceptance/cypress/tests/a11y/fileContenttype.cy.js +18 -0
  13. package/acceptance/cypress/tests/a11y/gridBlock.cy.js +18 -0
  14. package/acceptance/cypress/tests/a11y/gridImageBlock.cy.js +18 -0
  15. package/acceptance/cypress/tests/a11y/gridListingBlock.cy.js +18 -0
  16. package/acceptance/cypress/tests/a11y/gridTeaserBlock.cy.js +18 -0
  17. package/acceptance/cypress/tests/a11y/gridTextBlock.cy.js +33 -0
  18. package/acceptance/cypress/tests/a11y/headingBlock.cy.js +18 -0
  19. package/acceptance/cypress/tests/a11y/highlightBlock.cy.js +18 -0
  20. package/acceptance/cypress/tests/a11y/imageBlock.cy.js +18 -0
  21. package/acceptance/cypress/tests/a11y/imageContenttype.cy.js +18 -0
  22. package/acceptance/cypress/tests/a11y/introductionBlock.cy.js +18 -0
  23. package/acceptance/cypress/tests/a11y/linkContenttype.cy.js +18 -0
  24. package/acceptance/cypress/tests/a11y/listingBlock.cy.js +31 -0
  25. package/acceptance/cypress/tests/a11y/mapsBlock.cy.js +27 -0
  26. package/acceptance/cypress/tests/a11y/newsItemContenttype.cy.js +27 -0
  27. package/acceptance/cypress/tests/a11y/pageContent.cy.js +27 -0
  28. package/acceptance/cypress/tests/a11y/searchBlock.cy.js +18 -0
  29. package/acceptance/cypress/tests/a11y/separatorBlock.cy.js +28 -0
  30. package/acceptance/cypress/tests/a11y/tableBlock.cy.js +26 -0
  31. package/acceptance/cypress/tests/a11y/teaserBlock.cy.js +18 -0
  32. package/acceptance/cypress/tests/a11y/textBlock.cy.js +18 -0
  33. package/acceptance/cypress/tests/a11y/tocBlock.cy.js +18 -0
  34. package/acceptance/cypress/tests/a11y/videoBlock.cy.js +27 -0
  35. package/acceptance/cypress/tests/{basic.cy.js → main/basic.cy.js} +1 -1
  36. package/acceptance/cypress.config.js +9 -1
  37. package/acceptance/docker-compose-a11y.yml +55 -0
  38. package/package.json +4 -4
  39. package/src/components/Blocks/Image/View.jsx +2 -1
  40. package/src/components/Blocks/Listing/ImageGallery.jsx +2 -0
  41. package/src/components/Blocks/Listing/ListingBody.jsx +9 -1
  42. package/src/components/LanguageSelector/LanguageSelector.js +72 -0
  43. package/src/components/Logo/Logo.jsx +7 -1
  44. package/src/components/MobileNavigation/MobileNavigation.jsx +11 -1
  45. package/src/customizations/volto/components/theme/LanguageSelector/LanguageSelector.js +11 -0
  46. package/src/theme/_bgcolor-blocks-layout.scss +13 -0
  47. package/src/theme/_blocks-chooser.scss +3 -0
  48. package/src/theme/_footer.scss +8 -1
  49. package/src/theme/_layout.scss +1 -1
  50. package/src/theme/_sitemap.scss +2 -0
  51. package/src/theme/blocks/_listing.scss +1 -1
  52. package/src/theme/blocks/_slider.scss +16 -71
  53. package/src/theme/main.scss +1 -0
  54. /package/acceptance/cypress/tests/{blocks-map.cy.js → main/blocks-map.cy.js} +0 -0
  55. /package/acceptance/cypress/tests/{blocks-table.cy.js → main/blocks-table.cy.js} +0 -0
  56. /package/acceptance/cypress/tests/{listing-grid.cy.js → main/listing-grid.cy.js} +0 -0
  57. /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/*.js
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,62 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 3.0.0-alpha.1 (2024-01-02)
12
+
13
+ ### Breaking
14
+
15
+ - 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)
16
+
17
+ ### Feature
18
+
19
+ - Added a11y tests infrastructure @sneridagh [#300](https://github.com/kitconcept/volto-light-theme/pull/300)
20
+
21
+ ### Bugfix
22
+
23
+ - Fix wrong styling for all the groups by background in view mode @sneridagh
24
+ Added style support for Image block @sneridagh
25
+ Added style support for Listing block @sneridagh [#322](https://github.com/kitconcept/volto-light-theme/pull/322)
26
+
27
+ ## 3.0.0-alpha.0 (2023-12-27)
28
+
29
+ ### Breaking
30
+
31
+ - Upgraded the dependency on `@kitconcept/volto-slider-block` to use `6.0.0`.
32
+
33
+ This is a drop-in replacement, so no action is required for the existing slider blocks you may have already in your sites.
34
+ However, the CSS classes of the structural slider block elements changed in this version.
35
+ The inner (visible objects) CSS classes remain unchanged.
36
+ 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.
37
+ They are mapped 1:1 with the previous ones, following this table correspondence:
38
+
39
+ | Old className | New className |
40
+ | --------------- | ---------------- |
41
+ | slick-slider | slider-wrapper |
42
+ | slick-list | slider-viewport |
43
+ | slick-track | slider-container |
44
+ | slick-slide | slider-slide |
45
+ | slick-arrow | slider-button |
46
+ | slick-prev | slider-button-prev |
47
+ | slick-next | slider-slide-next |
48
+ | slick-next | slider-slide-next |
49
+ | slick-dots | slider-dots |
50
+ | slick-dot | slider-dot |
51
+
52
+ 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)
53
+
54
+ ### Bugfix
55
+
56
+ - Fix showing up uploaded logo from site controlpanel. @iFlameing [#291](https://github.com/kitconcept/volto-light-theme/pull/291)
57
+ - Un-pin `eslint-plugin-jsx-a11y` version @sneridagh [#299](https://github.com/kitconcept/volto-light-theme/pull/299)
58
+ - Fix Blocks chooser styling @iRohitSingh [#307](https://github.com/kitconcept/volto-light-theme/pull/307)
59
+ - Remove id selector from listings because of css specificity @steffenri [#309](https://github.com/kitconcept/volto-light-theme/pull/309)
60
+ - Fix margins of h1 in sitemap view @steffenri [#312](https://github.com/kitconcept/volto-light-theme/pull/312)
61
+ - Fix homepage link for all language codes (#298) @steffenri [#313](https://github.com/kitconcept/volto-light-theme/pull/313)
62
+
63
+ ### Internal
64
+
65
+ - Upgrade slider to 6.1.0 @sneridagh [#316](https://github.com/kitconcept/volto-light-theme/pull/316)
66
+
11
67
  ## 2.1.0 (2023-12-13)
12
68
 
13
69
  ### Feature
package/Makefile CHANGED
@@ -22,17 +22,19 @@ RESET=`tput sgr0`
22
22
  YELLOW=`tput setaf 3`
23
23
 
24
24
  PLONE_VERSION=6.0.8
25
- VOLTO_VERSION=17.5.0
25
+ VOLTO_VERSION=17.7.0
26
26
 
27
27
  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
@@ -118,14 +118,15 @@ It is recommended that your project or policy add-on `package.json` include the
118
118
 
119
119
  ```json
120
120
  "dependencies": {
121
- "@eeacms/volto-accordion-block": "9.0.0",
122
- "@kitconcept/volto-button-block": "2.1.0",
123
- "@kitconcept/volto-dsgvo-banner": "1.3.0",
124
- "@kitconcept/volto-heading-block": "2.2.0",
125
- "@kitconcept/volto-introduction-block": "1.0.0",
126
- "@kitconcept/volto-light-theme": "1.0.0",
127
- "@kitconcept/volto-separator-block": "4.0.0",
128
- "@kitconcept/volto-highlight-block": "3.0.0",
121
+ "@eeacms/volto-accordion-block": "^10.4.0",
122
+ "@kitconcept/volto-button-block": "^2.3.1",
123
+ "@kitconcept/volto-dsgvo-banner": "^1.3.0",
124
+ "@kitconcept/volto-heading-block": "^2.4.0",
125
+ "@kitconcept/volto-highlight-block": "^3.0.0",
126
+ "@kitconcept/volto-introduction-block": "^1.0.0",
127
+ "@kitconcept/volto-separator-block": "^4.0.0",
128
+ "@kitconcept/volto-slider-block": "^6.0.0",
129
+ "@kitconcept/volto-light-theme": "^2.0.0",
129
130
  }
130
131
  ```
131
132
 
@@ -155,7 +156,7 @@ Then, declare the theme in your project `package.json`:
155
156
  "theme": "@kitconcept/volto-light-theme",
156
157
  ```
157
158
 
158
- Alternativelly, you can also declare it in your project's `volto.config.js`:
159
+ Alternatively, you can also declare it in your project's `volto.config.js`:
159
160
 
160
161
  ```js
161
162
  const addons = [];
@@ -169,9 +170,9 @@ module.exports = {
169
170
 
170
171
  You can specify your project add-ons in `volto.config.js`, but sometimes is better to have them all in one place (in your policy add-on) for portability.
171
172
 
172
- ## Feature flags
173
+ ## Feature Flags
173
174
 
174
- ### Enable fat menu
175
+ ### Enable Fat Menu
175
176
 
176
177
  Since 2.0.0, the light theme has a fat menu (below the main site sections) triggered clickin on one of them.
177
178
  It's behind a feature flag, as opt-out:
@@ -220,7 +221,7 @@ Run `make help` to list the available commands.
220
221
  - Docker
221
222
  - Node 18 (e.g. via nvm)
222
223
 
223
- ### Development environment Setup
224
+ ### Development Environment Setup
224
225
 
225
226
  Run once
226
227
 
@@ -231,7 +232,7 @@ make dev
231
232
  which will build and launch the backend and frontend containers.
232
233
  There's no need to build them again after doing it the first time unless something has changed from the container setup.
233
234
 
234
- In order to make the local IDE play well with this setup, is it required to run once `yarn` to install locally the required packages (ESlint, Prettier, Stylelint).
235
+ To make the local IDE play well with this setup, it is required to run `yarn` once to install the required packages (ESlint, Prettier, Stylelint).
235
236
 
236
237
  Run
237
238
 
@@ -260,7 +261,7 @@ This will start both the frontend and backend containers.
260
261
 
261
262
  ### Stop Backend (Docker)
262
263
 
263
- After developing, in order to stop the running backend, don't forget to run:
264
+ After developing, to stop the running backend, don't forget to run:
264
265
 
265
266
  Run
266
267
 
@@ -324,7 +325,7 @@ Run
324
325
  make test-acceptance
325
326
  ```
326
327
 
327
- To run Cypress tests afterwards.
328
+ To run Cypress tests afterward.
328
329
 
329
330
  When finished, don't forget to shutdown the backend server.
330
331
 
@@ -332,6 +333,38 @@ When finished, don't forget to shutdown the backend server.
332
333
  make stop-test-acceptance-server
333
334
  ```
334
335
 
336
+ ### Accessibility Acceptance tests
337
+
338
+ Run once
339
+
340
+ ```shell
341
+ make install-acceptance
342
+ ```
343
+
344
+ For starting the servers
345
+
346
+ Run
347
+
348
+ ```shell
349
+ make start-test-acceptance-server-a11y
350
+ ```
351
+
352
+ The frontend is run in dev mode, so development while writing tests is possible.
353
+
354
+ Run
355
+
356
+ ```shell
357
+ make test-acceptance-a11y
358
+ ```
359
+
360
+ To run Cypress tests afterwards.
361
+
362
+ When finished, don't forget to shutdown the backend server.
363
+
364
+ ```shell
365
+ make stop-test-acceptance-server-a11y
366
+ ```
367
+
335
368
  ### Release
336
369
 
337
370
  Run
@@ -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
- setup();
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
- teardown();
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
+ });