@nice-digital/nds-breadcrumbs 4.0.2-alpha.0 → 4.0.3

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": "@nice-digital/nds-breadcrumbs",
3
- "version": "4.0.2-alpha.0",
3
+ "version": "4.0.3",
4
4
  "description": "Breadcrumbs component for the NICE Design System",
5
5
  "keywords": [
6
6
  "breadcrumbs"
@@ -30,7 +30,7 @@
30
30
  "url": "https://github.com/nice-digital/nice-design-system/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@nice-digital/nds-core": "^4.0.2-alpha.0",
33
+ "@nice-digital/nds-core": "^4.0.3",
34
34
  "classnames": "^2.3.1"
35
35
  },
36
36
  "peerDependencies": {
@@ -45,5 +45,5 @@
45
45
  "@types/node": "^18.11.9",
46
46
  "typescript": "^4.8.4"
47
47
  },
48
- "gitHead": "4e9cad8a2b94cdf4af05b18a6610835883bedf0e"
48
+ "gitHead": "ae51389ba2e51dbe9ee3849e71d44fd567fb2822"
49
49
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const react_1 = require("@testing-library/react");
5
- const Breadcrumb_1 = require("./Breadcrumb");
6
- describe("Breadcrumb", () => {
7
- it("should match snapshot for no location", () => {
8
- const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, { children: "Home" }));
9
- expect(wrapper).toMatchSnapshot();
10
- });
11
- it("should match snapshot for anchor", () => {
12
- const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, Object.assign({ to: "/" }, { children: "Home" })));
13
- expect(wrapper).toMatchSnapshot();
14
- });
15
- it("should pass on props to rendered anchor", () => {
16
- const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, Object.assign({ to: "/", "aria-current": true }, { children: "Home" })));
17
- const link = wrapper.getByRole("link");
18
- expect(link.getAttribute("href")).toBe("/");
19
- expect(link.getAttribute("aria-current")).toBe("true");
20
- expect(link.textContent).toBe("Home");
21
- });
22
- it("should merge any additional classes onto the container", () => {
23
- const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, Object.assign({ to: "/", "aria-current": true, className: "mt--0" }, { children: "Home" })));
24
- expect(wrapper.getByRole("listitem")).toHaveClass("mt--0");
25
- });
26
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const react_1 = require("@testing-library/react");
5
- const Breadcrumb_1 = require("./Breadcrumb");
6
- const Breadcrumbs_1 = require("./Breadcrumbs");
7
- describe("Breadcrumbs", () => {
8
- it("should match snapshot for single level", () => {
9
- const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsxs)(Breadcrumbs_1.Breadcrumbs, { children: [(0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, Object.assign({ to: "/" }, { children: "Home" })), (0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, { children: "Page" })] }));
10
- expect(wrapper).toMatchSnapshot();
11
- });
12
- it("should match snapshot for multiple levels", () => {
13
- const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsxs)(Breadcrumbs_1.Breadcrumbs, { children: [(0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, Object.assign({ to: "/" }, { children: "Home" })), (0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, Object.assign({ to: "/topics/" }, { children: "Topics" })), (0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, { children: "Page" })] }));
14
- expect(wrapper).toMatchSnapshot();
15
- });
16
- it("should spread additional props onto the container", () => {
17
- const wrapper = (0, react_1.render)((0, jsx_runtime_1.jsxs)(Breadcrumbs_1.Breadcrumbs, Object.assign({ "data-track": false }, { children: [(0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, Object.assign({ to: "/" }, { children: "Home" })), (0, jsx_runtime_1.jsx)(Breadcrumb_1.Breadcrumb, { children: "Page" })] })));
18
- expect(wrapper.getByRole("navigation").getAttribute("data-track")).toBe("false");
19
- });
20
- });