@skyscanner/backpack-web 10.0.0 → 11.1.1

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 (211) hide show
  1. package/bpk-animate-height/package.json +3 -3
  2. package/bpk-component-accordion/package.json +8 -8
  3. package/bpk-component-accordion/src/BpkAccordion.module.scss +1 -1
  4. package/bpk-component-accordion/src/BpkAccordionItem.module.scss +1 -1
  5. package/bpk-component-aria-live/{index.ts → index.js} +0 -0
  6. package/bpk-component-aria-live/package.json +9 -9
  7. package/bpk-component-aria-live/src/{BpkAriaLive.tsx → BpkAriaLive.js} +15 -8
  8. package/bpk-component-aria-live/src/BpkAriaLive.module.scss +1 -1
  9. package/bpk-component-autosuggest/package.json +5 -5
  10. package/bpk-component-autosuggest/src/BpkAutosuggest.module.scss +2 -2
  11. package/bpk-component-badge/package.json +6 -6
  12. package/bpk-component-badge/src/BpkBadge.module.scss +1 -1
  13. package/bpk-component-banner-alert/package.json +10 -10
  14. package/bpk-component-banner-alert/src/BpkAnimateAndFade.module.scss +1 -1
  15. package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +3 -3
  16. package/bpk-component-barchart/package.json +9 -9
  17. package/bpk-component-barchart/src/BpkBarchartBar.module.scss +3 -1
  18. package/bpk-component-barchart/src/BpkChartAxis.module.scss +1 -1
  19. package/bpk-component-barchart/src/BpkChartDataTable.module.scss +1 -1
  20. package/bpk-component-barchart/src/BpkChartGridLines.module.scss +2 -2
  21. package/bpk-component-blockquote/package.json +3 -3
  22. package/bpk-component-blockquote/src/BpkBlockquote.module.scss +1 -1
  23. package/bpk-component-breadcrumb/package.json +6 -6
  24. package/bpk-component-breadcrumb/src/BpkBreadcrumb.module.scss +1 -1
  25. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.scss +1 -1
  26. package/bpk-component-breakpoint/package.json +4 -4
  27. package/bpk-component-button/package.json +3 -3
  28. package/bpk-component-button/src/BpkButtonBase.module.scss +2 -2
  29. package/bpk-component-button/src/BpkButtonDestructive.module.scss +1 -1
  30. package/bpk-component-button/src/BpkButtonFeatured.module.scss +1 -1
  31. package/bpk-component-button/src/BpkButtonLink.module.scss +1 -1
  32. package/bpk-component-button/src/BpkButtonLinkOnDark.module.scss +1 -1
  33. package/bpk-component-button/src/BpkButtonOutline.module.scss +1 -1
  34. package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.scss +1 -1
  35. package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.scss +1 -1
  36. package/bpk-component-button/src/BpkButtonSecondary.module.scss +1 -1
  37. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.scss +1 -1
  38. package/bpk-component-calendar/package.json +10 -10
  39. package/bpk-component-calendar/src/BpkCalendar.module.scss +2 -2
  40. package/bpk-component-calendar/src/BpkCalendarDate.module.scss +1 -1
  41. package/bpk-component-calendar/src/BpkCalendarGrid.module.scss +3 -2
  42. package/bpk-component-calendar/src/BpkCalendarGridHeader.module.scss +2 -2
  43. package/bpk-component-calendar/src/BpkCalendarGridTransition.module.scss +2 -2
  44. package/bpk-component-calendar/src/BpkCalendarNav.module.scss +3 -3
  45. package/bpk-component-calendar/src/_variables.scss +1 -1
  46. package/bpk-component-card/package.json +5 -5
  47. package/bpk-component-card/src/BpkCard.module.scss +1 -1
  48. package/bpk-component-checkbox/package.json +6 -6
  49. package/bpk-component-checkbox/src/BpkCheckbox.module.scss +1 -1
  50. package/bpk-component-chip/package.json +6 -6
  51. package/bpk-component-chip/src/BpkSelectableChip.module.scss +1 -1
  52. package/bpk-component-close-button/package.json +5 -5
  53. package/bpk-component-close-button/src/BpkCloseButton.module.scss +3 -2
  54. package/bpk-component-code/package.json +3 -3
  55. package/bpk-component-code/src/BpkCode.module.scss +1 -1
  56. package/bpk-component-code/src/BpkCodeBlock.module.scss +1 -1
  57. package/bpk-component-content-cards/{index.ts → index.js} +0 -0
  58. package/bpk-component-content-cards/package.json +5 -5
  59. package/bpk-component-content-cards/src/{BpkContentCard.tsx → BpkContentCard.js} +8 -9
  60. package/bpk-component-content-cards/src/BpkContentCard.module.scss +1 -1
  61. package/bpk-component-content-cards/src/{BpkContentCards.tsx → BpkContentCards.js} +11 -11
  62. package/bpk-component-content-cards/src/BpkContentCards.module.scss +1 -1
  63. package/bpk-component-content-container/package.json +3 -3
  64. package/bpk-component-content-container/src/BpkContentContainer.module.scss +1 -1
  65. package/bpk-component-datatable/package.json +5 -5
  66. package/bpk-component-datatable/src/BpkDataTable.module.scss +1 -2
  67. package/bpk-component-datatable/src/BpkDataTableHeader.module.scss +1 -2
  68. package/bpk-component-datepicker/package.json +10 -10
  69. package/bpk-component-datepicker/src/BpkDatepicker.module.scss +1 -1
  70. package/bpk-component-description-list/package.json +3 -3
  71. package/bpk-component-description-list/src/BpkDescriptionList.module.scss +1 -1
  72. package/bpk-component-dialog/package.json +9 -9
  73. package/bpk-component-dialog/src/BpkDialog.module.scss +1 -1
  74. package/bpk-component-dialog/src/BpkDialogInner.module.scss +3 -1
  75. package/bpk-component-drawer/package.json +10 -10
  76. package/bpk-component-drawer/src/BpkDrawer.module.scss +1 -1
  77. package/bpk-component-drawer/src/BpkDrawerContent.module.scss +1 -1
  78. package/bpk-component-fieldset/package.json +13 -13
  79. package/bpk-component-fieldset/src/BpkFieldset.module.scss +2 -2
  80. package/bpk-component-flare/package.json +5 -5
  81. package/bpk-component-flare/src/bpk-content-bubble.module.scss +2 -1
  82. package/bpk-component-flare/src/bpk-flare-bar.module.scss +2 -1
  83. package/bpk-component-floating-notification/README.md +0 -8
  84. package/bpk-component-floating-notification/index.js +0 -2
  85. package/bpk-component-floating-notification/package.json +6 -6
  86. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +7 -26
  87. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.scss +5 -18
  88. package/bpk-component-form-validation/package.json +11 -11
  89. package/bpk-component-form-validation/src/BpkFormValidation.module.scss +1 -1
  90. package/bpk-component-graphic-promotion/{index.ts → index.js} +0 -0
  91. package/bpk-component-graphic-promotion/package.json +6 -6
  92. package/bpk-component-graphic-promotion/src/{BpkGraphicPromo.tsx → BpkGraphicPromo.js} +26 -16
  93. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.scss +1 -1
  94. package/bpk-component-grid/package.json +3 -3
  95. package/bpk-component-grid/src/BpkGridColumn.module.scss +1 -1
  96. package/bpk-component-grid/src/BpkGridContainer.module.scss +1 -1
  97. package/bpk-component-grid/src/BpkGridRow.module.scss +1 -1
  98. package/bpk-component-grid-toggle/package.json +4 -4
  99. package/bpk-component-grid-toggle/src/BpkGridToggle.module.scss +1 -1
  100. package/bpk-component-horizontal-nav/package.json +7 -7
  101. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.scss +3 -3
  102. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.module.scss +15 -15
  103. package/bpk-component-icon/README.md +1 -1
  104. package/bpk-component-icon/package.json +8 -8
  105. package/bpk-component-icon/src/BpkIcon.module.scss +1 -1
  106. package/bpk-component-icon/src/withDescription.module.scss +1 -1
  107. package/bpk-component-image/package.json +7 -7
  108. package/bpk-component-image/src/BpkBackgroundImage.module.scss +1 -1
  109. package/bpk-component-image/src/BpkImage.module.scss +1 -1
  110. package/bpk-component-infinite-scroll/package.json +7 -7
  111. package/bpk-component-infinite-scroll/src/withInfiniteScroll.module.scss +1 -1
  112. package/bpk-component-input/package.json +7 -7
  113. package/bpk-component-input/src/BpkClearButton.module.scss +5 -5
  114. package/bpk-component-input/src/BpkInput.module.scss +1 -1
  115. package/bpk-component-label/package.json +3 -3
  116. package/bpk-component-label/src/BpkLabel.module.scss +1 -1
  117. package/bpk-component-link/package.json +5 -5
  118. package/bpk-component-link/src/BpkLink.module.scss +1 -1
  119. package/bpk-component-list/package.json +3 -3
  120. package/bpk-component-list/src/BpkList.module.scss +1 -1
  121. package/bpk-component-loading-button/package.json +7 -7
  122. package/bpk-component-loading-button/src/BpkLoadingButton.module.scss +1 -1
  123. package/bpk-component-map/package.json +7 -7
  124. package/bpk-component-map/src/BpkIconMarker.module.scss +3 -2
  125. package/bpk-component-map/src/BpkIconMarkerBackground.module.scss +1 -1
  126. package/bpk-component-map/src/BpkMap.js +1 -0
  127. package/bpk-component-map/src/BpkPriceMarker.module.scss +3 -1
  128. package/bpk-component-map/src/DefaultLoadingElement.module.scss +1 -1
  129. package/bpk-component-mobile-scroll-container/README.md +1 -1
  130. package/bpk-component-mobile-scroll-container/package.json +4 -4
  131. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.module.scss +3 -1
  132. package/bpk-component-modal/package.json +10 -10
  133. package/bpk-component-modal/src/BpkModal.module.scss +1 -1
  134. package/bpk-component-modal/src/BpkModalInner.module.scss +3 -1
  135. package/bpk-component-navigation-bar/package.json +9 -9
  136. package/bpk-component-navigation-bar/src/BpkNavigationBar.module.scss +4 -4
  137. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.scss +5 -5
  138. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.module.scss +4 -4
  139. package/bpk-component-nudger/package.json +8 -8
  140. package/bpk-component-nudger/src/BpkNudger.module.scss +1 -1
  141. package/bpk-component-overlay/package.json +5 -5
  142. package/bpk-component-overlay/src/BpkOverlay.module.scss +1 -1
  143. package/bpk-component-pagination/package.json +5 -5
  144. package/bpk-component-pagination/src/BpkPaginationList.module.scss +1 -1
  145. package/bpk-component-pagination/src/BpkPaginationNudger.module.scss +2 -2
  146. package/bpk-component-pagination/src/BpkPaginationPage.module.scss +1 -1
  147. package/bpk-component-panel/package.json +3 -3
  148. package/bpk-component-panel/src/BpkPanel.module.scss +1 -1
  149. package/bpk-component-phone-input/package.json +10 -10
  150. package/bpk-component-phone-input/src/BpkPhoneInput.module.scss +1 -1
  151. package/bpk-component-popover/package.json +9 -9
  152. package/bpk-component-popover/src/BpkPopover.module.scss +1 -2
  153. package/bpk-component-price/package.json +4 -4
  154. package/bpk-component-price/src/BpkPrice.module.scss +1 -1
  155. package/bpk-component-progress/package.json +6 -6
  156. package/bpk-component-progress/src/BpkProgress.module.scss +1 -1
  157. package/bpk-component-radio/package.json +5 -5
  158. package/bpk-component-radio/src/BpkRadio.module.scss +1 -2
  159. package/bpk-component-rating/package.json +5 -5
  160. package/bpk-component-rating/src/BpkRating.module.scss +1 -1
  161. package/bpk-component-rtl-toggle/package.json +3 -3
  162. package/bpk-component-scrollable-calendar/package.json +7 -7
  163. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.module.scss +1 -1
  164. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.module.scss +1 -2
  165. package/bpk-component-section-list/package.json +7 -7
  166. package/bpk-component-section-list/src/BpkSectionListItem.module.scss +1 -1
  167. package/bpk-component-section-list/src/BpkSectionListSection.module.scss +1 -1
  168. package/bpk-component-select/package.json +4 -4
  169. package/bpk-component-select/src/BpkSelect.module.scss +1 -1
  170. package/bpk-component-skip-link/package.json +3 -3
  171. package/bpk-component-skip-link/src/BpkSkipLink.module.scss +2 -1
  172. package/bpk-component-slider/package.json +5 -5
  173. package/bpk-component-slider/src/BpkSlider.module.scss +1 -2
  174. package/bpk-component-spinner/package.json +4 -4
  175. package/bpk-component-spinner/src/BpkSpinner.module.scss +1 -1
  176. package/bpk-component-split-input/package.json +4 -4
  177. package/bpk-component-split-input/src/BpkInputField.module.scss +1 -1
  178. package/bpk-component-split-input/src/BpkSplitInput.module.scss +1 -1
  179. package/bpk-component-star-rating/package.json +6 -6
  180. package/bpk-component-star-rating/src/BpkInteractiveStar.module.scss +3 -3
  181. package/bpk-component-star-rating/src/BpkStar.module.scss +1 -1
  182. package/bpk-component-switch/README.md +1 -1
  183. package/bpk-component-switch/package.json +3 -3
  184. package/bpk-component-switch/src/BpkSwitch.js +14 -13
  185. package/bpk-component-switch/src/BpkSwitch.module.scss +18 -12
  186. package/bpk-component-table/package.json +3 -3
  187. package/bpk-component-table/src/BpkTable.module.scss +1 -1
  188. package/bpk-component-text/package.json +3 -3
  189. package/bpk-component-text/src/BpkText.module.scss +1 -1
  190. package/bpk-component-textarea/package.json +5 -5
  191. package/bpk-component-textarea/src/BpkTextarea.module.scss +1 -1
  192. package/bpk-component-theme-toggle/package.json +6 -6
  193. package/bpk-component-theme-toggle/src/BpkThemeToggle.module.scss +1 -1
  194. package/bpk-component-ticket/package.json +5 -5
  195. package/bpk-component-ticket/src/BpkTicket.module.scss +1 -1
  196. package/bpk-component-tooltip/package.json +5 -5
  197. package/bpk-component-tooltip/src/BpkTooltip.module.scss +3 -2
  198. package/bpk-react-utils/README.md +1 -1
  199. package/bpk-react-utils/package.json +1 -1
  200. package/bpk-scrim-utils/package.json +3 -3
  201. package/bpk-scrim-utils/src/bpk-scrim-content.module.scss +1 -1
  202. package/bpk-scrim-utils/src/bpk-scrim.module.scss +1 -1
  203. package/bpk-theming/package.json +2 -2
  204. package/package.json +4 -4
  205. package/bpk-component-aria-live/src/BpkAriaLive-test.tsx +0 -60
  206. package/bpk-component-aria-live/src/accessibility-test.tsx +0 -31
  207. package/bpk-component-content-cards/src/BpkContentCard-test.tsx +0 -88
  208. package/bpk-component-content-cards/src/BpkContentCards-test.tsx +0 -126
  209. package/bpk-component-content-cards/src/accessibility-test.tsx +0 -64
  210. package/bpk-component-graphic-promotion/src/BpkGraphicPromo-test.tsx +0 -134
  211. package/bpk-component-graphic-promotion/src/accessibility-test.tsx +0 -147
@@ -1,134 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2022 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import React from 'react';
20
- import { fireEvent, render } from '@testing-library/react';
21
-
22
- // @ts-expect-error Untyped import. Not added as a stub declaration so consumers still have the suppression in their node_modules when shipped untranspiled.
23
- import { cssModules } from '../../bpk-react-utils';
24
-
25
- import BpkGraphicPromo, { TEXT_ALIGN } from './BpkGraphicPromo';
26
- import type { Props } from './BpkGraphicPromo';
27
- import STYLES from './BpkGraphicPromo.module.scss';
28
-
29
- const getClassName = cssModules(STYLES);
30
-
31
- const props: Props = {
32
- buttonText: 'Learn more',
33
- headline: 'Ride your wave',
34
- invertVertically: false,
35
- onClick: jest.fn(),
36
- sponsor: {
37
- label: 'Sponsored',
38
- logo: 'path/to/logo.png',
39
- altText: 'Airline Name',
40
- },
41
- subheading:
42
- 'Portugal and 6 more countries have just been added to the UK travel green list',
43
- tagline: 'Tagline',
44
- textAlign: TEXT_ALIGN.start,
45
- contentId: 'mock-content-id',
46
- };
47
-
48
- describe('BpkGraphicPromo', () => {
49
- beforeEach(() => {
50
- (props.onClick as jest.MockedFunction<Props['onClick']>).mockReset();
51
- });
52
-
53
- it('should render correctly with all properties set', () => {
54
- const { asFragment } = render(<BpkGraphicPromo {...props} />);
55
-
56
- expect(asFragment()).toMatchSnapshot();
57
- });
58
-
59
- it('should support custom class names', () => {
60
- const { asFragment } = render(
61
- <BpkGraphicPromo className="custom-classname" {...props} />,
62
- );
63
-
64
- expect(asFragment()).toMatchSnapshot();
65
- });
66
-
67
- it('should render correctly when centre aligned', () => {
68
- const customProps = { ...props, textAlign: TEXT_ALIGN.center };
69
- const { asFragment } = render(<BpkGraphicPromo {...customProps} />);
70
-
71
- expect(asFragment()).toMatchSnapshot();
72
- });
73
-
74
- it('should render correctly when right aligned', () => {
75
- const customProps = { ...props, textAlign: TEXT_ALIGN.end };
76
- const { asFragment } = render(<BpkGraphicPromo {...customProps} />);
77
-
78
- expect(asFragment()).toMatchSnapshot();
79
- });
80
-
81
- it('should render correctly when inverted portrait', () => {
82
- const customProps = { ...props, invertVertically: true };
83
- const { asFragment } = render(<BpkGraphicPromo {...customProps} />);
84
-
85
- expect(asFragment()).toMatchSnapshot();
86
- });
87
-
88
- it('should not display tagline or subheading when not provided', () => {
89
- const customProps = { ...props };
90
- delete customProps.tagline;
91
- delete customProps.subheading;
92
- const { asFragment } = render(<BpkGraphicPromo {...customProps} />);
93
-
94
- expect(asFragment()).toMatchSnapshot();
95
- });
96
-
97
- it('should display the tagline and no sponsor for non-sponsored ad', () => {
98
- const customProps = { ...props };
99
- delete customProps.sponsor;
100
- const { asFragment } = render(<BpkGraphicPromo {...customProps} />);
101
-
102
- expect(asFragment()).toMatchSnapshot();
103
- });
104
-
105
- it('should redirect us to link when card is clicked', () => {
106
- render(<BpkGraphicPromo {...props} />);
107
-
108
- const graphicPromo = document.getElementsByClassName(
109
- getClassName('bpk-graphic-promo'),
110
- )[0];
111
- fireEvent.click(graphicPromo);
112
-
113
- expect(props.onClick).toHaveBeenCalledTimes(1);
114
- });
115
-
116
- it('should redirect us to link when button is clicked', () => {
117
- render(<BpkGraphicPromo {...props} />);
118
-
119
- const graphicPromoCTA = document.getElementsByClassName(
120
- getClassName('bpk-graphic-promo__cta'),
121
- )[0];
122
- fireEvent.click(graphicPromoCTA);
123
-
124
- expect(props.onClick).toHaveBeenCalledTimes(1);
125
- });
126
-
127
- it('should render as expected without a content ID', () => {
128
- const { asFragment } = render(
129
- <BpkGraphicPromo {...props} contentId={null} />,
130
- );
131
-
132
- expect(asFragment()).toMatchSnapshot();
133
- });
134
- });
@@ -1,147 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2022 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
- import React from 'react';
19
- import { render } from '@testing-library/react';
20
- import { axe } from 'jest-axe';
21
-
22
- import BpkGraphicPromo, { TEXT_ALIGN } from './BpkGraphicPromo';
23
-
24
- const sponsor = {
25
- label: 'Sponsored',
26
- logo: 'path/to/logo.png',
27
- altText: 'Airline Name',
28
- };
29
- const buttonText = 'Learn more';
30
- const onClick = () => {
31
- window.location.href = 'https://www.skyscanner.net';
32
- };
33
-
34
- const tagline = 'Tagline';
35
- const headline = 'Ride your wave';
36
- const subheading =
37
- 'Portugal and 6 more countries have just been added to the UK travel green list';
38
-
39
- describe('BpkGraphicPromo accessibility tests', () => {
40
- // TODO: Temporarily disabling tests due to a newer version of jest-axe which causes tests to fail when using nested interactive elements
41
-
42
- it('should not have programmatically-detectable accessibility issues', async () => {
43
- const { container } = render(
44
- <BpkGraphicPromo
45
- buttonText={buttonText}
46
- className="test"
47
- headline={headline}
48
- invertVertically={false}
49
- onClick={onClick}
50
- sponsor={sponsor}
51
- subheading={subheading}
52
- tagline={tagline}
53
- textAlign={TEXT_ALIGN.start}
54
- />,
55
- );
56
-
57
- const results = await axe(container);
58
- expect(results).toHaveNoViolations();
59
- });
60
-
61
- it('should not have programmatically-detectable accessibility issues in centre aligned', async () => {
62
- const { container } = render(
63
- <BpkGraphicPromo
64
- buttonText={buttonText}
65
- headline={headline}
66
- invertVertically={false}
67
- onClick={onClick}
68
- sponsor={sponsor}
69
- subheading={subheading}
70
- tagline={tagline}
71
- textAlign={TEXT_ALIGN.center}
72
- />,
73
- );
74
-
75
- const results = await axe(container);
76
- expect(results).toHaveNoViolations();
77
- });
78
-
79
- it('should not have programmatically-detectable accessibility issues in right aligned', async () => {
80
- const { container } = render(
81
- <BpkGraphicPromo
82
- buttonText={buttonText}
83
- headline={headline}
84
- invertVertically={false}
85
- onClick={onClick}
86
- sponsor={sponsor}
87
- subheading={subheading}
88
- tagline={tagline}
89
- textAlign={TEXT_ALIGN.end}
90
- />,
91
- );
92
-
93
- const results = await axe(container);
94
- expect(results).toHaveNoViolations();
95
- });
96
-
97
- it('should not have programmatically-detectable accessibility issues in inverted portrait', async () => {
98
- const { container } = render(
99
- <BpkGraphicPromo
100
- buttonText={buttonText}
101
- headline={headline}
102
- invertVertically
103
- onClick={onClick}
104
- sponsor={sponsor}
105
- subheading={subheading}
106
- tagline={tagline}
107
- textAlign={TEXT_ALIGN.start}
108
- />,
109
- );
110
-
111
- const results = await axe(container);
112
- expect(results).toHaveNoViolations();
113
- });
114
-
115
- it('should not have programmatically-detectable accessibility issues when optional text is missing', async () => {
116
- const { container } = render(
117
- <BpkGraphicPromo
118
- buttonText={buttonText}
119
- headline={headline}
120
- invertVertically={false}
121
- onClick={onClick}
122
- sponsor={sponsor}
123
- textAlign={TEXT_ALIGN.start}
124
- />,
125
- );
126
-
127
- const results = await axe(container);
128
- expect(results).toHaveNoViolations();
129
- });
130
-
131
- it('should not have programmatically-detectable accessibility issues in non-sponsored', async () => {
132
- const { container } = render(
133
- <BpkGraphicPromo
134
- buttonText={buttonText}
135
- headline={headline}
136
- invertVertically={false}
137
- onClick={onClick}
138
- subheading={subheading}
139
- tagline={tagline}
140
- textAlign={TEXT_ALIGN.start}
141
- />,
142
- );
143
-
144
- const results = await axe(container);
145
- expect(results).toHaveNoViolations();
146
- });
147
- });