@kitconcept/volto-light-theme 3.1.2 → 3.2.0

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 (118) hide show
  1. package/.changelog.draft +11 -0
  2. package/CHANGELOG.md +3 -567
  3. package/build/messages/src/components/Anontools/Anontools.json +10 -0
  4. package/build/messages/src/components/Blocks/Button/schema.json +6 -0
  5. package/build/messages/src/components/Blocks/EventMetadata/View.json +30 -0
  6. package/build/messages/src/components/Blocks/Image/Edit.json +10 -0
  7. package/build/messages/src/components/Blocks/Image/ImageSidebar.json +18 -0
  8. package/build/messages/src/components/Blocks/Image/schema.json +10 -0
  9. package/build/messages/src/components/Blocks/Listing/ListingBody.json +26 -0
  10. package/build/messages/src/components/Blocks/Search/TopSideFacets.json +10 -0
  11. package/build/messages/src/components/Blocks/Search/components/SearchDetails.json +10 -0
  12. package/build/messages/src/components/Blocks/Search/components/SearchInput.json +6 -0
  13. package/build/messages/src/components/Blocks/Slider/DefaultBody.json +18 -0
  14. package/build/messages/src/components/Blocks/Slider/schema.json +14 -0
  15. package/build/messages/src/components/Blocks/schema.json +6 -0
  16. package/build/messages/src/components/Breadcrumbs/Breadcrumbs.json +10 -0
  17. package/build/messages/src/components/Footer/Footer.json +30 -0
  18. package/build/messages/src/components/Header/Header.json +6 -0
  19. package/build/messages/src/components/LanguageSelector/LanguageSelector.json +6 -0
  20. package/build/messages/src/components/Logo/Logo.json +10 -0
  21. package/build/messages/src/components/MobileNavigation/MobileNavigation.json +26 -0
  22. package/build/messages/src/components/Navigation/Navigation.json +10 -0
  23. package/build/messages/src/components/SearchWidget/IntranetSearchWidget.json +14 -0
  24. package/build/messages/src/components/SearchWidget/SearchWidget.json +10 -0
  25. package/build/messages/src/components/Theme/EventView.json +6 -0
  26. package/build/messages/src/components/Widgets/AlignWidget.json +22 -0
  27. package/build/messages/src/index.json +10 -0
  28. package/locales/de/LC_MESSAGES/volto.po +7 -7
  29. package/locales/en/LC_MESSAGES/volto.po +7 -7
  30. package/locales/es/LC_MESSAGES/volto.po +10 -9
  31. package/locales/eu/LC_MESSAGES/volto.po +10 -9
  32. package/locales/pt_BR/volto.po +7 -7
  33. package/locales/volto.pot +8 -8
  34. package/package.json +8 -26
  35. package/src/components/Blocks/Image/Edit.jsx +14 -14
  36. package/src/components/Blocks/Image/ImageSidebar.jsx +3 -3
  37. package/src/components/Blocks/Image/View.jsx +17 -17
  38. package/src/components/Footer/Footer.jsx +2 -2
  39. package/src/components/Header/Header.jsx +12 -12
  40. package/src/theme/_header.scss +1 -1
  41. package/.dockerignore +0 -1
  42. package/.editorconfig +0 -34
  43. package/.eslintignore +0 -6
  44. package/.eslintrc +0 -53
  45. package/.github/workflows/acceptance.yml +0 -98
  46. package/.github/workflows/changelog.yml +0 -43
  47. package/.github/workflows/code.yml +0 -16
  48. package/.github/workflows/deploy.yml +0 -105
  49. package/.github/workflows/unit.yml +0 -16
  50. package/.prettierignore +0 -3
  51. package/.prettierrc +0 -12
  52. package/.stylelintrc +0 -32
  53. package/.yarn/releases/yarn-3.2.3.cjs +0 -783
  54. package/.yarnrc.yml +0 -3
  55. package/Makefile +0 -174
  56. package/README.md +0 -453
  57. package/UPGRADE-GUIDE.md +0 -38
  58. package/acceptance/.gitkeep +0 -0
  59. package/acceptance/ci-a11y.yml +0 -31
  60. package/acceptance/ci.yml +0 -29
  61. package/acceptance/cypress/.gitkeep +0 -0
  62. package/acceptance/cypress/fixtures/broccoli.jpg +0 -0
  63. package/acceptance/cypress/fixtures/example.json +0 -5
  64. package/acceptance/cypress/fixtures/file.pdf +0 -0
  65. package/acceptance/cypress/fixtures/halfdome2022.jpg +0 -0
  66. package/acceptance/cypress/fixtures/image.png +0 -0
  67. package/acceptance/cypress/plugins/index.js +0 -17
  68. package/acceptance/cypress/support/commands.js +0 -23
  69. package/acceptance/cypress/support/e2e.js +0 -23
  70. package/acceptance/cypress/support/reset-fixture.js +0 -45
  71. package/acceptance/cypress/support/slate.js +0 -14
  72. package/acceptance/cypress/tests/.gitkeep +0 -0
  73. package/acceptance/cypress/tests/a11y/accordionBlock.cy.js +0 -30
  74. package/acceptance/cypress/tests/a11y/basic.cy.js +0 -26
  75. package/acceptance/cypress/tests/a11y/buttonBlock.cy.js +0 -18
  76. package/acceptance/cypress/tests/a11y/eventContenttype.cy.js +0 -18
  77. package/acceptance/cypress/tests/a11y/fileContenttype.cy.js +0 -18
  78. package/acceptance/cypress/tests/a11y/gridBlock.cy.js +0 -18
  79. package/acceptance/cypress/tests/a11y/gridImageBlock.cy.js +0 -18
  80. package/acceptance/cypress/tests/a11y/gridListingBlock.cy.js +0 -18
  81. package/acceptance/cypress/tests/a11y/gridTeaserBlock.cy.js +0 -18
  82. package/acceptance/cypress/tests/a11y/gridTextBlock.cy.js +0 -33
  83. package/acceptance/cypress/tests/a11y/headingBlock.cy.js +0 -18
  84. package/acceptance/cypress/tests/a11y/highlightBlock.cy.js +0 -18
  85. package/acceptance/cypress/tests/a11y/imageBlock.cy.js +0 -18
  86. package/acceptance/cypress/tests/a11y/imageContenttype.cy.js +0 -18
  87. package/acceptance/cypress/tests/a11y/introductionBlock.cy.js +0 -18
  88. package/acceptance/cypress/tests/a11y/linkContenttype.cy.js +0 -18
  89. package/acceptance/cypress/tests/a11y/listingBlock.cy.js +0 -31
  90. package/acceptance/cypress/tests/a11y/mapsBlock.cy.js +0 -27
  91. package/acceptance/cypress/tests/a11y/newsItemContenttype.cy.js +0 -27
  92. package/acceptance/cypress/tests/a11y/pageContent.cy.js +0 -27
  93. package/acceptance/cypress/tests/a11y/searchBlock.cy.js +0 -18
  94. package/acceptance/cypress/tests/a11y/separatorBlock.cy.js +0 -28
  95. package/acceptance/cypress/tests/a11y/tableBlock.cy.js +0 -26
  96. package/acceptance/cypress/tests/a11y/teaserBlock.cy.js +0 -18
  97. package/acceptance/cypress/tests/a11y/textBlock.cy.js +0 -18
  98. package/acceptance/cypress/tests/a11y/tocBlock.cy.js +0 -18
  99. package/acceptance/cypress/tests/a11y/videoBlock.cy.js +0 -27
  100. package/acceptance/cypress/tests/main/basic.cy.js +0 -71
  101. package/acceptance/cypress/tests/main/blocks-map.cy.js +0 -56
  102. package/acceptance/cypress/tests/main/blocks-table.cy.js +0 -127
  103. package/acceptance/cypress/tests/main/listing-grid.cy.js +0 -77
  104. package/acceptance/cypress/tests/main/nav.cy.js +0 -54
  105. package/acceptance/cypress/tests/main/site-action.cy.js +0 -16
  106. package/acceptance/cypress.config.js +0 -17
  107. package/acceptance/docker-compose-a11y.yml +0 -55
  108. package/acceptance/docker-compose.yml +0 -53
  109. package/acceptance/package.json +0 -5
  110. package/acceptance/yarn.lock +0 -2638
  111. package/devops/stacks/light-theme.kitconcept.io.yml +0 -66
  112. package/dockerfiles/Dockerfile +0 -32
  113. package/dockerfiles/Dockerfile.acceptance +0 -19
  114. package/dockerfiles/Dockerfile.dev +0 -24
  115. package/dockerfiles/docker-compose.yml +0 -56
  116. package/dockerfiles/helper.py +0 -132
  117. package/volto-light-theme.png +0 -0
  118. package/volto.config.js +0 -7
@@ -1,27 +0,0 @@
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
- });
@@ -1,18 +0,0 @@
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
- });
@@ -1,28 +0,0 @@
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
- });
@@ -1,26 +0,0 @@
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
- });
@@ -1,18 +0,0 @@
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
- });
@@ -1,18 +0,0 @@
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
- });
@@ -1,18 +0,0 @@
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
- });
@@ -1,27 +0,0 @@
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
- });
@@ -1,71 +0,0 @@
1
- import {
2
- getSlateEditorAndType,
3
- getSelectedSlateEditor,
4
- } from '../../support/slate';
5
-
6
- context('Basic Acceptance Tests', () => {
7
- describe('Text Block Tests', () => {
8
- beforeEach(() => {
9
- cy.intercept('GET', `/**/*?expand*`).as('content');
10
- cy.intercept('GET', '/**/Document').as('schema');
11
-
12
- // given a logged in editor and a page in edit mode
13
- cy.autologin();
14
- cy.createContent({
15
- contentType: 'Document',
16
- contentId: 'document',
17
- contentTitle: 'Document',
18
- });
19
- cy.visit('/');
20
- cy.wait('@content');
21
- });
22
-
23
- it('As editor I can add a page with a text block', function () {
24
- // when I add a page with a text block
25
- cy.get('#toolbar-add').click();
26
- cy.get('#toolbar-add-document').click({ force: true });
27
- cy.get('.documentFirstHeading')
28
- .type('My Page')
29
- .get('.documentFirstHeading')
30
- .contains('My Page');
31
-
32
- getSlateEditorAndType(
33
- '.block .slate-editor [contenteditable=true]',
34
- 'This is the text',
35
- );
36
-
37
- getSelectedSlateEditor().contains('This is the text');
38
- cy.get('#toolbar-save').click();
39
- cy.wait('@content');
40
- cy.url().should('eq', Cypress.config().baseUrl + '/my-page');
41
- });
42
-
43
- it('As editor I can add a link to a text block', function () {
44
- cy.navigate('/document/edit');
45
- cy.wait('@schema');
46
-
47
- cy.get('.block.inner.title .documentFirstHeading');
48
-
49
- cy.log('when I create a link');
50
-
51
- cy.getSlateEditorAndType(
52
- 'Colorless green ideas sleep furiously.',
53
- ).setSlateSelection('furiously');
54
- cy.clickSlateButton('Add link');
55
- cy.get('.slate-toolbar .link-form-container input').type(
56
- 'https://google.com{enter}',
57
- );
58
-
59
- cy.get('#toolbar-save', { timeout: 10000 }).click();
60
- cy.wait('@content');
61
-
62
- cy.log('then the page view should contain a link');
63
-
64
- cy.get('.container p').contains('Colorless green ideas sleep furiously.');
65
- cy.get('.container p a')
66
- .should('have.text', 'furiously')
67
- .and('have.attr', 'href')
68
- .and('include', 'https://google.com');
69
- });
70
- });
71
- });
@@ -1,56 +0,0 @@
1
- describe('Map Block Tests', () => {
2
- beforeEach(() => {
3
- cy.intercept('GET', `/**/*?expand*`).as('content');
4
- cy.intercept('GET', '/**/Document').as('schema');
5
- // given a logged in editor and a page in edit mode
6
- cy.autologin();
7
- cy.createContent({
8
- contentType: 'Document',
9
- contentId: 'my-page',
10
- contentTitle: 'My Page',
11
- });
12
- cy.visit('/my-page');
13
- cy.wait('@content');
14
- cy.navigate('/my-page/edit');
15
- cy.wait('@content');
16
- });
17
-
18
- it('Add maps block - Google Maps', () => {
19
- // when I add a maps block
20
- cy.addNewBlock('maps');
21
-
22
- cy.get(`.block.maps .toolbar-inner .ui.input input`)
23
- .type(
24
- '<iframe src="https://www.google.com/maps/embed?pb=" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>',
25
- )
26
- .type('{enter}');
27
- cy.get('#toolbar-save').click();
28
- cy.wait('@content');
29
- cy.url().should('eq', Cypress.config().baseUrl + '/my-page');
30
-
31
- // then the page view should contain the maps block
32
- cy.get('#page-document iframe')
33
- .should('have.attr', 'src')
34
- .and('match', /\/\/www.google.com\/maps\/embed\?pb=/);
35
- });
36
-
37
- it('Add maps block - OpenStreet Maps', () => {
38
- // when I add a maps block
39
- cy.addNewBlock('maps');
40
-
41
- cy.get(`.block.maps .toolbar-inner .ui.input input`)
42
- .type(
43
- '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=2.0408821105957036%2C41.2938013640244%2C2.2400093078613286%2C41.49109217223111&amp;layer=mapnik" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/#map=13/41.3925/2.1404">View Larger Map</a></small>',
44
- )
45
- .type('{enter}');
46
- cy.get('#toolbar-save').click();
47
- cy.wait('@content');
48
- cy.url().should('eq', Cypress.config().baseUrl + '/my-page');
49
-
50
- // cy.pause();
51
- // then the page view should contain the maps block
52
- cy.get('#page-document iframe')
53
- .should('have.attr', 'src')
54
- .and('match', /\/\/www.openstreetmap.org\/export\/embed/);
55
- });
56
- });
@@ -1,127 +0,0 @@
1
- describe('Table Block Tests', () => {
2
- beforeEach(() => {
3
- cy.intercept('GET', `/**/*?expand*`).as('content');
4
- cy.intercept('GET', '/**/Document').as('schema');
5
-
6
- // given a logged in editor and a page in edit mode
7
- cy.autologin();
8
- cy.createContent({
9
- contentType: 'Document',
10
- contentId: 'my-page',
11
- contentTitle: 'My Page',
12
- });
13
- cy.visit('/my-page');
14
- cy.wait('@content');
15
-
16
- cy.navigate('/my-page/edit');
17
- cy.wait('@schema');
18
- });
19
-
20
- it('Add table block', () => {
21
- cy.intercept('PATCH', '*').as('save');
22
-
23
- // Edit
24
- cy.addNewBlock('table');
25
- cy.wait(2000);
26
- cy.get(
27
- '.celled.fixed.table thead tr th:first-child() [contenteditable="true"]',
28
- )
29
- .focus()
30
- .click()
31
- .type('column 1 / row 1');
32
- cy.get(
33
- '.celled.fixed.table thead tr th:nth-child(2) [contenteditable="true"]',
34
- )
35
- .focus()
36
- .click()
37
- .type('column 2 / row 1');
38
- cy.get(
39
- '.celled.fixed.table tbody tr:nth-child(1) td:first-child() [contenteditable="true"]',
40
- )
41
- .focus()
42
- .click()
43
- .type('column 1 / row 2');
44
- cy.get(
45
- '.celled.fixed.table tbody tr:nth-child(1) td:nth-child(2) [contenteditable="true"]',
46
- )
47
- .focus()
48
- .click()
49
- .type('column 2 / row 2');
50
- cy.get('button[title="Insert col after"]').click();
51
- cy.get('button[title="Insert row after"]').click();
52
- cy.get('button[title="Insert row before"]').click();
53
- cy.get('button[title="Insert col before"]').click();
54
-
55
- // Save
56
- cy.get('#toolbar-save').click();
57
- cy.wait('@save');
58
- cy.wait('@content');
59
-
60
- // View
61
- cy.get('.celled.fixed.table thead tr th:first-child()').contains(
62
- 'column 1 / row 1',
63
- );
64
- cy.get('.celled.fixed.table thead tr th:nth-child(3)').contains(
65
- 'column 2 / row 1',
66
- );
67
- cy.get(
68
- '.celled.fixed.table tbody tr:nth-child(2) td:first-child()',
69
- ).contains('column 1 / row 2');
70
- cy.get(
71
- '.celled.fixed.table tbody tr:nth-child(2) td:nth-child(3)',
72
- ).contains('column 2 / row 2');
73
-
74
- // Edit
75
- cy.visit('/my-page/edit');
76
- cy.wait('@schema');
77
-
78
- cy.get('#toolbar-save').should('be.visible');
79
- cy.get('.celled.fixed.table tr:first-child() th:nth-child(2)').should(
80
- 'be.visible',
81
- );
82
-
83
- cy.get('.celled.fixed.table tr:first-child() th:nth-child(2)').click({
84
- waitForAnimations: false,
85
- });
86
-
87
- // without the second click the test fails. so this makes the test green.
88
- cy.get(
89
- '.celled.fixed.table thead tr:first-child() th:nth-child(2)',
90
- ).click();
91
-
92
- cy.get('button[title="Delete col"]').click();
93
- cy.get(
94
- '.celled.fixed.table thead tr:first-child() th:nth-child(3)',
95
- ).click();
96
- cy.get('button[title="Delete col"]').click();
97
- cy.get(
98
- '.celled.fixed.table tbody tr:first-child() td:first-child()',
99
- ).click();
100
- cy.get('button[title="Delete row"]').click();
101
- cy.get(
102
- '.celled.fixed.table tbody tr:nth-child(2) td:first-child()',
103
- ).click();
104
- cy.get('button[title="Delete row"]').click();
105
-
106
- // Save
107
- cy.get('#toolbar-save').click();
108
- cy.wait('@save');
109
- cy.wait('@content');
110
-
111
- // View
112
- cy.get('.celled.fixed.table thead tr th:first-child()').should(
113
- 'contain',
114
- 'column 1 / row 1',
115
- );
116
- cy.get('.celled.fixed.table thead tr th:nth-child(2)> p ').should(
117
- 'have.text',
118
- 'column 2 / row 1',
119
- );
120
- cy.get(
121
- '.celled.fixed.table tbody tr:first-child() td:first-child()',
122
- ).contains('column 1 / row 2');
123
- cy.get(
124
- '.celled.fixed.table tbody tr:first-child() td:nth-child(2)',
125
- ).contains('column 2 / row 2');
126
- });
127
- });
@@ -1,77 +0,0 @@
1
- context('Listing Grid Acceptance Tests', () => {
2
- beforeEach(() => {
3
- cy.intercept('GET', `/**/*?expand*`).as('content');
4
- cy.intercept('GET', '/**/Document').as('schema');
5
-
6
- // given a logged in editor and a page in edit mode
7
- cy.autologin();
8
- cy.createContent({
9
- contentType: 'Document',
10
- contentId: 'document',
11
- contentTitle: 'Document',
12
- });
13
- cy.visit('/');
14
- cy.wait('@content');
15
- });
16
-
17
- it('As editor I can add a listing with Grid variation', () => {
18
- // Add page
19
- cy.createContent({
20
- contentType: 'Document',
21
- contentId: 'my-page',
22
- contentTitle: 'My Page',
23
- path: '/document',
24
- });
25
- cy.createContent({
26
- contentType: 'Document',
27
- contentId: 'my-page-1',
28
- contentTitle: 'My Page 1',
29
- path: '/document',
30
- });
31
- cy.createContent({
32
- contentType: 'Document',
33
- contentId: 'my-page-2',
34
- contentTitle: 'My Page 2',
35
- path: '/document',
36
- });
37
-
38
- cy.visit('/document/edit');
39
- cy.get('.block .slate-editor [contenteditable=true]').click();
40
- cy.get('.button .block-add-button').click({ force: true });
41
- cy.get('.blocks-chooser .mostUsed .button.listing').click({
42
- force: true,
43
- });
44
- cy.get('#field-variation').click();
45
- cy.get(' #field-variation').findByText('Grid').click();
46
-
47
- cy.get('.querystring-widget .fields').contains('Add criteria').click();
48
- cy.get(
49
- '.querystring-widget .fields:first-of-type .field:first-of-type .react-select__menu .react-select__option',
50
- )
51
- .contains('Type')
52
- .click();
53
-
54
- //insert Page
55
- cy.get('.querystring-widget .fields:first-of-type > .field').click();
56
- cy.get(
57
- '.querystring-widget .fields:first-of-type > .field .react-select__menu .react-select__option',
58
- )
59
- .contains('Page')
60
- .click();
61
-
62
- //verify before save
63
- cy.get(`.block.listing .listing-item:first-of-type`).contains('My Page');
64
-
65
- //save
66
- cy.get('#toolbar-save').click();
67
- cy.url().should('eq', Cypress.config().baseUrl + '/document');
68
-
69
- //test after save
70
- cy.get('#page-document .listing-item:first-of-type').contains('My Page');
71
- cy.get('#page-document .listing-item:first-of-type a').should(
72
- 'have.attr',
73
- 'href',
74
- '/document/my-page',
75
- );
76
- });
77
- });
@@ -1,54 +0,0 @@
1
- context('Navigation Acceptance Tests', () => {
2
- beforeEach(() => {
3
- cy.intercept('GET', `/**/*?expand*`).as('content');
4
- cy.intercept('GET', '/**/Document').as('schema');
5
-
6
- // given a logged in editor and a page in edit mode
7
- cy.autologin();
8
- cy.visit('/');
9
- cy.viewport('macbook-16');
10
-
11
- cy.createContent({
12
- contentType: 'Document',
13
- contentId: 'level-1',
14
- contentTitle: 'Level 1',
15
- path: '/',
16
- });
17
- cy.createContent({
18
- contentType: 'Document',
19
- contentId: 'level-2',
20
- contentTitle: 'Level 2',
21
- path: '/level-1',
22
- });
23
- cy.createContent({
24
- contentType: 'Document',
25
- contentId: 'level-3',
26
- contentTitle: 'Level 3',
27
- path: '/level-1/level-2',
28
- });
29
-
30
- cy.visit('/');
31
- cy.viewport('macbook-16');
32
- });
33
-
34
- it('includes 3rd level', function () {
35
- cy.wait('@content');
36
- cy.get('ul.desktop-menu button').contains('Level 1').click();
37
- cy.get('#navigation').contains('Level 2');
38
- cy.get('#navigation').contains('Level 3');
39
- });
40
-
41
- it('Open 2nd level', function () {
42
- cy.wait('@content');
43
- cy.get('ul.desktop-menu button').contains('Level 1').click();
44
- cy.get('.subitem-wrapper').findByText('Level 2').click();
45
- cy.get('.documentFirstHeading').should('have.text', 'Level 2');
46
- });
47
-
48
- it('Open 3rd level', function () {
49
- cy.wait('@content');
50
- cy.get('ul.desktop-menu button').contains('Level 1').click();
51
- cy.get('.subsubitem-wrapper').findByText('Level 3').click();
52
- cy.get('.documentFirstHeading').should('have.text', 'Level 3');
53
- });
54
- });
@@ -1,16 +0,0 @@
1
- context('Site Action Acceptance Tests', () => {
2
- beforeEach(() => {
3
- cy.intercept('GET', `/**/*?expand*`).as('content');
4
- cy.intercept('GET', '/**/Document').as('schema');
5
-
6
- cy.autologin();
7
- cy.visit('/');
8
- cy.viewport('macbook-16');
9
- cy.visit('/');
10
- });
11
-
12
- it('As a editor I should see Site action title in header', function () {
13
- cy.wait('@content');
14
- cy.get('.tools').findByText('Contact').should('exist');
15
- });
16
- });
@@ -1,17 +0,0 @@
1
- const { defineConfig } = require('cypress');
2
-
3
- module.exports = defineConfig({
4
- viewportWidth: 1280,
5
- e2e: {
6
- baseUrl: 'http://localhost:3000',
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
- },
16
- },
17
- });
@@ -1,55 +0,0 @@
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