@cdc/editor 4.24.10 → 4.24.12-2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/editor",
3
- "version": "4.24.10",
3
+ "version": "4.24.12-2",
4
4
  "description": "React component for generating a new component entry",
5
5
  "moduleName": "CdcEditor",
6
6
  "main": "dist/cdceditor",
@@ -25,13 +25,13 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@cdc/chart": "^4.24.10",
29
- "@cdc/core": "^4.24.10",
30
- "@cdc/dashboard": "^4.24.10",
31
- "@cdc/data-bite": "^4.24.10",
32
- "@cdc/map": "^4.24.10",
33
- "@cdc/markup-include": "^4.24.10",
34
- "@cdc/waffle-chart": "^4.24.10",
28
+ "@cdc/chart": "^4.24.12-2",
29
+ "@cdc/core": "^4.24.12-2",
30
+ "@cdc/dashboard": "^4.24.12-2",
31
+ "@cdc/data-bite": "^4.24.12-2",
32
+ "@cdc/map": "^4.24.12-2",
33
+ "@cdc/markup-include": "^4.24.12-2",
34
+ "@cdc/waffle-chart": "^4.24.12-2",
35
35
  "axios": "^1.6.0",
36
36
  "d3": "^7.0.0",
37
37
  "html-react-parser": "^3.0.8",
@@ -44,5 +44,5 @@
44
44
  "react": "^18.2.0",
45
45
  "react-dom": "^18.2.0"
46
46
  },
47
- "gitHead": "a4d88d1bc91f596e1b0307d8e25c57ad8c668b75"
47
+ "gitHead": "a60edf1148396309eb473ac9f65426ee40797ddf"
48
48
  }
@@ -1,5 +1,10 @@
1
1
  import { Meta, StoryObj } from '@storybook/react'
2
2
  import CdcEditor from '../CdcEditor'
3
+ import { within, userEvent } from '@storybook/testing-library'
4
+
5
+ const sleep = ms => {
6
+ return new Promise(r => setTimeout(r, ms))
7
+ }
3
8
 
4
9
  const meta: Meta<typeof CdcEditor> = {
5
10
  title: 'Components/Pages/CdcEditor',
@@ -14,3 +19,17 @@ export const DefaultEditor: Story = {
14
19
  config: {}
15
20
  }
16
21
  }
22
+
23
+ export const PreviewTable: Story = {
24
+ args: {},
25
+ parameters: {},
26
+ play: async ({ canvasElement }) => {
27
+ const canvas = within(canvasElement)
28
+ const user = userEvent.setup()
29
+ await sleep(1000)
30
+ const mapButton = canvas.getByText('United States (State- or County-Level)')
31
+ await user.click(mapButton)
32
+ const sampleData = canvas.getByText('United States: County Sample Data')
33
+ await user.click(sampleData)
34
+ }
35
+ }