@plone/volto 18.0.0-alpha.22 → 18.0.0-alpha.24

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/CHANGELOG.md CHANGED
@@ -17,6 +17,28 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 18.0.0-alpha.24 (2024-03-23)
21
+
22
+ ### Feature
23
+
24
+ - Add id attribute to discussions container and individual comments [@ericof] [#5904](https://github.com/plone/volto/issues/5904)
25
+
26
+ ### Internal
27
+
28
+ - Move `testing-library` Cypress commands import to inner commands, so it can be imported from the outside. @sneridagh [#5906](https://github.com/plone/volto/issues/5906)
29
+ - Add new cypress helper for slate `getSlateEditorAndType` @sneridagh [#5909](https://github.com/plone/volto/issues/5909)
30
+ - Upgrade @typescript-eslint @sneridagh [#5910](https://github.com/plone/volto/issues/5910)
31
+
32
+ ## 18.0.0-alpha.23 (2024-03-21)
33
+
34
+ ### Feature
35
+
36
+ - Improve the usage of `RAZZLE_JEST_CONFIG`. @sneridagh [#5901](https://github.com/plone/volto/issues/5901)
37
+
38
+ ### Documentation
39
+
40
+ - Updated testing and code quality with information on how to contribute to Volto core. @ichim-david [#5341](https://github.com/plone/volto/issues/5341)
41
+
20
42
  ## 18.0.0-alpha.22 (2024-03-19)
21
43
 
22
44
  ### Bugfix
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable no-console */
2
+ import '@testing-library/cypress/add-commands';
2
3
  import { getIfExists } from '../helpers';
3
4
  import { ploneAuth } from './constants';
4
5
 
@@ -21,8 +22,6 @@ const ploneAuthObj = {
21
22
  pass: ploneAuth[1],
22
23
  };
23
24
 
24
- export * from './volto-slate';
25
-
26
25
  // --- isInViewport ----------------------------------------------------------
27
26
  Cypress.Commands.add('isInViewport', (element) => {
28
27
  cy.get(element).then(($el) => {
@@ -0,0 +1 @@
1
+ export * from './volto-slate';
@@ -75,3 +75,7 @@ export const selectSlateNodeOfWord = (el) => {
75
75
  win.document.dispatchEvent(event);
76
76
  });
77
77
  };
78
+
79
+ export const getSlateEditorAndType = (selector, type) => {
80
+ return cy.get(selector).focus().click().wait(1000).type(type).wait(1000);
81
+ };
@@ -10,9 +10,15 @@ module.exports = {
10
10
  options: { razzleOptions, pluginOptions },
11
11
  paths,
12
12
  }) {
13
- // If the RAZZLE_JEST_CONFIG env var exists, use it as the file with the Jest config
14
- // overrides
13
+ // If the RAZZLE_JEST_CONFIG env var exists,
14
+ // use it as the file with the Jest config overrides
15
15
  if (process.env.RAZZLE_JEST_CONFIG) {
16
+ if (fs.existsSync(path.resolve(process.env.RAZZLE_JEST_CONFIG))) {
17
+ const jestConfigPath = path.resolve(process.env.RAZZLE_JEST_CONFIG);
18
+ const jestConfig = require(jestConfigPath);
19
+ config = { ...config, ...jestConfig };
20
+ return config;
21
+ }
16
22
  if (
17
23
  fs.existsSync(`${projectRootPath}/${process.env.RAZZLE_JEST_CONFIG}`)
18
24
  ) {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "18.0.0-alpha.22",
12
+ "version": "18.0.0-alpha.24",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -236,8 +236,8 @@
236
236
  "url": "^0.11.3",
237
237
  "use-deep-compare-effect": "1.8.1",
238
238
  "uuid": "^8.3.2",
239
- "@plone/registry": "1.5.3",
240
239
  "@plone/scripts": "3.6.1",
240
+ "@plone/registry": "1.5.4",
241
241
  "@plone/volto-slate": "18.0.0-alpha.10"
242
242
  },
243
243
  "devDependencies": {
@@ -274,8 +274,8 @@
274
274
  "@types/react-router-dom": "^5.3.3",
275
275
  "@types/react-test-renderer": "18.0.7",
276
276
  "@types/uuid": "^9.0.2",
277
- "@typescript-eslint/eslint-plugin": "7.1.1",
278
- "@typescript-eslint/parser": "7.1.1",
277
+ "@typescript-eslint/eslint-plugin": "7.3.1",
278
+ "@typescript-eslint/parser": "7.3.1",
279
279
  "autoprefixer": "10.4.8",
280
280
  "axe-core": "4.4.2",
281
281
  "babel-loader": "9.1.0",
@@ -213,7 +213,7 @@ const Comments = (props) => {
213
213
  // recursively makes comments with their replies nested
214
214
  // each iteration will show replies to the specific comment using allCommentsWithCildren
215
215
  const commentElement = (comment) => (
216
- <Comment key={comment.comment_id}>
216
+ <Comment key={comment.comment_id} id={comment.comment_id}>
217
217
  <Avatar
218
218
  src={flattenToAppURL(comment.author_image)}
219
219
  title={comment.author_name || 'Anonymous'}
@@ -345,7 +345,7 @@ const Comments = (props) => {
345
345
  </div>
346
346
  )}
347
347
  {/* all comments */}
348
- <Comment.Group threaded>
348
+ <Comment.Group threaded id={'discussion'}>
349
349
  {allPrimaryComments.map((item) => commentElement(item))}
350
350
  </Comment.Group>
351
351