@magento/venia-ui 11.7.1 → 11.7.2-alpha3

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 (62) hide show
  1. package/lib/RootComponents/Category/__tests__/__snapshots__/category.spec.js.snap +2 -0
  2. package/lib/RootComponents/Category/__tests__/category.spec.js +2 -1
  3. package/lib/RootComponents/Category/category.gql.js +2 -0
  4. package/lib/RootComponents/Category/category.js +23 -3
  5. package/lib/RootComponents/Product/__tests__/product.spec.js +2 -1
  6. package/lib/RootComponents/Product/product.js +14 -3
  7. package/lib/components/AccountInformationPage/__tests__/__snapshots__/editForm.spec.js.snap +8 -0
  8. package/lib/components/AccountInformationPage/__tests__/__snapshots__/editModal.spec.js.snap +6 -0
  9. package/lib/components/AddToCartDialog/__tests__/__snapshots__/addToCartDialog.spec.js.snap +2 -0
  10. package/lib/components/AddressBookPage/__tests__/__snapshots__/addressBookPage.spec.js.snap +6 -0
  11. package/lib/components/AddressBookPage/__tests__/__snapshots__/addressCard.spec.js.snap +18 -0
  12. package/lib/components/App/__tests__/__snapshots__/app.spec.js.snap +5 -0
  13. package/lib/components/App/__tests__/app.spec.js +14 -1
  14. package/lib/components/App/app.js +3 -0
  15. package/lib/components/CartPage/GiftCards/__tests__/__snapshots__/giftCard.spec.js.snap +3 -0
  16. package/lib/components/CartPage/GiftCards/__tests__/__snapshots__/giftCards.spec.js.snap +12 -0
  17. package/lib/components/CartPage/PriceAdjustments/CouponCode/__tests__/__snapshots__/couponCode.spec.js.snap +8 -0
  18. package/lib/components/CartPage/PriceAdjustments/ShippingMethods/__tests__/__snapshots__/shippingForm.spec.js.snap +7 -0
  19. package/lib/components/CartPage/PriceAdjustments/ShippingMethods/__tests__/__snapshots__/shippingMethods.spec.js.snap +2 -0
  20. package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/priceSummary.spec.js.snap +3 -0
  21. package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +10 -0
  22. package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/product.spec.js.snap +8 -0
  23. package/lib/components/Checkout/Receipt/__tests__/__snapshots__/receipt.spec.js.snap +2 -0
  24. package/lib/components/Checkout/__tests__/__snapshots__/addressForm.spec.js.snap +8 -0
  25. package/lib/components/Checkout/__tests__/__snapshots__/checkoutButton.spec.js.snap +3 -0
  26. package/lib/components/Checkout/__tests__/__snapshots__/overview.spec.js.snap +9 -0
  27. package/lib/components/Checkout/__tests__/__snapshots__/paymentsForm.spec.js.snap +6 -0
  28. package/lib/components/Checkout/__tests__/__snapshots__/shippingform.spec.js.snap +8 -0
  29. package/lib/components/CheckoutPage/AddressBook/__tests__/__snapshots__/addressBook.spec.js.snap +10 -0
  30. package/lib/components/CheckoutPage/GuestSignIn/__tests__/__snapshots__/guestSignIn.spec.js.snap +6 -0
  31. package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/createAccount.spec.js.snap +8 -0
  32. package/lib/components/CheckoutPage/PaymentInformation/__tests__/__snapshots__/braintreeSummary.spec.js.snap +6 -0
  33. package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/customerForm.spec.js.snap +8 -0
  34. package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/guestForm.spec.js.snap +10 -0
  35. package/lib/components/CheckoutPage/ShippingInformation/__tests__/__snapshots__/shippingInformation.spec.js.snap +4 -0
  36. package/lib/components/CheckoutPage/ShippingMethod/__tests__/__snapshots__/completedView.spec.js.snap +4 -0
  37. package/lib/components/CheckoutPage/ShippingMethod/__tests__/__snapshots__/shippingMethod.spec.js.snap +3 -0
  38. package/lib/components/CheckoutPage/ShippingMethod/__tests__/__snapshots__/updateModal.spec.js.snap +7 -0
  39. package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +7 -0
  40. package/lib/components/CommunicationsPage/__tests__/__snapshots__/communicationsPage.spec.js.snap +7 -0
  41. package/lib/components/CreateAccount/__tests__/__snapshots__/createAccount.spec.js.snap +8 -0
  42. package/lib/components/Dialog/__tests__/__snapshots__/dialog.spec.js.snap +21 -0
  43. package/lib/components/ForgotPassword/ForgotPasswordForm/__tests__/__snapshots__/forgotPasswordForm.spec.js.snap +6 -0
  44. package/lib/components/Gallery/__tests__/__snapshots__/addToCartButton.spec.js.snap +5 -0
  45. package/lib/components/HomePage/homePage.module.css +0 -4
  46. package/lib/components/LegacyMiniCart/__tests__/__snapshots__/section.spec.js.snap +8 -0
  47. package/lib/components/MiniCart/__tests__/__snapshots__/miniCart.spec.js.snap +4 -0
  48. package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap +8 -0
  49. package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +2 -0
  50. package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/orderDetails.spec.js.snap +4 -0
  51. package/lib/components/OrderHistoryPage/__tests__/__snapshots__/orderHistoryPage.spec.js.snap +11 -0
  52. package/lib/components/Password/__tests__/__snapshots__/password.spec.js.snap +4 -0
  53. package/lib/components/ProductFullDetail/__tests__/__snapshots__/productFullDetail.spec.js.snap +23 -0
  54. package/lib/components/ProductImageCarousel/__tests__/__snapshots__/carousel.spec.js.snap +8 -0
  55. package/lib/components/ProductSort/__tests__/__snapshots__/productSort.spec.js.snap +2 -0
  56. package/lib/components/RobotsMeta/robotsMeta.gql.js +10 -0
  57. package/lib/components/RobotsMeta/robotsMeta.js +26 -0
  58. package/lib/components/SavedPaymentsPage/__tests__/__snapshots__/creditCard.spec.js.snap +9 -0
  59. package/lib/components/Wishlist/AddToListButton/__tests__/__snapshots__/addToListButton.ce.spec.js.snap +4 -0
  60. package/lib/components/Wishlist/AddToListButton/__tests__/__snapshots__/addToListButton.ee.spec.js.snap +6 -0
  61. package/lib/components/Wishlist/WishlistDialog/CreateWishlistForm/__tests__/__snapshots__/createWishlistForm.spec.js.snap +7 -0
  62. package/package.json +2 -2
@@ -62,6 +62,7 @@ exports[`Category Root Component error view renders when data is not present and
62
62
  </p>
63
63
  <div>
64
64
  <button
65
+ data-react-aria-pressable={true}
65
66
  disabled={false}
66
67
  onClick={[Function]}
67
68
  onDragStart={[Function]}
@@ -74,6 +75,7 @@ exports[`Category Root Component error view renders when data is not present and
74
75
  onTouchEnd={[Function]}
75
76
  onTouchMove={[Function]}
76
77
  onTouchStart={[Function]}
78
+ tabIndex={0}
77
79
  type="button"
78
80
  >
79
81
  <span>
@@ -10,7 +10,8 @@ jest.mock('@magento/peregrine/lib/talons/RootComponents/Category', () => ({
10
10
  jest.mock('../../../components/Head', () => ({
11
11
  HeadProvider: ({ children }) => <div>{children}</div>,
12
12
  StoreTitle: () => 'Title',
13
- Meta: () => 'Meta'
13
+ Meta: () => 'Meta',
14
+ Link: () => 'Link'
14
15
  }));
15
16
 
16
17
  jest.mock('../categoryContent', () => 'CategoryContent');
@@ -6,6 +6,8 @@ export const GET_PAGE_SIZE = gql`
6
6
  storeConfig {
7
7
  store_code
8
8
  grid_per_page
9
+ category_url_suffix
10
+ category_canonical_tag
9
11
  }
10
12
  }
11
13
  `;
@@ -1,11 +1,11 @@
1
- import React, { Fragment } from 'react';
1
+ import React, { Fragment, useMemo } from 'react';
2
2
  import { shape, string } from 'prop-types';
3
3
  import { useCategory } from '@magento/peregrine/lib/talons/RootComponents/Category';
4
4
  import { useStyle } from '../../classify';
5
5
 
6
6
  import CategoryContent from './categoryContent';
7
7
  import defaultClasses from './category.module.css';
8
- import { Meta } from '../../components/Head';
8
+ import { Meta, Link } from '../../components/Head';
9
9
  import { GET_PAGE_SIZE } from './category.gql';
10
10
  import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
11
11
  import { useIntl } from 'react-intl';
@@ -34,11 +34,30 @@ const Category = props => {
34
34
  pageControl,
35
35
  sortProps,
36
36
  pageSize,
37
- categoryNotFound
37
+ categoryNotFound,
38
+ storeConfig
38
39
  } = talonProps;
39
40
 
40
41
  const classes = useStyle(defaultClasses, props.classes);
41
42
 
43
+ // Generate canonical URL for category
44
+ const canonicalUrl = useMemo(() => {
45
+ if (!categoryData || !storeConfig?.category_canonical_tag) return null;
46
+
47
+ const category = categoryData.categories?.items?.[0];
48
+ if (!category) return null;
49
+
50
+ // Use url_path if available, otherwise fall back to url_key
51
+ const urlPath = category.url_path || category.url_key;
52
+ if (!urlPath) return null;
53
+
54
+ const origin =
55
+ typeof window !== 'undefined' ? window.location.origin : '';
56
+ const suffix = storeConfig?.category_url_suffix || '';
57
+
58
+ return `${origin}/${urlPath}${suffix}`;
59
+ }, [categoryData, storeConfig]);
60
+
42
61
  if (!categoryData) {
43
62
  if (error && pageControl.currentPage === 1) {
44
63
  if (process.env.NODE_ENV !== 'production') {
@@ -62,6 +81,7 @@ const Category = props => {
62
81
  return (
63
82
  <Fragment>
64
83
  <Meta name="description" content={metaDescription} />
84
+ {canonicalUrl && <Link rel="canonical" href={canonicalUrl} />}
65
85
  <CategoryContent
66
86
  categoryId={uid}
67
87
  classes={classes}
@@ -10,7 +10,8 @@ jest.mock('@magento/venia-ui/lib/components/ErrorView', () => 'ErrorView');
10
10
  jest.mock('@magento/venia-ui/lib/components/Head', () => ({
11
11
  __esModule: true,
12
12
  StoreTitle: jest.fn(() => 'StoreTitle'),
13
- Meta: jest.fn(() => 'Meta')
13
+ Meta: jest.fn(() => 'Meta'),
14
+ Link: jest.fn(() => 'Link')
14
15
  }));
15
16
  jest.mock(
16
17
  '@magento/venia-ui/lib/components/ProductFullDetail',
@@ -1,10 +1,10 @@
1
- import React, { Fragment } from 'react';
1
+ import React, { Fragment, useMemo } from 'react';
2
2
  import { FormattedMessage } from 'react-intl';
3
3
  import { string } from 'prop-types';
4
4
  import { useProduct } from '@magento/peregrine/lib/talons/RootComponents/Product/useProduct';
5
5
 
6
6
  import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
7
- import { StoreTitle, Meta } from '@magento/venia-ui/lib/components/Head';
7
+ import { StoreTitle, Meta, Link } from '@magento/venia-ui/lib/components/Head';
8
8
  import ProductFullDetail from '@magento/venia-ui/lib/components/ProductFullDetail';
9
9
  import mapProduct from '@magento/venia-ui/lib/util/mapProduct';
10
10
  import ProductShimmer from './product.shimmer';
@@ -23,7 +23,17 @@ const Product = props => {
23
23
  mapProduct
24
24
  });
25
25
 
26
- const { error, loading, product } = talonProps;
26
+ const { error, loading, product, storeConfig } = talonProps;
27
+
28
+ const canonicalUrl = useMemo(() => {
29
+ if (!product || !storeConfig?.product_canonical_tag) return null;
30
+
31
+ const origin =
32
+ typeof window !== 'undefined' ? window.location.origin : '';
33
+ const suffix = storeConfig?.product_url_suffix || '';
34
+
35
+ return `${origin}/${product.url_key}${suffix}`;
36
+ }, [product, storeConfig]);
27
37
 
28
38
  if (loading && !product)
29
39
  return <ProductShimmer productType={productType} />;
@@ -45,6 +55,7 @@ const Product = props => {
45
55
  <Fragment>
46
56
  <StoreTitle>{product.name}</StoreTitle>
47
57
  <Meta name="description" content={product.meta_description} />
58
+ {canonicalUrl && <Link rel="canonical" href={canonicalUrl} />}
48
59
  <ProductFullDetail product={product} />
49
60
  </Fragment>
50
61
  );
@@ -191,6 +191,7 @@ exports[`renders form when shouldShowNewPassword is false 1`] = `
191
191
  >
192
192
  <button
193
193
  className="passwordButton"
194
+ data-react-aria-pressable={true}
194
195
  disabled={false}
195
196
  onClick={[Function]}
196
197
  onDragStart={[Function]}
@@ -203,6 +204,7 @@ exports[`renders form when shouldShowNewPassword is false 1`] = `
203
204
  onTouchEnd={[Function]}
204
205
  onTouchMove={[Function]}
205
206
  onTouchStart={[Function]}
207
+ tabIndex={0}
206
208
  type="button"
207
209
  >
208
210
  <span
@@ -245,6 +247,7 @@ exports[`renders form when shouldShowNewPassword is false 1`] = `
245
247
  >
246
248
  <button
247
249
  className="root_normalPriority"
250
+ data-react-aria-pressable={true}
248
251
  disabled={false}
249
252
  onClick={[MockFunction]}
250
253
  onDragStart={[Function]}
@@ -257,6 +260,7 @@ exports[`renders form when shouldShowNewPassword is false 1`] = `
257
260
  onTouchEnd={[Function]}
258
261
  onTouchMove={[Function]}
259
262
  onTouchStart={[Function]}
263
+ tabIndex={0}
260
264
  type="button"
261
265
  >
262
266
  <span
@@ -463,6 +467,7 @@ exports[`renders form when shouldShowNewPassword is true 1`] = `
463
467
  >
464
468
  <button
465
469
  className="passwordButton"
470
+ data-react-aria-pressable={true}
466
471
  disabled={false}
467
472
  onClick={[Function]}
468
473
  onDragStart={[Function]}
@@ -475,6 +480,7 @@ exports[`renders form when shouldShowNewPassword is true 1`] = `
475
480
  onTouchEnd={[Function]}
476
481
  onTouchMove={[Function]}
477
482
  onTouchStart={[Function]}
483
+ tabIndex={0}
478
484
  type="button"
479
485
  >
480
486
  <span
@@ -554,6 +560,7 @@ exports[`renders form when shouldShowNewPassword is true 1`] = `
554
560
  >
555
561
  <button
556
562
  className="passwordButton"
563
+ data-react-aria-pressable={true}
557
564
  disabled={false}
558
565
  onClick={[Function]}
559
566
  onDragStart={[Function]}
@@ -566,6 +573,7 @@ exports[`renders form when shouldShowNewPassword is true 1`] = `
566
573
  onTouchEnd={[Function]}
567
574
  onTouchMove={[Function]}
568
575
  onTouchStart={[Function]}
576
+ tabIndex={0}
569
577
  type="button"
570
578
  >
571
579
  <span
@@ -78,6 +78,7 @@ exports[`it disables the submit button while loading 1`] = `
78
78
  >
79
79
  <button
80
80
  className="root_lowPriority"
81
+ data-react-aria-pressable={true}
81
82
  disabled={true}
82
83
  onClick={[MockFunction onCancel]}
83
84
  onDragStart={[Function]}
@@ -103,6 +104,7 @@ exports[`it disables the submit button while loading 1`] = `
103
104
  </button>
104
105
  <button
105
106
  className="root_highPriority"
107
+ data-react-aria-pressable={true}
106
108
  disabled={true}
107
109
  onClick={[Function]}
108
110
  onDragStart={[Function]}
@@ -212,6 +214,7 @@ exports[`it renders correctly 1`] = `
212
214
  >
213
215
  <button
214
216
  className="root_lowPriority"
217
+ data-react-aria-pressable={true}
215
218
  disabled={false}
216
219
  onClick={[MockFunction onCancel]}
217
220
  onDragStart={[Function]}
@@ -224,6 +227,7 @@ exports[`it renders correctly 1`] = `
224
227
  onTouchEnd={[Function]}
225
228
  onTouchMove={[Function]}
226
229
  onTouchStart={[Function]}
230
+ tabIndex={0}
227
231
  type="reset"
228
232
  >
229
233
  <span
@@ -237,6 +241,7 @@ exports[`it renders correctly 1`] = `
237
241
  </button>
238
242
  <button
239
243
  className="root_highPriority"
244
+ data-react-aria-pressable={true}
240
245
  disabled={false}
241
246
  onClick={[Function]}
242
247
  onDragStart={[Function]}
@@ -249,6 +254,7 @@ exports[`it renders correctly 1`] = `
249
254
  onTouchEnd={[Function]}
250
255
  onTouchMove={[Function]}
251
256
  onTouchStart={[Function]}
257
+ tabIndex={0}
252
258
  type="submit"
253
259
  >
254
260
  <span
@@ -68,6 +68,7 @@ exports[`renders dialog with content 1`] = `
68
68
  />
69
69
  <button
70
70
  className="root_normalPriority"
71
+ data-react-aria-pressable={true}
71
72
  disabled={false}
72
73
  onClick={[MockFunction buttonProps.onClick]}
73
74
  onDragStart={[Function]}
@@ -80,6 +81,7 @@ exports[`renders dialog with content 1`] = `
80
81
  onTouchEnd={[Function]}
81
82
  onTouchMove={[Function]}
82
83
  onTouchStart={[Function]}
84
+ tabIndex={0}
83
85
  type="button"
84
86
  >
85
87
  <span
@@ -65,6 +65,7 @@ exports[`renders correctly when there are existing addresses 1`] = `
65
65
  />
66
66
  <button
67
67
  className="addButton"
68
+ data-react-aria-pressable={true}
68
69
  disabled={false}
69
70
  onClick={[MockFunction handleAddAddress]}
70
71
  onDragStart={[Function]}
@@ -77,6 +78,7 @@ exports[`renders correctly when there are existing addresses 1`] = `
77
78
  onTouchEnd={[Function]}
78
79
  onTouchMove={[Function]}
79
80
  onTouchStart={[Function]}
81
+ tabIndex={0}
80
82
  type="button"
81
83
  >
82
84
  <span
@@ -143,6 +145,7 @@ exports[`renders correctly when there are no existing addresses 1`] = `
143
145
  >
144
146
  <button
145
147
  className="addButton"
148
+ data-react-aria-pressable={true}
146
149
  disabled={false}
147
150
  onClick={[MockFunction handleAddAddress]}
148
151
  onDragStart={[Function]}
@@ -155,6 +158,7 @@ exports[`renders correctly when there are no existing addresses 1`] = `
155
158
  onTouchEnd={[Function]}
156
159
  onTouchMove={[Function]}
157
160
  onTouchStart={[Function]}
161
+ tabIndex={0}
158
162
  type="button"
159
163
  >
160
164
  <span
@@ -266,6 +270,7 @@ exports[`renders delete confirmation on address that is being deleted 1`] = `
266
270
  />
267
271
  <button
268
272
  className="addButton"
273
+ data-react-aria-pressable={true}
269
274
  disabled={false}
270
275
  onClick={[MockFunction handleAddAddress]}
271
276
  onDragStart={[Function]}
@@ -278,6 +283,7 @@ exports[`renders delete confirmation on address that is being deleted 1`] = `
278
283
  onTouchEnd={[Function]}
279
284
  onTouchMove={[Function]}
280
285
  onTouchStart={[Function]}
286
+ tabIndex={0}
281
287
  type="button"
282
288
  >
283
289
  <span
@@ -59,6 +59,7 @@ exports[`renders a default address 1`] = `
59
59
  >
60
60
  <button
61
61
  className="root_normalPriority"
62
+ data-react-aria-pressable={true}
62
63
  disabled={false}
63
64
  onClick={[MockFunction onEdit]}
64
65
  onDragStart={[Function]}
@@ -71,6 +72,7 @@ exports[`renders a default address 1`] = `
71
72
  onTouchEnd={[Function]}
72
73
  onTouchMove={[Function]}
73
74
  onTouchStart={[Function]}
75
+ tabIndex={0}
74
76
  type="button"
75
77
  >
76
78
  <span
@@ -161,6 +163,7 @@ exports[`renders a non-default address 1`] = `
161
163
  >
162
164
  <button
163
165
  className="root_normalPriority"
166
+ data-react-aria-pressable={true}
164
167
  disabled={false}
165
168
  onClick={[MockFunction onEdit]}
166
169
  onDragStart={[Function]}
@@ -173,6 +176,7 @@ exports[`renders a non-default address 1`] = `
173
176
  onTouchEnd={[Function]}
174
177
  onTouchMove={[Function]}
175
178
  onTouchStart={[Function]}
179
+ tabIndex={0}
176
180
  type="button"
177
181
  >
178
182
  <span
@@ -210,6 +214,7 @@ exports[`renders a non-default address 1`] = `
210
214
  </button>
211
215
  <button
212
216
  className="root_normalPriority"
217
+ data-react-aria-pressable={true}
213
218
  disabled={false}
214
219
  onClick={[MockFunction onDelete]}
215
220
  onDragStart={[Function]}
@@ -222,6 +227,7 @@ exports[`renders a non-default address 1`] = `
222
227
  onTouchEnd={[Function]}
223
228
  onTouchMove={[Function]}
224
229
  onTouchStart={[Function]}
230
+ tabIndex={0}
225
231
  type="button"
226
232
  >
227
233
  <span
@@ -335,6 +341,7 @@ exports[`renders an address with a middle name 1`] = `
335
341
  >
336
342
  <button
337
343
  className="root_normalPriority"
344
+ data-react-aria-pressable={true}
338
345
  disabled={false}
339
346
  onClick={[MockFunction onEdit]}
340
347
  onDragStart={[Function]}
@@ -347,6 +354,7 @@ exports[`renders an address with a middle name 1`] = `
347
354
  onTouchEnd={[Function]}
348
355
  onTouchMove={[Function]}
349
356
  onTouchStart={[Function]}
357
+ tabIndex={0}
350
358
  type="button"
351
359
  >
352
360
  <span
@@ -445,6 +453,7 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
445
453
  >
446
454
  <button
447
455
  className="root_normalPriority"
456
+ data-react-aria-pressable={true}
448
457
  disabled={false}
449
458
  onClick={[MockFunction onEdit]}
450
459
  onDragStart={[Function]}
@@ -457,6 +466,7 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
457
466
  onTouchEnd={[Function]}
458
467
  onTouchMove={[Function]}
459
468
  onTouchStart={[Function]}
469
+ tabIndex={0}
460
470
  type="button"
461
471
  >
462
472
  <span
@@ -497,6 +507,7 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
497
507
  >
498
508
  <button
499
509
  className="root_normalPriorityNegative"
510
+ data-react-aria-pressable={true}
500
511
  disabled={false}
501
512
  onClick={[MockFunction onConfirmDelete]}
502
513
  onDragStart={[Function]}
@@ -509,6 +520,7 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
509
520
  onTouchEnd={[Function]}
510
521
  onTouchMove={[Function]}
511
522
  onTouchStart={[Function]}
523
+ tabIndex={0}
512
524
  type="button"
513
525
  >
514
526
  <span
@@ -522,6 +534,7 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
522
534
  </button>
523
535
  <button
524
536
  className="root_lowPriority"
537
+ data-react-aria-pressable={true}
525
538
  disabled={false}
526
539
  onClick={[MockFunction onCancelDelete]}
527
540
  onDragStart={[Function]}
@@ -534,6 +547,7 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
534
547
  onTouchEnd={[Function]}
535
548
  onTouchMove={[Function]}
536
549
  onTouchStart={[Function]}
550
+ tabIndex={0}
537
551
  type="button"
538
552
  >
539
553
  <span
@@ -609,6 +623,7 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
609
623
  >
610
624
  <button
611
625
  className="root_normalPriority"
626
+ data-react-aria-pressable={true}
612
627
  disabled={false}
613
628
  onClick={[MockFunction onEdit]}
614
629
  onDragStart={[Function]}
@@ -621,6 +636,7 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
621
636
  onTouchEnd={[Function]}
622
637
  onTouchMove={[Function]}
623
638
  onTouchStart={[Function]}
639
+ tabIndex={0}
624
640
  type="button"
625
641
  >
626
642
  <span
@@ -661,6 +677,7 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
661
677
  >
662
678
  <button
663
679
  className="root_normalPriorityNegative"
680
+ data-react-aria-pressable={true}
664
681
  disabled={true}
665
682
  onClick={[MockFunction onConfirmDelete]}
666
683
  onDragStart={[Function]}
@@ -686,6 +703,7 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
686
703
  </button>
687
704
  <button
688
705
  className="root_lowPriority"
706
+ data-react-aria-pressable={true}
689
707
  disabled={true}
690
708
  onClick={[MockFunction onCancelDelete]}
691
709
  onDragStart={[Function]}
@@ -2,6 +2,9 @@
2
2
 
3
3
  exports[`displays open nav or drawer 1`] = `
4
4
  <div>
5
+ <div
6
+ data-testid="robots-meta"
7
+ />
5
8
  Title
6
9
  <Main
7
10
  isMasked={false}
@@ -18,6 +21,7 @@ exports[`displays open nav or drawer 1`] = `
18
21
 
19
22
  exports[`renders with renderErrors 1`] = `
20
23
  <HeadProvider>
24
+ <Unknown />
21
25
  <StoreTitle />
22
26
  <Main
23
27
  isMasked={true}
@@ -31,6 +35,7 @@ exports[`renders with renderErrors 1`] = `
31
35
 
32
36
  exports[`renders with unhandledErrors 1`] = `
33
37
  <HeadProvider>
38
+ <Unknown />
34
39
  <StoreTitle />
35
40
  <Main
36
41
  isMasked={false}
@@ -3,7 +3,6 @@ import ShallowRenderer from 'react-test-renderer/shallow';
3
3
  import { useHistory } from 'react-router-dom';
4
4
  import { createTestInstance } from '@magento/peregrine';
5
5
  import { useAppContext } from '@magento/peregrine/lib/context/app';
6
-
7
6
  import Main from '../../Main';
8
7
  import Mask from '../../Mask';
9
8
  import Routes from '../../Routes';
@@ -14,6 +13,9 @@ jest.mock('../../Head', () => ({
14
13
  HeadProvider: ({ children }) => <div>{children}</div>,
15
14
  StoreTitle: () => 'Title'
16
15
  }));
16
+ jest.mock('../../RobotsMeta/robotsMeta', () => () => (
17
+ <div data-testid="robots-meta" />
18
+ ));
17
19
  jest.mock('../../Main', () => 'Main');
18
20
  jest.mock('../../Navigation', () => 'Navigation');
19
21
  jest.mock('../../Routes', () => 'Routes');
@@ -176,6 +178,17 @@ afterEach(() => {
176
178
  globalThis.location = oldWindowLocation;
177
179
  });
178
180
 
181
+ test('renders RobotsMeta component', () => {
182
+ const appProps = {
183
+ markErrorHandled: jest.fn(),
184
+ unhandledErrors: []
185
+ };
186
+
187
+ const { root } = createTestInstance(<App {...appProps} />);
188
+
189
+ expect(root.findByProps({ 'data-testid': 'robots-meta' })).toBeTruthy();
190
+ });
191
+
179
192
  test('renders a full page with onlineIndicator and routes', () => {
180
193
  const [appState, appApi] = useAppContext();
181
194
  const mockedReturnValue = [
@@ -11,6 +11,7 @@ import { HeadProvider, StoreTitle } from '../Head';
11
11
  import Main from '../Main';
12
12
  import Mask from '../Mask';
13
13
  import Navigation from '../Navigation';
14
+ import RobotsMeta from '../RobotsMeta/robotsMeta';
14
15
  import Routes from '../Routes';
15
16
  import ToastContainer from '../ToastContainer';
16
17
  import Icon from '../Icon';
@@ -93,6 +94,7 @@ const App = props => {
93
94
  if (renderError) {
94
95
  return (
95
96
  <HeadProvider>
97
+ <RobotsMeta />
96
98
  <StoreTitle />
97
99
  <Main isMasked={true} />
98
100
  <Mask isActive={true} />
@@ -103,6 +105,7 @@ const App = props => {
103
105
 
104
106
  return (
105
107
  <HeadProvider>
108
+ <RobotsMeta />
106
109
  <StoreTitle />
107
110
  <Main isMasked={hasOverlay}>
108
111
  <Routes />
@@ -26,6 +26,7 @@ Array [
26
26
  </span>
27
27
  </div>,
28
28
  <button
29
+ data-react-aria-pressable={true}
29
30
  disabled={true}
30
31
  onClick={[MockFunction]}
31
32
  onDragStart={[Function]}
@@ -76,6 +77,7 @@ Array [
76
77
  </span>
77
78
  </div>,
78
79
  <button
80
+ data-react-aria-pressable={true}
79
81
  disabled={false}
80
82
  onClick={[MockFunction]}
81
83
  onDragStart={[Function]}
@@ -88,6 +90,7 @@ Array [
88
90
  onTouchEnd={[Function]}
89
91
  onTouchMove={[Function]}
90
92
  onTouchStart={[Function]}
93
+ tabIndex={0}
91
94
  type="button"
92
95
  >
93
96
  <span>
@@ -82,6 +82,7 @@ exports[`it renders correctly when it has cards 1`] = `
82
82
  />
83
83
  <button
84
84
  className="root_normalPriority"
85
+ data-react-aria-pressable={true}
85
86
  disabled={false}
86
87
  onClick={[MockFunction]}
87
88
  onDragStart={[Function]}
@@ -93,6 +94,7 @@ exports[`it renders correctly when it has cards 1`] = `
93
94
  onTouchEnd={[Function]}
94
95
  onTouchMove={[Function]}
95
96
  onTouchStart={[Function]}
97
+ tabIndex={0}
96
98
  type="button"
97
99
  >
98
100
  <span
@@ -107,6 +109,7 @@ exports[`it renders correctly when it has cards 1`] = `
107
109
  </div>
108
110
  <button
109
111
  className="check_balance_button"
112
+ data-react-aria-pressable={true}
110
113
  disabled={false}
111
114
  onClick={[MockFunction]}
112
115
  onDragStart={[Function]}
@@ -118,6 +121,7 @@ exports[`it renders correctly when it has cards 1`] = `
118
121
  onTouchEnd={[Function]}
119
122
  onTouchMove={[Function]}
120
123
  onTouchStart={[Function]}
124
+ tabIndex={0}
121
125
  type="button"
122
126
  >
123
127
  <span
@@ -165,6 +169,7 @@ exports[`it renders correctly when it has cards 1`] = `
165
169
  </div>
166
170
  <button
167
171
  className="root_normalPriority"
172
+ data-react-aria-pressable={true}
168
173
  disabled={false}
169
174
  onClick={[Function]}
170
175
  onDragStart={[Function]}
@@ -177,6 +182,7 @@ exports[`it renders correctly when it has cards 1`] = `
177
182
  onTouchEnd={[Function]}
178
183
  onTouchMove={[Function]}
179
184
  onTouchStart={[Function]}
185
+ tabIndex={0}
180
186
  type="button"
181
187
  >
182
188
  <span
@@ -219,6 +225,7 @@ exports[`it renders correctly when it has cards 1`] = `
219
225
  </div>
220
226
  <button
221
227
  className="root_normalPriority"
228
+ data-react-aria-pressable={true}
222
229
  disabled={false}
223
230
  onClick={[Function]}
224
231
  onDragStart={[Function]}
@@ -231,6 +238,7 @@ exports[`it renders correctly when it has cards 1`] = `
231
238
  onTouchEnd={[Function]}
232
239
  onTouchMove={[Function]}
233
240
  onTouchStart={[Function]}
241
+ tabIndex={0}
234
242
  type="button"
235
243
  >
236
244
  <span
@@ -329,6 +337,7 @@ exports[`it renders correctly with no cards 1`] = `
329
337
  />
330
338
  <button
331
339
  className="root_normalPriority"
340
+ data-react-aria-pressable={true}
332
341
  disabled={false}
333
342
  onClick={[MockFunction]}
334
343
  onDragStart={[Function]}
@@ -340,6 +349,7 @@ exports[`it renders correctly with no cards 1`] = `
340
349
  onTouchEnd={[Function]}
341
350
  onTouchMove={[Function]}
342
351
  onTouchStart={[Function]}
352
+ tabIndex={0}
343
353
  type="button"
344
354
  >
345
355
  <span
@@ -354,6 +364,7 @@ exports[`it renders correctly with no cards 1`] = `
354
364
  </div>
355
365
  <button
356
366
  className="check_balance_button"
367
+ data-react-aria-pressable={true}
357
368
  disabled={false}
358
369
  onClick={[MockFunction]}
359
370
  onDragStart={[Function]}
@@ -365,6 +376,7 @@ exports[`it renders correctly with no cards 1`] = `
365
376
  onTouchEnd={[Function]}
366
377
  onTouchMove={[Function]}
367
378
  onTouchStart={[Function]}
379
+ tabIndex={0}
368
380
  type="button"
369
381
  >
370
382
  <span