@openeuropa/bcl-heading 0.24.1 → 0.26.0
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 +3 -3
- package/__snapshots__/heading.test.js.snap +0 -51
- package/heading.test.js +0 -51
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-heading",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.26.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@openeuropa/bcl-link": "^0.
|
|
10
|
+
"@openeuropa/bcl-link": "^0.26.0"
|
|
11
11
|
},
|
|
12
12
|
"description": "OE - BCL heading",
|
|
13
13
|
"repository": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"design-system",
|
|
25
25
|
"twig"
|
|
26
26
|
],
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "94d89cc379780cfce06178959194b3bc1b4c5eda"
|
|
28
28
|
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`OE - Heading renders correctly 1`] = `
|
|
4
|
-
<jest>
|
|
5
|
-
<h2
|
|
6
|
-
class="mb-4 bcl-heading"
|
|
7
|
-
>
|
|
8
|
-
A title created by the bcl heading template
|
|
9
|
-
</h2>
|
|
10
|
-
</jest>
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
exports[`OE - Heading renders correctly with a link 1`] = `
|
|
14
|
-
<jest>
|
|
15
|
-
<h2
|
|
16
|
-
class="mb-4 bcl-heading"
|
|
17
|
-
>
|
|
18
|
-
<a
|
|
19
|
-
class="standalone"
|
|
20
|
-
href="/example.html"
|
|
21
|
-
>
|
|
22
|
-
A title created by the bcl heading template
|
|
23
|
-
</a>
|
|
24
|
-
</h2>
|
|
25
|
-
</jest>
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
exports[`OE - Heading renders correctly with a link and a title 1`] = `
|
|
29
|
-
<jest>
|
|
30
|
-
<h2
|
|
31
|
-
class="mb-4 bcl-heading"
|
|
32
|
-
>
|
|
33
|
-
<a
|
|
34
|
-
class="standalone"
|
|
35
|
-
href="/example.html"
|
|
36
|
-
>
|
|
37
|
-
A title created by the bcl heading template
|
|
38
|
-
</a>
|
|
39
|
-
</h2>
|
|
40
|
-
</jest>
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
exports[`OE - Heading renders correctly with custom tag 1`] = `
|
|
44
|
-
<jest>
|
|
45
|
-
<h3
|
|
46
|
-
class="mb-4 bcl-heading"
|
|
47
|
-
>
|
|
48
|
-
A title created by the bcl heading template
|
|
49
|
-
</h3>
|
|
50
|
-
</jest>
|
|
51
|
-
`;
|
package/heading.test.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { renderTwigFileAsNode } from "@openeuropa/bcl-test-utils";
|
|
2
|
-
|
|
3
|
-
const template = "@oe-bcl/bcl-heading/heading.html.twig";
|
|
4
|
-
const render = (params) => renderTwigFileAsNode(template, params);
|
|
5
|
-
|
|
6
|
-
describe("OE - Heading", () => {
|
|
7
|
-
test(`renders correctly`, () => {
|
|
8
|
-
expect.assertions(1);
|
|
9
|
-
|
|
10
|
-
return expect(
|
|
11
|
-
render({ title: "A title created by the bcl heading template" })
|
|
12
|
-
).resolves.toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
test(`renders correctly with custom tag`, () => {
|
|
16
|
-
expect.assertions(1);
|
|
17
|
-
|
|
18
|
-
return expect(
|
|
19
|
-
render({
|
|
20
|
-
title: "A title created by the bcl heading template",
|
|
21
|
-
title_tag: "h3",
|
|
22
|
-
})
|
|
23
|
-
).resolves.toMatchSnapshot();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
test(`renders correctly with a link`, () => {
|
|
27
|
-
expect.assertions(1);
|
|
28
|
-
|
|
29
|
-
return expect(
|
|
30
|
-
render({
|
|
31
|
-
title_link: {
|
|
32
|
-
path: "/example.html",
|
|
33
|
-
label: "A title created by the bcl heading template",
|
|
34
|
-
},
|
|
35
|
-
})
|
|
36
|
-
).resolves.toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
test(`renders correctly with a link and a title`, () => {
|
|
40
|
-
expect.assertions(1);
|
|
41
|
-
|
|
42
|
-
return expect(
|
|
43
|
-
render({
|
|
44
|
-
title: "A title created by the bcl heading template",
|
|
45
|
-
title_link: {
|
|
46
|
-
path: "/example.html",
|
|
47
|
-
},
|
|
48
|
-
})
|
|
49
|
-
).resolves.toMatchSnapshot();
|
|
50
|
-
});
|
|
51
|
-
});
|