@riosst100/pwa-marketplace 3.1.3 → 3.1.4

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.
Files changed (72) hide show
  1. package/package.json +1 -1
  2. package/src/components/BrandLandingPage/brandLanding.js +0 -5
  3. package/src/components/CheckoutHeader/accountTrigger.js +104 -0
  4. package/src/components/CheckoutHeader/cartTrigger.js +110 -0
  5. package/src/components/CheckoutHeader/cartTrigger.module.css +47 -0
  6. package/src/components/CheckoutHeader/storeSwitcher.js +119 -0
  7. package/src/components/CheckoutHeader/storeSwitcher.module.css +107 -0
  8. package/src/components/CheckoutHeader/switcherItem.js +47 -0
  9. package/src/components/CheckoutHeader/wishlistTrigger.js +23 -0
  10. package/src/components/FilterListContent/filterListPage.js +0 -25
  11. package/src/components/FilterTop/filterTop.js +1 -1
  12. package/src/components/ProductContent/productContent.js +1 -1
  13. package/src/components/RMAPage/components/productItem.css +15 -0
  14. package/src/components/RMAPage/components/productItem.module.css +15 -0
  15. package/src/components/RelatedProducts/index.js +1 -0
  16. package/src/components/RelatedProducts/relatedProducts.js +44 -0
  17. package/src/components/SellerMegaMenu/__tests__/MegaMenu.spec.js +91 -0
  18. package/src/components/SellerMegaMenu/__tests__/MegaMenuItem.spec.js +123 -0
  19. package/src/components/SellerMegaMenu/__tests__/Submenu.spec.js +61 -0
  20. package/src/components/SellerMegaMenu/__tests__/SubmenuColumn.spec.js +50 -0
  21. package/src/components/SellerMegaMenu/__tests__/__snapshots__/MegaMenu.spec.js.snap +114 -0
  22. package/src/components/SellerMegaMenu/__tests__/__snapshots__/MegaMenuItem.spec.js.snap +71 -0
  23. package/src/components/SellerMegaMenu/__tests__/__snapshots__/Submenu.spec.js.snap +59 -0
  24. package/src/components/SellerMegaMenu/__tests__/__snapshots__/SubmenuColumn.spec.js.snap +34 -0
  25. package/src/components/SellerMegaMenu/customSubmenuColumn.js +75 -0
  26. package/src/components/SellerMegaMenu/customSubmenuColumn.module.css +29 -0
  27. package/src/components/SellerMegaMenu/shopByColumn.js +121 -0
  28. package/src/components/SellerProducts/productContent.js +2 -4
  29. package/src/components/SetsData/setsData.js +0 -25
  30. package/src/components/ShopBy/shopBy.js +3 -78
  31. package/src/components/ShopBySets/shopBySets.js +2 -2
  32. package/src/components/ShowMore/showMore.js +3 -49
  33. package/src/intercept.js +0 -14
  34. package/src/overwrites/peregrine/lib/talons/OrderHistoryPage/orderHistoryPage.gql.js +1 -15
  35. package/src/overwrites/peregrine/lib/talons/OrderHistoryPage/orderRow.gql.js +0 -11
  36. package/src/overwrites/peregrine/lib/talons/RelatedProducts/productReview.gql.js +89 -0
  37. package/src/overwrites/peregrine/lib/talons/RelatedProducts/useRelatedProducts.js +833 -0
  38. package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryContent.gql.js +0 -16
  39. package/src/overwrites/peregrine/lib/talons/RootComponents/Category/useCategoryContent.js +1 -5
  40. package/src/overwrites/venia-ui/lib/RootComponents/Category/category.js +118 -62
  41. package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +3 -50
  42. package/src/overwrites/venia-ui/lib/components/Breadcrumbs/breadcrumbs.js +1 -7
  43. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/EditModal/editModal.js +41 -0
  44. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/EditModal/index.js +1 -0
  45. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/EditModal/productDetail.js +80 -0
  46. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/EditModal/productDetail.module.css +33 -0
  47. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/EditModal/productForm.js +153 -0
  48. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/EditModal/productForm.module.css +52 -0
  49. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/errorMessage.js +31 -0
  50. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/errorMessage.module.css +13 -0
  51. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/quantity.js +40 -0
  52. package/src/overwrites/venia-ui/lib/components/FilterSidebar/filterSidebar.js +21 -92
  53. package/src/overwrites/venia-ui/lib/components/Footer/sampleData.js +1 -1
  54. package/src/overwrites/venia-ui/lib/components/MegaMenu/megaMenuItem.js +6 -2
  55. package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.js +0 -21
  56. package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/Reviews/reviewModal.js +8 -0
  57. package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderHistoryPage.js +3 -3
  58. package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderRow.js +4 -85
  59. package/src/talons/ProductContent/productContent.gql.js +0 -16
  60. package/src/talons/ProductContent/useProductContent.js +0 -4
  61. package/src/talons/RelatedProducts/relatedProducts.gql.js +209 -0
  62. package/src/talons/RelatedProducts/useRelatedProducts.js +112 -0
  63. package/src/talons/SellerProducts/productContent.gql.js +1 -17
  64. package/src/talons/SellerProducts/useProductContent.js +1 -36
  65. package/src/components/AttributesBlock/attributesBlock.js +0 -54
  66. package/src/components/AttributesBlock/attributesBlock.module.css +0 -28
  67. package/src/components/ShopBy/shopBy copy.js +0 -172
  68. package/src/components/SubCategory/customSubCategory.js +0 -45
  69. package/src/components/SubCategory/customSubCategory.module.css +0 -22
  70. package/src/talons/AttributesBlock/attributesBlock.gql.js +0 -15
  71. package/src/talons/AttributesBlock/useAttributesBlock.js +0 -38
  72. package/src/talons/SubCategory/useCustomSubCategory.js +0 -50
@@ -0,0 +1,15 @@
1
+ .quantityLabel {
2
+ composes: font-medium from global;
3
+ composes: leading-normal from global;
4
+ composes: mb-sm from global;
5
+ composes: pt-xs from global;
6
+ composes: text-colorDefault from global;
7
+ }
8
+
9
+ .quantityRoot {
10
+ composes: root from '@magento/venia-ui/lib/components/QuantityStepper/quantityStepper.module.css';
11
+ grid-template-columns: auto 4rem auto;
12
+ composes: justify-start from global;
13
+ composes: px-xs from global;
14
+ composes: py-0 from global;
15
+ }
@@ -0,0 +1 @@
1
+ export { default } from './relatedProducts';
@@ -0,0 +1,44 @@
1
+ import React, { Fragment } from 'react';
2
+ import { FormattedMessage } from 'react-intl';
3
+ import { useRelatedProducts } from '@riosst100/pwa-marketplace/src/talons/RelatedProducts/useRelatedProducts';
4
+ import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
5
+ import { StoreTitle, Meta } from '@magento/venia-ui/lib/components/Head';
6
+ import mapSeller from '@riosst100/pwa-marketplace/src/util/mapSeller';
7
+ import SellerDetail from '@riosst100/pwa-marketplace/src/components/SellerDetail/sellerDetail';
8
+
9
+ const RelatedProducts = props => {
10
+ const { categoryUrlKey } = props;
11
+
12
+ const talonProps = useRelatedProducts({
13
+ mapSeller
14
+ });
15
+
16
+ const { error, loading, seller } = talonProps;
17
+
18
+ if (loading && !seller)
19
+ return '';
20
+ // return <SellerShimmer />;
21
+ if (error && !seller) return <ErrorView />;
22
+ if (!seller) {
23
+ return (
24
+ <h1>
25
+ <FormattedMessage
26
+ id={'seller.notFound'}
27
+ defaultMessage={
28
+ 'Seller Not Found.'
29
+ }
30
+ />
31
+ </h1>
32
+ );
33
+ }
34
+
35
+ return (
36
+ <Fragment>
37
+ <StoreTitle>{seller.name}</StoreTitle>
38
+ <Meta name="description" content={seller.description} />
39
+ {seller && <SellerDetail seller={seller} />}
40
+ </Fragment>
41
+ );
42
+ };
43
+
44
+ export default RelatedProducts;
@@ -0,0 +1,91 @@
1
+ import React from 'react';
2
+ import { MemoryRouter } from 'react-router-dom';
3
+
4
+ import { createTestInstance } from '@magento/peregrine';
5
+ import { useIsInViewport } from '@magento/peregrine/lib/hooks/useIsInViewport';
6
+
7
+ import MegaMenu from '../megaMenu';
8
+
9
+ jest.mock('@magento/venia-ui/lib/classify');
10
+ jest.mock('@magento/peregrine/lib/hooks/useIsInViewport');
11
+ jest.mock('@magento/peregrine/lib/talons/MegaMenu/useMegaMenu', () => ({
12
+ useMegaMenu: jest.fn().mockReturnValue({
13
+ megaMenuData: {
14
+ id: 1,
15
+ name: 'Clothing',
16
+ children: [
17
+ {
18
+ id: 2,
19
+ name: 'Women',
20
+ url_path: 'women',
21
+ children: [
22
+ {
23
+ id: 5,
24
+ name: 'Bottoms',
25
+ url_path: 'bottoms',
26
+ isActive: true,
27
+ children: []
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ id: 3,
33
+ name: 'Men',
34
+ url_path: 'men',
35
+ children: []
36
+ },
37
+ {
38
+ id: 4,
39
+ name: 'Gear',
40
+ url_path: 'gear',
41
+ children: []
42
+ }
43
+ ]
44
+ },
45
+ activeCategoryId: 5,
46
+ categoryUrlSuffix: '.html',
47
+ useOutsideAlerter: () => {}
48
+ })
49
+ }));
50
+
51
+ describe('#MegaMenu', () => {
52
+ test('useEffect', () => {
53
+ const useEffect = jest.spyOn(React, 'useEffect');
54
+
55
+ const mockUseEffect = () => {
56
+ useEffect.mockImplementationOnce(mockFunction => mockFunction());
57
+ };
58
+
59
+ mockUseEffect();
60
+ });
61
+
62
+ test('not resetting the menu', () => {
63
+ const handleClickOutside = jest.fn();
64
+
65
+ expect(handleClickOutside).toHaveBeenCalledTimes(0);
66
+ });
67
+
68
+ it('renders empty div if not in viewport', () => {
69
+ useIsInViewport.mockReturnValue(false);
70
+
71
+ const instance = createTestInstance(
72
+ <MemoryRouter>
73
+ <MegaMenu />
74
+ </MemoryRouter>
75
+ );
76
+
77
+ expect(instance.toJSON()).toMatchSnapshot();
78
+ });
79
+
80
+ it('renders menu if in viewport', () => {
81
+ useIsInViewport.mockReturnValue(true);
82
+
83
+ const instance = createTestInstance(
84
+ <MemoryRouter>
85
+ <MegaMenu />
86
+ </MemoryRouter>
87
+ );
88
+
89
+ expect(instance.toJSON()).toMatchSnapshot();
90
+ });
91
+ });
@@ -0,0 +1,123 @@
1
+ import React from 'react';
2
+ import { Link } from 'react-router-dom';
3
+ import { act } from 'react-test-renderer';
4
+
5
+ import { createTestInstance } from '@magento/peregrine';
6
+
7
+ import MegaMenuItem from '../megaMenuItem';
8
+
9
+ jest.mock('../../../classify');
10
+ jest.mock('../../Icon', () => props => <mock-Icon {...props} />);
11
+ jest.mock('../submenu', () => props => <mock-Submenu {...props} />);
12
+ jest.mock('react', () => {
13
+ const React = jest.requireActual('react');
14
+ const memoSpy = jest.spyOn(React, 'useMemo');
15
+
16
+ return Object.assign(React, {
17
+ useMemo: memoSpy
18
+ });
19
+ });
20
+
21
+ const mockHandleKeyDown = jest.fn();
22
+
23
+ jest.mock('react-router-dom', () => ({
24
+ Link: jest.fn(() => props => <mock-Link {...props} />)
25
+ }));
26
+
27
+ jest.mock('@magento/peregrine/lib/talons/MegaMenu/useMegaMenuItem', () => ({
28
+ useMegaMenuItem: jest.fn(() => {
29
+ return {
30
+ isFocused: false,
31
+ isActive: false,
32
+ handleMenuItemFocus: jest.fn(),
33
+ handleCloseSubMenu: jest.fn(),
34
+ isMenuActive: false,
35
+ handleKeyDown: mockHandleKeyDown
36
+ };
37
+ })
38
+ }));
39
+
40
+ let inputProps = {};
41
+
42
+ const Component = () => {
43
+ return <MegaMenuItem {...inputProps} />;
44
+ };
45
+
46
+ const givenDefaultValues = () => {
47
+ inputProps = {
48
+ activeCategoryId: 1,
49
+ category: {
50
+ id: 1,
51
+ name: 'Women',
52
+ url_path: 'women',
53
+ isActive: true,
54
+ children: [
55
+ {
56
+ id: 2,
57
+ name: 'Bottoms',
58
+ url_path: 'bottoms',
59
+ children: []
60
+ },
61
+ {
62
+ id: 3,
63
+ name: 'Tops',
64
+ url_path: 'tops',
65
+ isActive: false,
66
+ children: []
67
+ }
68
+ ]
69
+ },
70
+ rootCategoryName: 'Clothing',
71
+ categoryUrlSuffix: '.html',
72
+ mainNavWidth: 200,
73
+ subMenuState: 'test',
74
+ disableFocus: false
75
+ };
76
+ };
77
+
78
+ describe('Mega menu item renders correctly', () => {
79
+ beforeEach(() => {
80
+ givenDefaultValues();
81
+ });
82
+
83
+ test('it renders correctly', () => {
84
+ const instance = createTestInstance(<Component />);
85
+
86
+ expect(instance.toJSON()).toMatchSnapshot();
87
+ });
88
+
89
+ test('it marks the active category', () => {
90
+ const { root } = createTestInstance(<Component />);
91
+
92
+ expect(root.findByType(Link).props.className).toEqual('megaMenuLink');
93
+ expect(root.findByType(Link).props.to).toEqual('/women.html');
94
+ expect(root.findByType(Link).props.children[0]).toEqual('Women');
95
+ });
96
+
97
+ it('should call a11yClick', () => {
98
+ const { root } = createTestInstance(<Component />);
99
+
100
+ act(() => {
101
+ root.findByType(Link).props.onKeyDown();
102
+ });
103
+
104
+ expect(mockHandleKeyDown).toHaveBeenCalled();
105
+ });
106
+
107
+ test('it does not render submenu when item does not have children', () => {
108
+ const categoryWithoutChildren = {
109
+ id: 3,
110
+ name: 'Tops',
111
+ url_path: 'tops',
112
+ isActive: false,
113
+ children: []
114
+ };
115
+
116
+ const instance = createTestInstance(
117
+ <Component category={categoryWithoutChildren} />
118
+ );
119
+
120
+ expect(instance.toJSON().children.length).toEqual(1);
121
+ expect(instance.toJSON()).toMatchSnapshot();
122
+ });
123
+ });
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import { createTestInstance } from '@magento/peregrine';
3
+ import { MemoryRouter } from 'react-router-dom';
4
+
5
+ import Submenu from '../submenu';
6
+
7
+ jest.mock('../../../classify');
8
+ jest.mock('../submenuColumn', () => props => <mock-SubmenuColumn {...props} />);
9
+ jest.mock('react', () => {
10
+ const React = jest.requireActual('react');
11
+ const callbackSpy = jest.spyOn(React, 'useCallback');
12
+
13
+ return Object.assign(React, {
14
+ callbackSpy: callbackSpy
15
+ });
16
+ });
17
+
18
+ const handleCloseSubMenu = jest.fn().mockName('handleCloseSubMenu');
19
+
20
+ describe('Submenu renders correctly', () => {
21
+ const props = {
22
+ items: [
23
+ {
24
+ id: 1,
25
+ name: 'Bottoms',
26
+ url_path: 'bottoms',
27
+ children: [
28
+ {
29
+ id: 3,
30
+ name: 'Pants',
31
+ url_path: 'pants',
32
+ isActive: false,
33
+ children: []
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ id: 2,
39
+ name: 'Tops',
40
+ url_path: 'tops',
41
+ isActive: false,
42
+ children: []
43
+ }
44
+ ],
45
+ rootCategoryName: 'Clothing',
46
+ firstLevelCategoryName: 'Women',
47
+ categoryUrlSuffix: '.html',
48
+ handleCloseSubMenu,
49
+ isFocused: false,
50
+ subMenuState: false
51
+ };
52
+ test('it renders correctly', () => {
53
+ const instance = createTestInstance(
54
+ <MemoryRouter>
55
+ <Submenu {...props} />
56
+ </MemoryRouter>
57
+ );
58
+
59
+ expect(instance.toJSON()).toMatchSnapshot();
60
+ });
61
+ });
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { createTestInstance } from '@magento/peregrine';
3
+ import { MemoryRouter } from 'react-router-dom';
4
+
5
+ import SubmenuColumn from '../submenuColumn';
6
+
7
+ jest.mock('../../../classify');
8
+
9
+ describe('Submenu column renders correctly', () => {
10
+ const props = {
11
+ category: {
12
+ id: 1,
13
+ name: 'Pants',
14
+ url_path: 'pants',
15
+ children: [
16
+ {
17
+ id: 2,
18
+ name: 'Jeans',
19
+ url_path: 'jeans',
20
+ isActive: true,
21
+ children: []
22
+ }
23
+ ]
24
+ },
25
+ categoryUrlSuffix: '.html'
26
+ };
27
+
28
+ test('it renders correctly', () => {
29
+ const instance = createTestInstance(
30
+ <MemoryRouter>
31
+ <SubmenuColumn {...props} />
32
+ </MemoryRouter>
33
+ );
34
+
35
+ expect(instance.toJSON()).toMatchSnapshot();
36
+ });
37
+
38
+ test('it renders active state', () => {
39
+ const instance = createTestInstance(
40
+ <MemoryRouter>
41
+ <SubmenuColumn {...props} />
42
+ </MemoryRouter>
43
+ );
44
+
45
+ const activeLink = instance.root.findByProps({
46
+ className: 'linkActive'
47
+ });
48
+ expect(activeLink.props.children).toEqual('Jeans');
49
+ });
50
+ });
@@ -0,0 +1,114 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`#MegaMenu renders empty div if not in viewport 1`] = `
4
+ <nav
5
+ className="megaMenu"
6
+ role="navigation"
7
+ />
8
+ `;
9
+
10
+ exports[`#MegaMenu renders menu if in viewport 1`] = `
11
+ <nav
12
+ className="megaMenu"
13
+ role="navigation"
14
+ >
15
+ <div
16
+ className="megaMenuItem"
17
+ onFocus={[Function]}
18
+ onMouseEnter={[Function]}
19
+ onMouseLeave={[Function]}
20
+ onTouchStart={[Function]}
21
+ >
22
+ <a
23
+ aria-label="Category: Women. 1 sub-categories"
24
+ className="megaMenuLink"
25
+ href="/women.html"
26
+ onClick={[Function]}
27
+ onKeyDown={[Function]}
28
+ >
29
+ Women
30
+ <span
31
+ className="arrowDown"
32
+ >
33
+ <svg
34
+ className="icon"
35
+ fill="none"
36
+ height={16}
37
+ stroke="currentColor"
38
+ strokeLinecap="round"
39
+ strokeLinejoin="round"
40
+ strokeWidth="2"
41
+ viewBox="0 0 24 24"
42
+ width={16}
43
+ xmlns="http://www.w3.org/2000/svg"
44
+ >
45
+ <polyline
46
+ points="6 9 12 15 18 9"
47
+ />
48
+ </svg>
49
+ </span>
50
+ </a>
51
+ <div
52
+ className="submenu_inactive"
53
+ >
54
+ <div
55
+ className="submenuItems"
56
+ style={
57
+ Object {
58
+ "minWidth": 20,
59
+ }
60
+ }
61
+ >
62
+ <div
63
+ className="submenuColumn"
64
+ >
65
+ <a
66
+ className="link"
67
+ href="/bottoms.html"
68
+ onClick={[Function]}
69
+ onKeyDown={[Function]}
70
+ >
71
+ <span
72
+ className="heading"
73
+ >
74
+ Bottoms
75
+ </span>
76
+ </a>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ <div
82
+ className="megaMenuItem"
83
+ onFocus={[Function]}
84
+ onMouseEnter={[Function]}
85
+ onMouseLeave={[Function]}
86
+ onTouchStart={[Function]}
87
+ >
88
+ <a
89
+ className="megaMenuLink"
90
+ href="/men.html"
91
+ onClick={[Function]}
92
+ onKeyDown={[Function]}
93
+ >
94
+ Men
95
+ </a>
96
+ </div>
97
+ <div
98
+ className="megaMenuItem"
99
+ onFocus={[Function]}
100
+ onMouseEnter={[Function]}
101
+ onMouseLeave={[Function]}
102
+ onTouchStart={[Function]}
103
+ >
104
+ <a
105
+ className="megaMenuLink"
106
+ href="/gear.html"
107
+ onClick={[Function]}
108
+ onKeyDown={[Function]}
109
+ >
110
+ Gear
111
+ </a>
112
+ </div>
113
+ </nav>
114
+ `;
@@ -0,0 +1,71 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Mega menu item renders correctly it does not render submenu when item does not have children 1`] = `
4
+ <div
5
+ className="megaMenuItem"
6
+ onFocus={[Function]}
7
+ onMouseEnter={[Function]}
8
+ onMouseLeave={[Function]}
9
+ onTouchStart={[Function]}
10
+ >
11
+ <mock-Submenu
12
+ categoryUrlSuffix=".html"
13
+ handleCloseSubMenu={[MockFunction]}
14
+ isFocused={false}
15
+ items={
16
+ Array [
17
+ Object {
18
+ "children": Array [],
19
+ "id": 2,
20
+ "name": "Bottoms",
21
+ "url_path": "bottoms",
22
+ },
23
+ Object {
24
+ "children": Array [],
25
+ "id": 3,
26
+ "isActive": false,
27
+ "name": "Tops",
28
+ "url_path": "tops",
29
+ },
30
+ ]
31
+ }
32
+ mainNavWidth={200}
33
+ subMenuState="test"
34
+ />
35
+ </div>
36
+ `;
37
+
38
+ exports[`Mega menu item renders correctly it renders correctly 1`] = `
39
+ <div
40
+ className="megaMenuItem"
41
+ onFocus={[Function]}
42
+ onMouseEnter={[Function]}
43
+ onMouseLeave={[Function]}
44
+ onTouchStart={[Function]}
45
+ >
46
+ <mock-Submenu
47
+ categoryUrlSuffix=".html"
48
+ handleCloseSubMenu={[MockFunction]}
49
+ isFocused={false}
50
+ items={
51
+ Array [
52
+ Object {
53
+ "children": Array [],
54
+ "id": 2,
55
+ "name": "Bottoms",
56
+ "url_path": "bottoms",
57
+ },
58
+ Object {
59
+ "children": Array [],
60
+ "id": 3,
61
+ "isActive": false,
62
+ "name": "Tops",
63
+ "url_path": "tops",
64
+ },
65
+ ]
66
+ }
67
+ mainNavWidth={200}
68
+ subMenuState="test"
69
+ />
70
+ </div>
71
+ `;
@@ -0,0 +1,59 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Submenu renders correctly it renders correctly 1`] = `
4
+ <div
5
+ className="submenu_inactive"
6
+ >
7
+ <div
8
+ className="submenuItems"
9
+ style={
10
+ Object {
11
+ "minWidth": NaN,
12
+ }
13
+ }
14
+ >
15
+ <mock-SubmenuColumn
16
+ category={
17
+ Object {
18
+ "children": Array [
19
+ Object {
20
+ "children": Array [],
21
+ "id": 3,
22
+ "isActive": false,
23
+ "name": "Pants",
24
+ "url_path": "pants",
25
+ },
26
+ ],
27
+ "id": 1,
28
+ "name": "Bottoms",
29
+ "url_path": "bottoms",
30
+ }
31
+ }
32
+ categoryUrlSuffix=".html"
33
+ handleCloseSubMenu={[MockFunction handleCloseSubMenu]}
34
+ index={0}
35
+ keyboardProps={Object {}}
36
+ />
37
+ <mock-SubmenuColumn
38
+ category={
39
+ Object {
40
+ "children": Array [],
41
+ "id": 2,
42
+ "isActive": false,
43
+ "name": "Tops",
44
+ "url_path": "tops",
45
+ }
46
+ }
47
+ categoryUrlSuffix=".html"
48
+ handleCloseSubMenu={[MockFunction handleCloseSubMenu]}
49
+ index={1}
50
+ keyboardProps={
51
+ Object {
52
+ "onKeyDown": [Function],
53
+ "onKeyUp": undefined,
54
+ }
55
+ }
56
+ />
57
+ </div>
58
+ </div>
59
+ `;
@@ -0,0 +1,34 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Submenu column renders correctly it renders correctly 1`] = `
4
+ <div
5
+ className="submenuColumn"
6
+ >
7
+ <a
8
+ className="link"
9
+ href="/pants.html"
10
+ onClick={[Function]}
11
+ >
12
+ <span
13
+ className="heading"
14
+ >
15
+ Pants
16
+ </span>
17
+ </a>
18
+ <ul
19
+ className="submenuChild"
20
+ >
21
+ <li
22
+ className="submenuChildItem"
23
+ >
24
+ <a
25
+ className="linkActive"
26
+ href="/jeans.html"
27
+ onClick={[Function]}
28
+ >
29
+ Jeans
30
+ </a>
31
+ </li>
32
+ </ul>
33
+ </div>
34
+ `;