@openeuropa/bcl-subscription 1.8.2 → 1.9.1

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/data/data.js CHANGED
@@ -3,23 +3,14 @@ import {
3
3
  banner,
4
4
  sidebar,
5
5
  } from "@openeuropa/bcl-base-templates/data/content-page";
6
- import isChromatic from "chromatic/isChromatic";
7
6
 
8
7
  import content from "@openeuropa/bcl-news/data/data--content";
9
8
  import blockData from "@openeuropa/bcl-subscription-block/data";
10
9
  import modalData from "@openeuropa/bcl-subscription/data/data--modal";
11
10
 
12
- const chromatic = process.env.STORYBOOK_ENV;
13
-
14
11
  const header =
15
12
  layout[`header_${process.env.STORYBOOK_THEME}`] || layout.headerSimple;
16
13
 
17
- if (isChromatic() || chromatic) {
18
- banner.image.classes = banner.image.classes
19
- ? `${banner.image.classes} chromatic-ignore`
20
- : "chromatic-ignore";
21
- }
22
-
23
14
  const demoData = {
24
15
  content_type: "subscription",
25
16
  title: "Subscription",
package/package.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "name": "@openeuropa/bcl-subscription",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.8.2",
5
+ "version": "1.9.1",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL subscription",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-subscription-block": "^1.8.2"
11
+ "@openeuropa/bcl-subscription-block": "^1.9.1"
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
@@ -24,5 +24,5 @@
24
24
  "design-system",
25
25
  "twig"
26
26
  ],
27
- "gitHead": "3eb04ddc2c8195e3ad880a8155e6ec108a6ee088"
27
+ "gitHead": "70554ede8523da73edc3c786661e687a30fb2315"
28
28
  }
@@ -1,14 +1,8 @@
1
- import { withDesign } from "storybook-addon-designs";
2
- import withCode from "@openeuropa/storybook-addon-code";
3
- import { within, userEvent } from "@storybook/testing-library";
4
- import isChromatic from "chromatic/isChromatic";
5
1
  import { correctPaths, initScrollspy } from "@openeuropa/bcl-story-utils";
6
2
 
7
3
  import demoData from "@openeuropa/bcl-subscription/data/data";
8
4
  import subscriptionPage from "@openeuropa/bcl-subscription/subscription.html.twig";
9
5
 
10
- const chromatic = process.env.STORYBOOK_ENV;
11
-
12
6
  const clientValidation = (story) => {
13
7
  const demo = story();
14
8
  return `<script>
@@ -90,7 +84,7 @@ const errorState = (story) => {
90
84
 
91
85
  export default {
92
86
  title: "Features/Subscription",
93
- decorators: [withCode, withDesign, initScrollspy],
87
+ decorators: [initScrollspy],
94
88
  parameters: {
95
89
  layout: "fullscreen",
96
90
  controls: { disable: true },
@@ -108,16 +102,6 @@ export default {
108
102
  export const Default = () => subscriptionPage(correctPaths(demoData));
109
103
  Default.decorators = [clientValidation];
110
104
 
111
- if (isChromatic() || chromatic) {
112
- Default.play = async ({ canvasElement }) => {
113
- const canvas = within(canvasElement);
114
- const button = canvas.getAllByText("Subscribe", {
115
- selector: "button",
116
- });
117
- await userEvent.click(button[0]);
118
- };
119
- }
120
-
121
105
  export const SuccessState = () => subscriptionPage(correctPaths(demoData));
122
106
  SuccessState.decorators = [openModal, successState];
123
107
  SuccessState.parameters = {
@@ -21,7 +21,7 @@ describe("OE - Subscription", () => {
21
21
 
22
22
  test(`passes the accessibility tests`, async () => {
23
23
  expect(
24
- await axe(renderTwigFileAsHtml(template, demoData))
24
+ await axe(renderTwigFileAsHtml(template, demoData)),
25
25
  ).toHaveNoViolations();
26
26
  });
27
27
  });