vue-instantsearch 4.10.2 → 4.10.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
@@ -16,7 +16,7 @@
16
16
  "autocomplete"
17
17
  ],
18
18
  "license": "MIT",
19
- "version": "4.10.2",
19
+ "version": "4.10.3",
20
20
  "files": [
21
21
  "vue2",
22
22
  "vue3",
@@ -35,7 +35,7 @@
35
35
  "test:exports:vue3": "node ./test/module/vue3/is-es-module.mjs && node ./test/module/vue3/is-cjs-module.cjs"
36
36
  },
37
37
  "dependencies": {
38
- "instantsearch.js": "4.56.2",
38
+ "instantsearch.js": "4.56.3",
39
39
  "mitt": "^2.1.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -60,7 +60,7 @@
60
60
  "@vue/test-utils": "1.3.0",
61
61
  "@vue/test-utils2": "npm:@vue/test-utils@2.0.0-rc.11",
62
62
  "algoliasearch": "4.14.3",
63
- "algoliasearch-helper": "3.13.0",
63
+ "algoliasearch-helper": "3.13.2",
64
64
  "instantsearch.css": "8.0.0",
65
65
  "rollup": "1.32.1",
66
66
  "rollup-plugin-babel": "4.4.0",
@@ -87,5 +87,5 @@
87
87
  "vuex": "3.5.1",
88
88
  "vuex4": "npm:vuex@4.0.0"
89
89
  },
90
- "gitHead": "aa19955aae2c79b93d5f952832d366e8abff9886"
90
+ "gitHead": "f550379829306217e021fd9c538ec4ebd0153b19"
91
91
  }
@@ -78,8 +78,11 @@ createHierarchicalMenuTests(async ({ instantSearchOptions, widgetParams }) => {
78
78
  });
79
79
 
80
80
  createBreadcrumbTests(async ({ instantSearchOptions, widgetParams }) => {
81
+ // The passed `transformItems` prop is meant to apply only to the breadcrumb,
82
+ // not the hierarchical menu
81
83
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
82
84
  const { transformItems, ...hierarchicalWidgetParams } = widgetParams;
85
+
83
86
  mountApp(
84
87
  {
85
88
  render: renderCompat((h) =>
@@ -32,84 +32,7 @@ const defaultProps = {
32
32
  attributes: ['categories.lvl0', 'categories.lvl1'],
33
33
  };
34
34
 
35
- it('accepts an attribute prop', () => {
36
- __setState({
37
- ...defaultState,
38
- });
39
-
40
- const wrapper = mount(Breadcrumb, {
41
- propsData: defaultProps,
42
- });
43
-
44
- expect(wrapper.vm.widgetParams.attributes).toEqual([
45
- 'categories.lvl0',
46
- 'categories.lvl1',
47
- ]);
48
- });
49
-
50
- it('accepts a separator prop', () => {
51
- __setState({
52
- ...defaultState,
53
- });
54
-
55
- const wrapper = mount(Breadcrumb, {
56
- propsData: {
57
- ...defaultProps,
58
- separator: ' ~ ',
59
- },
60
- });
61
-
62
- expect(wrapper.vm.widgetParams.separator).toBe(' ~ ');
63
- });
64
-
65
- it('accepts a rootPath prop', () => {
66
- __setState({
67
- ...defaultState,
68
- });
69
-
70
- const wrapper = mount(Breadcrumb, {
71
- propsData: {
72
- ...defaultProps,
73
- rootPath: 'TV & Home Theater',
74
- },
75
- });
76
-
77
- expect(wrapper.vm.widgetParams.rootPath).toBe('TV & Home Theater');
78
- });
79
-
80
- it('accepts a transformItems prop', () => {
81
- __setState({
82
- ...defaultState,
83
- });
84
-
85
- const transformItems = () => {};
86
-
87
- const wrapper = mount(Breadcrumb, {
88
- propsData: {
89
- ...defaultProps,
90
- transformItems,
91
- },
92
- });
93
-
94
- expect(wrapper.vm.widgetParams.transformItems).toBe(transformItems);
95
- });
96
-
97
35
  describe('default render', () => {
98
- it('renders correctly with a selected item', () => {
99
- __setState({
100
- ...defaultState,
101
- });
102
-
103
- const wrapper = mount(Breadcrumb, {
104
- propsData: defaultProps,
105
- });
106
-
107
- const selected = wrapper.find('.ais-Breadcrumb-item--selected');
108
-
109
- expect(selected.text()).toContain('Streaming Media Players');
110
- expect(wrapper.html()).toMatchSnapshot();
111
- });
112
-
113
36
  it('renders correctly with an URL for the href', () => {
114
37
  __setState({
115
38
  ...defaultState,
@@ -113,36 +113,6 @@ exports[`custom separator render renders correctly 1`] = `
113
113
  </div>
114
114
  `;
115
115
 
116
- exports[`default render renders correctly with a selected item 1`] = `
117
- <div class="ais-Breadcrumb">
118
- <ul class="ais-Breadcrumb-list">
119
- <li class="ais-Breadcrumb-item">
120
- <a class="ais-Breadcrumb-link">
121
- Home
122
- </a>
123
- </li>
124
- <li class="ais-Breadcrumb-item">
125
- <span aria-hidden="true"
126
- class="ais-Breadcrumb-separator"
127
- >
128
- &gt;
129
- </span>
130
- <a class="ais-Breadcrumb-link">
131
- TV &amp; Home Theater
132
- </a>
133
- </li>
134
- <li class="ais-Breadcrumb-item ais-Breadcrumb-item--selected">
135
- <span aria-hidden="true"
136
- class="ais-Breadcrumb-separator"
137
- >
138
- &gt;
139
- </span>
140
- Streaming Media Players
141
- </li>
142
- </ul>
143
- </div>
144
- `;
145
-
146
116
  exports[`default render renders correctly with an URL for the href 1`] = `
147
117
  <div class="ais-Breadcrumb">
148
118
  <ul class="ais-Breadcrumb-list">