hr-design-system-handlebars 1.67.1 → 1.67.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.
@@ -9,6 +9,7 @@ const config = {
9
9
  '../src/**/*.mdx',
10
10
  '../src/**/*.stories.@(js|jsx|ts|tsx)',
11
11
  ],
12
+ features: { buildStoriesJson: true },
12
13
  addons: [
13
14
  '@storybook/addon-links',
14
15
  {
@@ -44,6 +45,7 @@ const config = {
44
45
  },
45
46
  },
46
47
  },
48
+ '@storybook/addon-interactions'
47
49
  ],
48
50
  webpackFinal: async (config, { configType }) => {
49
51
  // `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v1.67.2 (Thu May 02 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Feature/dpe 3061 [#919](https://github.com/mumprod/hr-design-system-handlebars/pull/919) ([@szuelch](https://github.com/szuelch))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@szuelch](https://github.com/szuelch)
10
+
11
+ ---
12
+
1
13
  # v1.67.1 (Mon Apr 29 2024)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -3353,7 +3353,7 @@ article.indexTextDS .indexTextHighlighted .link {
3353
3353
  border-bottom-color: var(--color-secondary-ds);
3354
3354
  }
3355
3355
  .counter-reset {
3356
- counter-reset: cnt1714396205933;
3356
+ counter-reset: cnt1714630422823;
3357
3357
  }
3358
3358
  .hyphens-auto {
3359
3359
  -webkit-hyphens: auto;
@@ -3732,7 +3732,7 @@ article.indexTextDS .indexTextHighlighted .link {
3732
3732
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3733
3733
  }
3734
3734
  .-ordered {
3735
- counter-increment: cnt1714396205933 1;
3735
+ counter-increment: cnt1714630422823 1;
3736
3736
  }
3737
3737
  .-ordered::before {
3738
3738
  position: absolute;
@@ -3748,7 +3748,7 @@ article.indexTextDS .indexTextHighlighted .link {
3748
3748
  letter-spacing: .0125em;
3749
3749
  --tw-text-opacity: 1;
3750
3750
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3751
- content: counter(cnt1714396205933);
3751
+ content: counter(cnt1714630422823);
3752
3752
  }
3753
3753
  /*! ****************************/
3754
3754
  /*! DataPolicy stuff */
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
8
  "repository": "https://github.com/szuelch/hr-design-system-handlebars",
9
- "version": "1.67.1",
9
+ "version": "1.67.2",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -27,7 +27,8 @@
27
27
  "preparePartialsForDelivery": "gulp preparePartialsForDelivery",
28
28
  "create-modernizr-config": "gulp createModernizrConfig",
29
29
  "merge-locatags": "gulp mergeLocatags",
30
- "prepare": "yarn build"
30
+ "prepare": "yarn build",
31
+ "test-storybook": "test-storybook"
31
32
  },
32
33
  "browserslist": [
33
34
  "last 2 versions",
@@ -46,12 +47,16 @@
46
47
  "@storybook/addon-actions": "7.5.3",
47
48
  "@storybook/addon-console": "^2.0.0",
48
49
  "@storybook/addon-essentials": "7.5.3",
50
+ "@storybook/addon-interactions": "7.6.16",
49
51
  "@storybook/addon-links": "^7.2.1",
50
52
  "@storybook/addon-styling": "^1.3.5",
51
53
  "@storybook/addons": "^7.2.1",
52
54
  "@storybook/blocks": "7.2.1",
53
55
  "@storybook/html": "^7.2.1",
54
56
  "@storybook/html-webpack5": "7.2.1",
57
+ "@storybook/jest": "^0.2.3",
58
+ "@storybook/test-runner": "~0.16.0",
59
+ "@storybook/testing-library": "^0.2.2",
55
60
  "@storybook/theming": "^7.2.1",
56
61
  "auto": "^11.0.5",
57
62
  "autoprefixer": "^10.4.2",
@@ -1,3 +1,5 @@
1
+ import { userEvent, within } from '@storybook/testing-library';
2
+
1
3
  const handlebars = require('hrHandlebars')
2
4
 
3
5
  const defaultModalTemplate = (args, { globals: { customConditionalToolbar } }) => {
@@ -28,7 +30,7 @@ const userConsentModalTemplate = (args, { globals: { customConditionalToolbar }
28
30
  {{> components/modal/user_consent _headline=(loca "modal_user_consent_headline") _text=(loca "modal_user_consent_text") _labelOk=(loca "modal_user_consent_label_ok") _labelCancel=(loca "modal_user_consent_label_cancel")}}
29
31
  {{/components/modal/modal}}
30
32
 
31
- <a href="https://hessenschau.de" class="js-user-consent-needed" rel="noopener" target="_blank">User Consent Modal</a>
33
+ <a data-testid="modal-hook" href="https://hessenschau.de" class="js-user-consent-needed" rel="noopener" target="_blank">User Consent Modal</a>
32
34
  `)
33
35
  return hbsTemplate({ brand, ...args })
34
36
  }
@@ -77,3 +79,19 @@ export const userConsentModal = {
77
79
  },
78
80
  }
79
81
 
82
+ export const openedUserConsentModal = {
83
+ render: userConsentModalTemplate.bind({}),
84
+ name: 'User Consent Modal geöffnet',
85
+ args: {
86
+ _trigger: '.js-user-consent-needed',
87
+ _type: 'userConsent'
88
+ },
89
+ play: async ({ canvasElement }) => {
90
+ const canvas = within(canvasElement);
91
+
92
+ const link = canvas.getByTestId('modal-hook');
93
+
94
+ await userEvent.click(link);
95
+ },
96
+ }
97
+
@@ -1,4 +1,5 @@
1
1
  import { resetComponents } from '@storybook/components'
2
+ import { userEvent, within } from '@storybook/testing-library';
2
3
  import subscribeButtonJson from 'components/teaser/fixtures/teaser_podcast.json'
3
4
 
4
5
  import subscribeButton from 'components/podcast/components/podcast_subscribe_button.hbs'
@@ -44,8 +45,12 @@ export const SubscribeButtonOpen = {
44
45
  render: Template.bind({}),
45
46
  name: 'Subscribe Button Open',
46
47
 
47
- args: {
48
- ...subscribeButtonJson.logicItem.includeModel.podcastChannel,
49
- storybookOpen: true,
48
+ args: subscribeButtonJson.logicItem.includeModel.podcastChannel,
49
+ play: async ({ canvasElement }) => {
50
+ const canvas = within(canvasElement);
51
+
52
+ const button = canvas.getByRole('button');
53
+
54
+ await userEvent.click(button);
50
55
  },
51
56
  }