@plone/volto 18.0.0-alpha.23 → 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,18 @@ 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
+
20
32
  ## 18.0.0-alpha.23 (2024-03-21)
21
33
 
22
34
  ### Feature
@@ -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
+ };
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "18.0.0-alpha.23",
12
+ "version": "18.0.0-alpha.24",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -236,9 +236,9 @@
236
236
  "url": "^0.11.3",
237
237
  "use-deep-compare-effect": "1.8.1",
238
238
  "uuid": "^8.3.2",
239
+ "@plone/scripts": "3.6.1",
239
240
  "@plone/registry": "1.5.4",
240
- "@plone/volto-slate": "18.0.0-alpha.10",
241
- "@plone/scripts": "3.6.1"
241
+ "@plone/volto-slate": "18.0.0-alpha.10"
242
242
  },
243
243
  "devDependencies": {
244
244
  "@babel/core": "^7.0.0",
@@ -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