@kitconcept/volto-light-theme 3.0.0-alpha.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.
- package/.github/workflows/acceptance.yml +46 -1
- package/CHANGELOG.md +16 -0
- package/Makefile +15 -1
- package/README.md +32 -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/customizations/volto/components/theme/LanguageSelector/LanguageSelector.js +11 -0
- package/src/theme/_footer.scss +8 -1
- package/src/theme/_layout.scss +1 -1
- /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,22 @@
|
|
|
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
|
+
|
|
11
27
|
## 3.0.0-alpha.0 (2023-12-27)
|
|
12
28
|
|
|
13
29
|
### 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
|
@@ -333,6 +333,38 @@ When finished, don't forget to shutdown the backend server.
|
|
|
333
333
|
make stop-test-acceptance-server
|
|
334
334
|
```
|
|
335
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
|
+
|
|
336
368
|
### Release
|
|
337
369
|
|
|
338
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
|
-
|
|
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
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
// Listing-block
|
|
11
|
+
it('Listing-block (/block/listing-block)', () => {
|
|
12
|
+
cy.navigate('/block/listing-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
// Disabling 'image-alt'
|
|
17
|
+
// semantic-ui-react's Embed doesn't include an alt tag for the placeholder image
|
|
18
|
+
rules: [
|
|
19
|
+
{
|
|
20
|
+
id: 'image-alt',
|
|
21
|
+
enabled: false,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 'nested-interactive',
|
|
25
|
+
enabled: false,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
cy.checkAccessibility();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
// Maps block
|
|
11
|
+
it('Maps Block (/block/maps-block)', () => {
|
|
12
|
+
cy.navigate('/block/maps-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
rules: [
|
|
17
|
+
// there are two copies of slate h3,
|
|
18
|
+
// which have with the same id
|
|
19
|
+
{
|
|
20
|
+
id: 'duplicate-id-active',
|
|
21
|
+
enabled: false,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
cy.checkAccessibility();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
//news-item
|
|
11
|
+
it('news-item (/content-types/news-item)', () => {
|
|
12
|
+
cy.navigate('/content-types/news-item');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
rules: [
|
|
17
|
+
// there are two copies of slate h3,
|
|
18
|
+
// which have with the same id
|
|
19
|
+
{
|
|
20
|
+
id: 'duplicate-id-active',
|
|
21
|
+
enabled: false,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
cy.checkAccessibility();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
//Page
|
|
11
|
+
it('Page (/content-types/page)', () => {
|
|
12
|
+
cy.navigate('/content-types/page');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
rules: [
|
|
17
|
+
// there are two copies of slate h3,
|
|
18
|
+
// which have with the same id
|
|
19
|
+
{
|
|
20
|
+
id: 'duplicate-id-active',
|
|
21
|
+
enabled: false,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
cy.checkAccessibility();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -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
|
+
// Search-block
|
|
11
|
+
it('Search-block (/block/search-block)', () => {
|
|
12
|
+
cy.navigate('/block/search-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
// separator-block
|
|
11
|
+
it('Separator-block (/block/separator-block)', () => {
|
|
12
|
+
cy.navigate('/block/separator-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
rules: [
|
|
17
|
+
// there are copies of slate h3,
|
|
18
|
+
// which have with the same id
|
|
19
|
+
{
|
|
20
|
+
id: 'duplicate-id-active',
|
|
21
|
+
enabled: false,
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
],
|
|
25
|
+
});
|
|
26
|
+
cy.checkAccessibility();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
// Table-block
|
|
11
|
+
it('Table-block (/block/table-block)', () => {
|
|
12
|
+
cy.navigate('/block/table-block');
|
|
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
|
+
});
|
|
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
|
+
// Teaser-block
|
|
11
|
+
it('Teaser-block (/block/teaser-block)', () => {
|
|
12
|
+
cy.navigate('/block/teaser-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
|
+
// Text-block
|
|
11
|
+
it('Text-block (/block/text-block)', () => {
|
|
12
|
+
cy.navigate('/block/text-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
|
+
// Table of Contents
|
|
11
|
+
it('Table of Contents (/block/toc-block)', () => {
|
|
12
|
+
cy.navigate('/block/toc-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe();
|
|
16
|
+
cy.checkAccessibility();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
// Video Block
|
|
11
|
+
it('Video Block (/block/video-block)', () => {
|
|
12
|
+
cy.navigate('/block/video-block');
|
|
13
|
+
cy.wait(2000);
|
|
14
|
+
cy.injectAxe();
|
|
15
|
+
cy.configureAxe({
|
|
16
|
+
// Disabling 'image-alt'
|
|
17
|
+
// semantic-ui-react's Embed doesn't include an alt tag for the placeholder image
|
|
18
|
+
rules: [
|
|
19
|
+
{
|
|
20
|
+
id: 'image-alt',
|
|
21
|
+
enabled: false,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
cy.checkAccessibility();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -4,6 +4,14 @@ module.exports = defineConfig({
|
|
|
4
4
|
viewportWidth: 1280,
|
|
5
5
|
e2e: {
|
|
6
6
|
baseUrl: 'http://localhost:3000',
|
|
7
|
-
specPattern: 'cypress/tests
|
|
7
|
+
specPattern: 'cypress/tests/**/*.cy.{js,jsx,ts,tsx}',
|
|
8
|
+
setupNodeEvents(on, config) {
|
|
9
|
+
on('task', {
|
|
10
|
+
table(message) {
|
|
11
|
+
console.table(message);
|
|
12
|
+
return null;
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
},
|
|
8
16
|
},
|
|
9
17
|
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
version: "3"
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
|
|
5
|
+
addon-dev:
|
|
6
|
+
build:
|
|
7
|
+
context: ../
|
|
8
|
+
dockerfile: ./dockerfiles/Dockerfile.acceptance
|
|
9
|
+
args:
|
|
10
|
+
ADDON_NAME: "${ADDON_NAME}"
|
|
11
|
+
ADDON_PATH: "${ADDON_PATH}"
|
|
12
|
+
VOLTO_VERSION: ${VOLTO_VERSION:-17}
|
|
13
|
+
volumes:
|
|
14
|
+
- ${CURRENT_DIR}:/app/src/addons/${ADDON_PATH}/
|
|
15
|
+
environment:
|
|
16
|
+
RAZZLE_INTERNAL_API_PATH: http://backend-acceptance-a11y:8080/Plone
|
|
17
|
+
RAZZLE_API_PATH: http://localhost:8080/Plone
|
|
18
|
+
HOST: 0.0.0.0
|
|
19
|
+
ports:
|
|
20
|
+
- 3000:3000
|
|
21
|
+
- 3001:3001
|
|
22
|
+
tty: true
|
|
23
|
+
depends_on:
|
|
24
|
+
- backend-acceptance-a11y
|
|
25
|
+
profiles:
|
|
26
|
+
- dev
|
|
27
|
+
|
|
28
|
+
addon-acceptance:
|
|
29
|
+
build:
|
|
30
|
+
context: ../
|
|
31
|
+
dockerfile: ./dockerfiles/Dockerfile
|
|
32
|
+
args:
|
|
33
|
+
ADDON_NAME: "${ADDON_NAME}"
|
|
34
|
+
ADDON_PATH: "${ADDON_PATH}"
|
|
35
|
+
VOLTO_VERSION: ${VOLTO_VERSION:-17}
|
|
36
|
+
environment:
|
|
37
|
+
RAZZLE_INTERNAL_API_PATH: http://backend-acceptance-a11y:8080/Plone
|
|
38
|
+
RAZZLE_API_PATH: http://localhost:8080/Plone
|
|
39
|
+
HOST: 0.0.0.0
|
|
40
|
+
ports:
|
|
41
|
+
- 3000:3000
|
|
42
|
+
depends_on:
|
|
43
|
+
- backend-acceptance-a11y
|
|
44
|
+
profiles:
|
|
45
|
+
- prod
|
|
46
|
+
|
|
47
|
+
backend-acceptance-a11y:
|
|
48
|
+
image: ghcr.io/kitconcept/voltolighttheme:latest
|
|
49
|
+
environment:
|
|
50
|
+
CORS_: true
|
|
51
|
+
ports:
|
|
52
|
+
- 8080:8080
|
|
53
|
+
profiles:
|
|
54
|
+
- dev
|
|
55
|
+
- prod
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitconcept/volto-light-theme",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
4
|
"description": "Volto Light Theme by kitconcept",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"@kitconcept/volto-introduction-block": "^1.0.0",
|
|
73
73
|
"@kitconcept/volto-separator-block": "^4.0.0",
|
|
74
74
|
"@kitconcept/volto-slider-block": "^6.1.0",
|
|
75
|
-
"@plone/volto": "^17.
|
|
75
|
+
"@plone/volto": "^17.8.0"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -20,7 +20,7 @@ import config from '@plone/volto/registry';
|
|
|
20
20
|
* @class View
|
|
21
21
|
* @extends Component
|
|
22
22
|
*/
|
|
23
|
-
export const ImageView = ({ className, data, detached, properties }) => {
|
|
23
|
+
export const ImageView = ({ className, data, detached, properties, style }) => {
|
|
24
24
|
let href;
|
|
25
25
|
if (data.href?.length > 0) {
|
|
26
26
|
if (typeof data.href === 'object') {
|
|
@@ -44,6 +44,7 @@ export const ImageView = ({ className, data, detached, properties }) => {
|
|
|
44
44
|
data.align,
|
|
45
45
|
className,
|
|
46
46
|
)}
|
|
47
|
+
style={style}
|
|
47
48
|
>
|
|
48
49
|
{data.url && (
|
|
49
50
|
<>
|
|
@@ -22,6 +22,7 @@ const renderLeftNav = (onClick, disabled) => {
|
|
|
22
22
|
className="image-gallery-icon image-gallery-left-nav primary basic"
|
|
23
23
|
disabled={disabled}
|
|
24
24
|
onClick={onClick}
|
|
25
|
+
aria-label="Go to previous slide"
|
|
25
26
|
>
|
|
26
27
|
<Icon name={galleryLeftSVG} size="48px" fill="black" />
|
|
27
28
|
</Button>
|
|
@@ -33,6 +34,7 @@ const renderRightNav = (onClick, disabled) => {
|
|
|
33
34
|
className="image-gallery-icon image-gallery-right-nav primary basic"
|
|
34
35
|
disabled={disabled}
|
|
35
36
|
onClick={onClick}
|
|
37
|
+
aria-label="Go to next slide"
|
|
36
38
|
>
|
|
37
39
|
<Icon name={galleryRightSVG} size="48px" />
|
|
38
40
|
</Button>
|
|
@@ -7,7 +7,14 @@ import { renderLinkElement } from '@plone/volto-slate/editor/render';
|
|
|
7
7
|
import config from '@plone/volto/registry';
|
|
8
8
|
import withQuerystringResults from '@plone/volto/components/manage/Blocks/Listing/withQuerystringResults';
|
|
9
9
|
|
|
10
|
-
const Headline = ({
|
|
10
|
+
const Headline = ({
|
|
11
|
+
headlineTag,
|
|
12
|
+
id,
|
|
13
|
+
data = {},
|
|
14
|
+
listingItems,
|
|
15
|
+
isEditMode,
|
|
16
|
+
style,
|
|
17
|
+
}) => {
|
|
11
18
|
let attr = { id };
|
|
12
19
|
const slug = Slugger.slug(data.headline);
|
|
13
20
|
attr.id = slug || id;
|
|
@@ -23,6 +30,7 @@ const Headline = ({ headlineTag, id, data = {}, listingItems, isEditMode }) => {
|
|
|
23
30
|
className={cx('headline', {
|
|
24
31
|
emptyListing: !listingItems?.length > 0,
|
|
25
32
|
})}
|
|
33
|
+
style={style}
|
|
26
34
|
/>
|
|
27
35
|
);
|
|
28
36
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import { useSelector } from 'react-redux';
|
|
5
|
+
import cx from 'classnames';
|
|
6
|
+
import { find, map } from 'lodash';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Helmet,
|
|
10
|
+
langmap,
|
|
11
|
+
flattenToAppURL,
|
|
12
|
+
toReactIntlLang,
|
|
13
|
+
} from '@plone/volto/helpers';
|
|
14
|
+
|
|
15
|
+
import config from '@plone/volto/registry';
|
|
16
|
+
|
|
17
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
18
|
+
|
|
19
|
+
const messages = defineMessages({
|
|
20
|
+
switchLanguageTo: {
|
|
21
|
+
id: 'Switch to',
|
|
22
|
+
defaultMessage: 'Switch to',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const LanguageSelector = (props) => {
|
|
27
|
+
const intl = useIntl();
|
|
28
|
+
const currentLang = useSelector((state) => state.intl.locale);
|
|
29
|
+
const translations = useSelector(
|
|
30
|
+
(state) => state.content.data?.['@components']?.translations?.items,
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const { settings } = config;
|
|
34
|
+
|
|
35
|
+
return settings.isMultilingual ? (
|
|
36
|
+
<div className="language-selector">
|
|
37
|
+
{map(settings.supportedLanguages, (lang) => {
|
|
38
|
+
const translation = find(translations, { language: lang });
|
|
39
|
+
return (
|
|
40
|
+
<Link
|
|
41
|
+
aria-label={`${intl.formatMessage(
|
|
42
|
+
messages.switchLanguageTo,
|
|
43
|
+
)} ${langmap[lang].nativeName.toLowerCase()}`}
|
|
44
|
+
className={cx({ selected: toReactIntlLang(lang) === currentLang })}
|
|
45
|
+
to={translation ? flattenToAppURL(translation['@id']) : `/${lang}`}
|
|
46
|
+
title={langmap[lang].nativeName}
|
|
47
|
+
onClick={() => {
|
|
48
|
+
props.onClickAction();
|
|
49
|
+
}}
|
|
50
|
+
key={`language-selector-${lang}`}
|
|
51
|
+
>
|
|
52
|
+
{langmap[lang].nativeName.slice(0, 2)}
|
|
53
|
+
</Link>
|
|
54
|
+
);
|
|
55
|
+
})}
|
|
56
|
+
</div>
|
|
57
|
+
) : (
|
|
58
|
+
<Helmet>
|
|
59
|
+
<html lang={toReactIntlLang(settings.defaultLanguage)} />
|
|
60
|
+
</Helmet>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
LanguageSelector.propTypes = {
|
|
65
|
+
onClickAction: PropTypes.func,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
LanguageSelector.defaultProps = {
|
|
69
|
+
onClickAction: () => {},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default LanguageSelector;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OVERRIDE LanguageSelector.js
|
|
3
|
+
* REASON: This theme uses a custom pre-@plone/components component
|
|
4
|
+
* SemanticUI-free located at the components folder.
|
|
5
|
+
* To override it, override the @kitconcept/volto-light-theme one instead of
|
|
6
|
+
* this one.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import LanguageSelector from '../../../../../components/LanguageSelector/LanguageSelector';
|
|
10
|
+
|
|
11
|
+
export default LanguageSelector;
|
package/src/theme/_footer.scss
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
background-color: $lightgrey;
|
|
8
8
|
font-size: 18px;
|
|
9
9
|
|
|
10
|
-
a.powered-by
|
|
10
|
+
a.powered-by {
|
|
11
|
+
color: $blue-for-grey-contrast;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
}
|
|
11
14
|
.footer-branding {
|
|
12
15
|
font-size: 14px;
|
|
13
16
|
}
|
|
@@ -15,6 +18,7 @@
|
|
|
15
18
|
.footer-message {
|
|
16
19
|
font-weight: $bold;
|
|
17
20
|
a {
|
|
21
|
+
color: $blue-for-grey-contrast;
|
|
18
22
|
font-weight: inherit;
|
|
19
23
|
text-decoration: underline;
|
|
20
24
|
}
|
|
@@ -35,6 +39,9 @@
|
|
|
35
39
|
&:last-of-type {
|
|
36
40
|
border: none;
|
|
37
41
|
}
|
|
42
|
+
a {
|
|
43
|
+
color: $blue-for-grey-contrast;
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
47
|
|
package/src/theme/_layout.scss
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|