@scrippsproduct/networks-ui-library 1.1.9 → 1.1.10

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 (120) hide show
  1. package/dist/{Form.module-Cd8qH2rj.mjs → Form.module-CarfWK5T.mjs} +1 -1
  2. package/dist/ResultsTable.module-wcNUQEKe.mjs +14 -0
  3. package/dist/_commonjsHelpers-DaMA6jEr.mjs +8 -0
  4. package/dist/assets/ResultsTable.css +1 -1
  5. package/dist/{chevron-left-DRvpaLmK.mjs → chevron-left-D0UjbrKw.mjs} +1 -1
  6. package/dist/{chevron-right-C8yCnmfx.mjs → chevron-right-0ZF3LruR.mjs} +1 -1
  7. package/dist/components/ActionButton/ActionButton.test.js +209 -0
  8. package/dist/components/AdBlock/AdBlock.test.js +286 -0
  9. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.test.js +295 -0
  10. package/dist/components/AirDateFormatter/AirDateFormatter.test.js +192 -0
  11. package/dist/components/AnchorTag/AnchorTag.test.js +463 -0
  12. package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +295 -0
  13. package/dist/components/BasicGridModule/BasicGridModule.js +41 -37
  14. package/dist/components/BasicGridModule/BasicGridModule.test.js +227 -0
  15. package/dist/components/Button/Button.test.js +434 -0
  16. package/dist/components/Carousel/Carousel.js +2 -2
  17. package/dist/components/Carousel/Carousel.test.js +705 -0
  18. package/dist/components/CarouselSlide/CarouselSlide.test.js +378 -0
  19. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
  20. package/dist/components/CastInfoLayout/CastInfoLayout.test.js +294 -0
  21. package/dist/components/ChannelSearch/ChannelSearch.test.js +565 -0
  22. package/dist/components/ChoicesItem/ChoicesItem.test.js +428 -0
  23. package/dist/components/Concat/Concat.js +1 -1
  24. package/dist/components/Concat/Concat.test.js +115 -0
  25. package/dist/components/CtaBlock/CtaBlock.js +1 -1
  26. package/dist/components/CtaBlock/CtaBlock.test.js +226 -0
  27. package/dist/components/CustomDataList/CustomDataList.js +4 -4
  28. package/dist/components/CustomSelect/CustomSelect.js +86 -86
  29. package/dist/components/CustomSelect/CustomSelect.test.js +313 -0
  30. package/dist/components/DateNavigation/DateNavigation.js +10 -10
  31. package/dist/components/DateNavigation/DateNavigation.test.js +370 -0
  32. package/dist/components/DatePicker/DatePicker.js +1 -1
  33. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.test.js +288 -0
  34. package/dist/components/DrawerNavigation/DrawerNavigation.test.js +316 -0
  35. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.test.js +337 -0
  36. package/dist/components/EqualSizeGrid/EqualSizeGrid.test.js +358 -0
  37. package/dist/components/ErrorHandler/ErrorHandler.js +2 -2
  38. package/dist/components/ErrorHandler/ErrorHandler.test.js +158 -0
  39. package/dist/components/FeaturedList/FeaturedList.test.js +353 -0
  40. package/dist/components/Figure/Figure.js +1 -1
  41. package/dist/components/Figure/Figure.test.js +198 -0
  42. package/dist/components/FindUs/FindUs.test.js +499 -0
  43. package/dist/components/FooterNavigation/FooterNavigation.test.js +310 -0
  44. package/dist/components/GenericList/GenericList.js +1 -1
  45. package/dist/components/GenericList/GenericList.test.js +288 -0
  46. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.test.js +689 -0
  47. package/dist/components/GradientButton/GradientButton.d.ts +1 -1
  48. package/dist/components/GradientButton/GradientButton.js +33 -31
  49. package/dist/components/GradientButton/GradientButton.test.js +457 -0
  50. package/dist/components/GridList/GridList.test.js +371 -0
  51. package/dist/components/ImageCard/ImageCard.test.js +668 -0
  52. package/dist/components/ImageCard/ImageCardCore.js +28 -28
  53. package/dist/components/ImageCard/ImageCardCore.test.js +577 -0
  54. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.test.js +379 -0
  55. package/dist/components/InfoPanel/InfoPanel.js +1 -1
  56. package/dist/components/InlineNavigation/InlineNavigation.test.js +149 -0
  57. package/dist/components/Input/Input.js +1 -1
  58. package/dist/components/Input/Input.test.js +263 -0
  59. package/dist/components/InstructionsList/InstructionsList.js +11 -11
  60. package/dist/components/InstructionsList/InstructionsList.test.js +181 -0
  61. package/dist/components/LogoListItem/LogoListItem.test.js +303 -0
  62. package/dist/components/LogoNavigation/LogoNavigation.test.js +352 -0
  63. package/dist/components/ModalContainer/ModalContainer.js +2 -2
  64. package/dist/components/NavList/NavList.test.js +332 -0
  65. package/dist/components/Overlay/Overlay.js +24 -23
  66. package/dist/components/Overlay/Overlay.test.js +198 -0
  67. package/dist/components/PageHero/PageHero.test.js +241 -0
  68. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
  69. package/dist/components/ProgramAirdate/ProgramAirdate.js +1 -1
  70. package/dist/components/ProgramAirdate/ProgramAirdate.test.js +414 -0
  71. package/dist/components/PromotionBlock/PromotionBlock.test.js +208 -0
  72. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.test.js +221 -0
  73. package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +349 -0
  74. package/dist/components/RescanInstructions/RescanInstructions.test.js +218 -0
  75. package/dist/components/ResponsiveImage/ResponsiveImage.test.js +264 -0
  76. package/dist/components/ResultsTable/ResultsTable.js +9 -2
  77. package/dist/components/ResultsTable/ResultsTable.test.js +402 -0
  78. package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
  79. package/dist/components/ResultsTableBody/ResultsTableBody.test.js +445 -0
  80. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +37 -15
  81. package/dist/components/ResultsTableHeader/ResultsTableHeader.test.js +275 -0
  82. package/dist/components/ScheduleLayout/ScheduleContext.js +654 -626
  83. package/dist/components/ScheduleLayout/ScheduleLayout.js +1 -1
  84. package/dist/components/ScheduleLayout/useScheduleContext.js +5 -10
  85. package/dist/components/ScheduleList/ScheduleList.js +1 -1
  86. package/dist/components/SectionedContent/SectionedContent.js +1 -1
  87. package/dist/components/SectionedContent/SectionedContent.test.js +341 -0
  88. package/dist/components/Select/Select.js +24 -24
  89. package/dist/components/Select/Select.test.js +367 -0
  90. package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
  91. package/dist/components/ShowAboutContent/ShowAboutContent.test.js +535 -0
  92. package/dist/components/ShowAboutLayout/ShowAboutLayout.test.js +570 -0
  93. package/dist/components/SocialLinks/SocialLinks.js +1 -1
  94. package/dist/components/StringList/StringList.js +1 -1
  95. package/dist/components/StringList/StringList.test.js +311 -0
  96. package/dist/components/TabContent/TabContent.js +1 -1
  97. package/dist/components/TabContent/TabContent.test.js +274 -0
  98. package/dist/components/TabNavigation/TabNavigation.js +21 -21
  99. package/dist/components/TabNavigation/TabNavigation.test.js +535 -0
  100. package/dist/components/TabbedContent/TabbedContent.test.js +654 -0
  101. package/dist/components/TextArea/TextArea.js +1 -1
  102. package/dist/components/UpcomingList/UpcomingList.test.js +471 -0
  103. package/dist/{index-VjANCDXC.mjs → index-06PEPfBQ.mjs} +1 -1
  104. package/dist/index-BUN4jQ3m.mjs +3098 -0
  105. package/dist/index-BVxBrkZB.mjs +3 -0
  106. package/dist/{index-DC2JJV3a.mjs → index-D3kkcgee.mjs} +1 -1
  107. package/dist/{index-C-kn9Zhn.mjs → index-DzfYkULW.mjs} +2 -1
  108. package/dist/magic-string.es-uPKorP4O.mjs +663 -0
  109. package/dist/matchers-35e4d3bd-BBPNTlen.mjs +2404 -0
  110. package/dist/react.esm-DLSrfVwM.mjs +23410 -0
  111. package/dist/test/setupTests.d.ts +1 -0
  112. package/dist/test/setupTests.js +55 -0
  113. package/dist/{triangle-PcCcGXjr.mjs → triangle-C4z906Wf.mjs} +1 -1
  114. package/dist/useScheduleContext-D7FdzNxe.mjs +17 -0
  115. package/dist/utils/analytics.js +1 -1
  116. package/dist/utils/getOnNowProgram.js +10 -10
  117. package/dist/{x-C-QzJ-qD.mjs → x-Ck9Vk5Fo.mjs} +1 -1
  118. package/package.json +4 -1
  119. package/dist/ResultsTable.module-1zxhXaem.mjs +0 -14
  120. package/dist/_commonjsHelpers-C6fGbg64.mjs +0 -6
@@ -0,0 +1,570 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { v as g, d as m, b as T, i as n, r, g as t, s as i } from "../../react.esm-DLSrfVwM.mjs";
3
+ import "../../index-BVxBrkZB.mjs";
4
+ import { ShowAboutLayout as a } from "./ShowAboutLayout.js";
5
+ g.mock("../Concat", () => ({
6
+ default: ({ list: o }) => /* @__PURE__ */ s("div", { "data-list-length": o.length, "data-testid": "concat", children: "Concat Mock" })
7
+ }));
8
+ g.mock("../StringList", () => ({
9
+ default: ({ list: o, separatorType: l, makeBlock: e }) => /* @__PURE__ */ s(
10
+ "div",
11
+ {
12
+ "data-list": JSON.stringify(o),
13
+ "data-make-block": String(e),
14
+ "data-separator": l,
15
+ "data-testid": "string-list",
16
+ children: o.join(l === "comma" ? ", " : " | ")
17
+ }
18
+ )
19
+ }));
20
+ g.mock("../ImageCard", () => ({
21
+ default: ({ content: o, image: l }) => /* @__PURE__ */ s(
22
+ "div",
23
+ {
24
+ "data-alt-text": l.altText,
25
+ "data-aspect-ratio": l.aspectRatio,
26
+ "data-image-url": l.url,
27
+ "data-testid": "image-card",
28
+ children: o
29
+ }
30
+ )
31
+ }));
32
+ g.mock("../AdjustableTwoColumnGrid", () => ({
33
+ default: ({ children: o, classname: l, firstColumnWidth: e }) => /* @__PURE__ */ s(
34
+ "div",
35
+ {
36
+ "data-classname": l,
37
+ "data-first-column-width": e,
38
+ "data-testid": "adjustable-two-column-grid",
39
+ children: o
40
+ }
41
+ )
42
+ }));
43
+ g.mock("../ShowAboutContent", () => ({
44
+ default: ({
45
+ series: o,
46
+ castStr: l,
47
+ showUpcoming: e,
48
+ type: c,
49
+ nextAirDates: u,
50
+ socialShare: h
51
+ }) => /* @__PURE__ */ s(
52
+ "div",
53
+ {
54
+ "data-cast-str": l,
55
+ "data-next-air-dates": JSON.stringify(u),
56
+ "data-series-title": o.title,
57
+ "data-show-upcoming": e,
58
+ "data-social-share-enabled": h.enabled,
59
+ "data-testid": "show-about-content",
60
+ "data-type": c,
61
+ children: "ShowAboutContent Mock"
62
+ }
63
+ )
64
+ }));
65
+ const p = g.fn((o) => o.join(" ")), d = g.fn((o) => {
66
+ const l = Math.floor(o / 60), e = o % 60;
67
+ return e > 0 ? `${l}h ${e}m` : `${l}h`;
68
+ });
69
+ g.mock("./../../utils/helpers", () => ({
70
+ classes: (o) => p(o),
71
+ getHoursMinsStr: (o) => d(o)
72
+ }));
73
+ m("ShowAboutLayout", () => {
74
+ T(() => {
75
+ g.clearAllMocks();
76
+ });
77
+ const o = (e) => ({
78
+ name: "Test Show",
79
+ slug: "test-show",
80
+ title: "Test Show",
81
+ programType: "series",
82
+ series_synopsis: "Test synopsis",
83
+ rating: "TV-14",
84
+ genres: ["Drama", "Comedy"],
85
+ cast: [
86
+ { name: "Character 1", real_name: "Actor One", role: "Lead" },
87
+ { name: "Character 2", real_name: "Actor Two", role: "Supporting" }
88
+ ],
89
+ detailImage: null,
90
+ logoImage: {
91
+ image: {
92
+ publicUrl: "https://example.com/logo.png",
93
+ sources: [],
94
+ width: 200,
95
+ height: 100,
96
+ sizes: []
97
+ }
98
+ },
99
+ ...e
100
+ }), l = {
101
+ series: o()
102
+ };
103
+ m("Basic Rendering", () => {
104
+ n("should render AdjustableTwoColumnGrid", () => {
105
+ r(/* @__PURE__ */ s(a, { ...l })), t(i.getByTestId("adjustable-two-column-grid")).toBeInTheDocument();
106
+ }), n("should render ShowAboutContent in second column", () => {
107
+ r(/* @__PURE__ */ s(a, { ...l })), t(i.getByTestId("show-about-content")).toBeInTheDocument();
108
+ }), n("should apply correct classname to AdjustableTwoColumnGrid", () => {
109
+ r(/* @__PURE__ */ s(a, { ...l })), t(p).toHaveBeenCalledWith(
110
+ t.arrayContaining(["series-about-tab"])
111
+ );
112
+ }), n("should wrap ShowAboutContent in content div with correct class", () => {
113
+ const { container: e } = r(/* @__PURE__ */ s(a, { ...l })), c = e.querySelector(".series-about-tab__content");
114
+ t(c).toBeInTheDocument();
115
+ }), n("should call classes helper multiple times", () => {
116
+ r(/* @__PURE__ */ s(a, { ...l })), t(p).toHaveBeenCalled();
117
+ });
118
+ }), m("First Column Width", () => {
119
+ n("should use default firstColumnWidth of 33%", () => {
120
+ r(/* @__PURE__ */ s(a, { ...l }));
121
+ const e = i.getByTestId("adjustable-two-column-grid");
122
+ t(e).toHaveAttribute("data-first-column-width", "33%");
123
+ }), n("should accept custom firstColumnWidth", () => {
124
+ r(/* @__PURE__ */ s(a, { ...l, firstColumnWidth: "50%" }));
125
+ const e = i.getByTestId("adjustable-two-column-grid");
126
+ t(e).toHaveAttribute("data-first-column-width", "50%");
127
+ }), n("should accept percentage string", () => {
128
+ r(/* @__PURE__ */ s(a, { ...l, firstColumnWidth: "40%" }));
129
+ const e = i.getByTestId("adjustable-two-column-grid");
130
+ t(e).toHaveAttribute("data-first-column-width", "40%");
131
+ }), n("should accept pixel string", () => {
132
+ r(/* @__PURE__ */ s(a, { ...l, firstColumnWidth: "400px" }));
133
+ const e = i.getByTestId("adjustable-two-column-grid");
134
+ t(e).toHaveAttribute("data-first-column-width", "400px");
135
+ });
136
+ }), m("DetailImage Null - Concat Rendering", () => {
137
+ n("should render Concat when detailImage is null", () => {
138
+ const e = o({ detailImage: null });
139
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument(), t(i.queryByTestId("image-card")).not.toBeInTheDocument();
140
+ }), n("should pass 2 items to Concat list (genres + ratingAndTime)", () => {
141
+ const e = o({ detailImage: null });
142
+ r(/* @__PURE__ */ s(a, { series: e }));
143
+ const c = i.getByTestId("concat");
144
+ t(c).toHaveAttribute("data-list-length", "2");
145
+ }), n("should render genres as StringList in Concat when genres is array", () => {
146
+ const e = o({
147
+ detailImage: null,
148
+ genres: ["Action", "Adventure"]
149
+ });
150
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
151
+ }), n("should render genres as string in Concat when genres is string", () => {
152
+ const e = o({
153
+ detailImage: null,
154
+ genres: "Drama"
155
+ });
156
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
157
+ });
158
+ }), m("DetailImage Present - ImageCard Rendering", () => {
159
+ n("should render ImageCard when detailImage is present", () => {
160
+ const e = o({
161
+ detailImage: {
162
+ url: "https://example.com/image.jpg",
163
+ aspectRatio: 1.7777777777777777,
164
+ altText: "Series image"
165
+ }
166
+ });
167
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("image-card")).toBeInTheDocument();
168
+ }), n("should pass correct image url to ImageCard", () => {
169
+ const e = o({
170
+ detailImage: {
171
+ url: "https://custom.com/photo.png",
172
+ aspectRatio: 1.3333333333333333
173
+ }
174
+ });
175
+ r(/* @__PURE__ */ s(a, { series: e }));
176
+ const c = i.getByTestId("image-card");
177
+ t(c).toHaveAttribute("data-image-url", "https://custom.com/photo.png");
178
+ }), n("should pass correct aspectRatio to ImageCard", () => {
179
+ const e = o({
180
+ detailImage: {
181
+ url: "https://example.com/image.jpg",
182
+ aspectRatio: 1.5
183
+ }
184
+ });
185
+ r(/* @__PURE__ */ s(a, { series: e }));
186
+ const c = i.getByTestId("image-card");
187
+ t(c).toHaveAttribute("data-aspect-ratio", "1.5");
188
+ }), n("should generate altText from series title", () => {
189
+ const e = o({
190
+ title: "My Custom Show",
191
+ detailImage: {
192
+ url: "https://example.com/image.jpg",
193
+ aspectRatio: 1.7777777777777777
194
+ }
195
+ });
196
+ r(/* @__PURE__ */ s(a, { series: e }));
197
+ const c = i.getByTestId("image-card");
198
+ t(c).toHaveAttribute("data-alt-text", "Image for My Custom Show");
199
+ }), n("should use empty string for url when detailImage.url is missing", () => {
200
+ const e = o({
201
+ detailImage: {
202
+ url: void 0,
203
+ aspectRatio: 1.7777777777777777
204
+ }
205
+ });
206
+ r(/* @__PURE__ */ s(a, { series: e }));
207
+ const c = i.getByTestId("image-card");
208
+ t(c).toHaveAttribute("data-image-url", "");
209
+ }), n("should use 16/9 aspectRatio when detailImage.aspectRatio is missing", () => {
210
+ const e = o({
211
+ detailImage: {
212
+ url: "https://example.com/image.jpg",
213
+ aspectRatio: void 0
214
+ }
215
+ });
216
+ r(/* @__PURE__ */ s(a, { series: e }));
217
+ const c = i.getByTestId("image-card");
218
+ t(c).toHaveAttribute("data-aspect-ratio", String(16 / 9));
219
+ }), n("should render Concat as content inside ImageCard", () => {
220
+ const e = o({
221
+ detailImage: {
222
+ url: "https://example.com/image.jpg",
223
+ aspectRatio: 1.7777777777777777
224
+ }
225
+ }), { container: c } = r(/* @__PURE__ */ s(a, { series: e })), u = c.querySelector('[data-testid="image-card"]'), h = u == null ? void 0 : u.querySelector('[data-testid="concat"]');
226
+ t(h).toBeInTheDocument();
227
+ });
228
+ }), m("CastStr Construction", () => {
229
+ n("should build castStr from series.cast real_name values", () => {
230
+ const e = o({
231
+ cast: [
232
+ { name: "Char 1", real_name: "John Doe", role: "Lead" },
233
+ { name: "Char 2", real_name: "Jane Smith", role: "Support" },
234
+ { name: "Char 3", real_name: "Bob Johnson" }
235
+ ]
236
+ });
237
+ r(/* @__PURE__ */ s(a, { series: e }));
238
+ const c = i.getByTestId("show-about-content");
239
+ t(c).toHaveAttribute("data-cast-str", "John Doe, Jane Smith, Bob Johnson");
240
+ }), n("should use empty string when series.cast is undefined", () => {
241
+ const e = o({ cast: void 0 });
242
+ r(/* @__PURE__ */ s(a, { series: e }));
243
+ const c = i.getByTestId("show-about-content");
244
+ t(c).toHaveAttribute("data-cast-str", "");
245
+ }), n("should handle empty cast array", () => {
246
+ const e = o({ cast: [] });
247
+ r(/* @__PURE__ */ s(a, { series: e }));
248
+ const c = i.getByTestId("show-about-content");
249
+ t(c).toHaveAttribute("data-cast-str", "");
250
+ }), n("should handle single cast member", () => {
251
+ const e = o({
252
+ cast: [{ name: "Character", real_name: "Solo Actor", role: "Lead" }]
253
+ });
254
+ r(/* @__PURE__ */ s(a, { series: e }));
255
+ const c = i.getByTestId("show-about-content");
256
+ t(c).toHaveAttribute("data-cast-str", "Solo Actor");
257
+ });
258
+ }), m("RatingAndTime Construction - Series Type", () => {
259
+ n("should build ratingAndTime array for series type", () => {
260
+ const e = o({
261
+ rating: "TV-PG",
262
+ run_time: 120
263
+ });
264
+ r(/* @__PURE__ */ s(a, { series: e, type: "series" })), t(i.getByTestId("show-about-content")).toBeInTheDocument();
265
+ }), n("should include TV Series label for series type", () => {
266
+ const e = o({ rating: "TV-14" });
267
+ r(/* @__PURE__ */ s(a, { series: e, type: "series" })), t(i.getByTestId("concat")).toBeInTheDocument();
268
+ }), n("should include rating in ratingAndTime for series", () => {
269
+ const e = o({ rating: "TV-MA" });
270
+ r(/* @__PURE__ */ s(a, { series: e, type: "series" })), t(i.getByTestId("concat")).toBeInTheDocument();
271
+ }), n("should only have 2 items for series type (TV Series + rating)", () => {
272
+ const e = o({ rating: "TV-14", run_time: 60 });
273
+ r(/* @__PURE__ */ s(a, { series: e, type: "series" })), t(i.getByTestId("concat")).toBeInTheDocument();
274
+ }), n("should not include runtime for series type", () => {
275
+ const e = o({ rating: "TV-14", run_time: 90 });
276
+ d.mockClear(), r(/* @__PURE__ */ s(a, { series: e, type: "series" })), t(d).toHaveBeenCalledWith(90);
277
+ });
278
+ }), m("RatingAndTime Construction - Film Type", () => {
279
+ n("should include year_released for film type", () => {
280
+ const e = o({
281
+ programType: "film",
282
+ year_released: 2020,
283
+ rating: "PG-13",
284
+ run_time: 120
285
+ });
286
+ r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(i.getByTestId("concat")).toBeInTheDocument();
287
+ }), n("should use Film label when year_released is undefined", () => {
288
+ const e = o({
289
+ programType: "film",
290
+ year_released: void 0,
291
+ rating: "PG"
292
+ });
293
+ r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(i.getByTestId("concat")).toBeInTheDocument();
294
+ }), n("should include rating for film type", () => {
295
+ const e = o({
296
+ programType: "film",
297
+ rating: "R",
298
+ run_time: 105
299
+ });
300
+ r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(i.getByTestId("concat")).toBeInTheDocument();
301
+ }), n("should include runtime for film type", () => {
302
+ const e = o({
303
+ programType: "film",
304
+ rating: "PG-13",
305
+ run_time: 120
306
+ });
307
+ r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(d).toHaveBeenCalledWith(120);
308
+ }), n("should call getHoursMinsStr with run_time", () => {
309
+ const e = o({
310
+ programType: "film",
311
+ run_time: 95
312
+ });
313
+ d.mockClear(), r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(d).toHaveBeenCalledWith(95);
314
+ }), n("should use empty string for runtime when run_time is undefined", () => {
315
+ const e = o({
316
+ programType: "film",
317
+ run_time: void 0
318
+ });
319
+ r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(d).not.toHaveBeenCalled();
320
+ }), n("should have 3 items for film with year and runtime", () => {
321
+ const e = o({
322
+ programType: "film",
323
+ year_released: 2022,
324
+ rating: "PG",
325
+ run_time: 100
326
+ });
327
+ r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(d).toHaveBeenCalled();
328
+ });
329
+ }), m("RatingAndTime Construction - Unknown Type", () => {
330
+ n("should use film logic for unknown type", () => {
331
+ const e = o({
332
+ programType: "unknown",
333
+ year_released: 2021,
334
+ rating: "NR",
335
+ run_time: 85
336
+ });
337
+ r(/* @__PURE__ */ s(a, { series: e, type: "unknown" })), t(i.getByTestId("concat")).toBeInTheDocument();
338
+ }), n("should include runtime for unknown type", () => {
339
+ const e = o({
340
+ programType: "unknown",
341
+ run_time: 75
342
+ });
343
+ d.mockClear(), r(/* @__PURE__ */ s(a, { series: e, type: "unknown" })), t(d).toHaveBeenCalledWith(75);
344
+ });
345
+ }), m("Genres Handling", () => {
346
+ n("should render genres as StringList when genres is array", () => {
347
+ const e = o({ genres: ["Action", "Thriller", "Sci-Fi"] });
348
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
349
+ }), n("should pass comma separator for genres StringList", () => {
350
+ const e = o({ genres: ["Drama", "Comedy"] });
351
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
352
+ }), n("should pass makeBlock true to genres StringList", () => {
353
+ const e = o({ genres: ["Drama", "Comedy"] });
354
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
355
+ }), n("should render genres as string when genres is string type", () => {
356
+ const e = o({ genres: "Single Genre String" });
357
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
358
+ }), n("should handle empty genres array", () => {
359
+ const e = o({ genres: [] }), { container: c } = r(/* @__PURE__ */ s(a, { series: e })), u = c.querySelector('[data-separator="comma"]');
360
+ if (u) {
361
+ const h = JSON.parse(u.getAttribute("data-list") || "[]");
362
+ t(h).toHaveLength(0);
363
+ }
364
+ }), n("should handle undefined genres with fallback to empty array", () => {
365
+ const e = o({ genres: void 0 });
366
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
367
+ });
368
+ }), m("ShowAboutContent Props", () => {
369
+ n("should pass series to ShowAboutContent", () => {
370
+ const e = o({ title: "Custom Series Title" });
371
+ r(/* @__PURE__ */ s(a, { series: e }));
372
+ const c = i.getByTestId("show-about-content");
373
+ t(c).toHaveAttribute("data-series-title", "Custom Series Title");
374
+ }), n("should pass castStr to ShowAboutContent", () => {
375
+ const e = o({
376
+ cast: [
377
+ { name: "Char", real_name: "Actor A" },
378
+ { name: "Char", real_name: "Actor B" }
379
+ ]
380
+ });
381
+ r(/* @__PURE__ */ s(a, { series: e }));
382
+ const c = i.getByTestId("show-about-content");
383
+ t(c).toHaveAttribute("data-cast-str", "Actor A, Actor B");
384
+ }), n("should pass showUpcoming to ShowAboutContent", () => {
385
+ r(/* @__PURE__ */ s(a, { ...l, showUpcoming: !0 }));
386
+ const e = i.getByTestId("show-about-content");
387
+ t(e).toHaveAttribute("data-show-upcoming", "true");
388
+ }), n("should default showUpcoming to false", () => {
389
+ r(/* @__PURE__ */ s(a, { ...l }));
390
+ const e = i.getByTestId("show-about-content");
391
+ t(e).toHaveAttribute("data-show-upcoming", "false");
392
+ }), n("should pass type to ShowAboutContent", () => {
393
+ r(/* @__PURE__ */ s(a, { ...l, type: "film" }));
394
+ const e = i.getByTestId("show-about-content");
395
+ t(e).toHaveAttribute("data-type", "film");
396
+ }), n("should default type to series", () => {
397
+ r(/* @__PURE__ */ s(a, { ...l }));
398
+ const e = i.getByTestId("show-about-content");
399
+ t(e).toHaveAttribute("data-type", "series");
400
+ }), n("should pass nextAirdates to ShowAboutContent", () => {
401
+ r(/* @__PURE__ */ s(
402
+ a,
403
+ {
404
+ ...l,
405
+ nextAirdates: ["2024-01-15 7:00 PM", "2024-01-16 8:00 PM"]
406
+ }
407
+ ));
408
+ const e = i.getByTestId("show-about-content"), c = JSON.parse(e.getAttribute("data-next-air-dates") || "[]");
409
+ t(c).toEqual(["2024-01-15 7:00 PM", "2024-01-16 8:00 PM"]);
410
+ }), n("should default nextAirdates to empty array", () => {
411
+ r(/* @__PURE__ */ s(a, { ...l }));
412
+ const e = i.getByTestId("show-about-content"), c = JSON.parse(e.getAttribute("data-next-air-dates") || "[]");
413
+ t(c).toEqual([]);
414
+ }), n("should pass socialShare to ShowAboutContent", () => {
415
+ r(/* @__PURE__ */ s(a, { ...l, socialShare: {
416
+ enabled: !0,
417
+ url: "https://example.com",
418
+ text: "Share text",
419
+ longtext: "Long share text"
420
+ } }));
421
+ const c = i.getByTestId("show-about-content");
422
+ t(c).toHaveAttribute("data-social-share-enabled", "true");
423
+ }), n("should default socialShare to disabled", () => {
424
+ r(/* @__PURE__ */ s(a, { ...l }));
425
+ const e = i.getByTestId("show-about-content");
426
+ t(e).toHaveAttribute("data-social-share-enabled", "false");
427
+ });
428
+ }), m("Edge Cases", () => {
429
+ n("should handle very long series title", () => {
430
+ const e = o({ title: "A".repeat(200) });
431
+ r(/* @__PURE__ */ s(a, { series: e }));
432
+ const c = i.getByTestId("show-about-content");
433
+ t(c).toHaveAttribute("data-series-title", "A".repeat(200));
434
+ }), n("should handle special characters in series title", () => {
435
+ const e = o({ title: 'Show <with> & "Special" Characters' }), { container: c } = r(/* @__PURE__ */ s(a, { series: e })), u = c.querySelector('[data-testid="image-card"]');
436
+ u && t(u).toHaveAttribute("data-alt-text", 'Image for Show <with> & "Special" Characters');
437
+ }), n("should handle missing rating", () => {
438
+ const e = o({ rating: void 0 });
439
+ r(/* @__PURE__ */ s(a, { series: e, type: "series" })), t(i.getByTestId("show-about-content")).toBeInTheDocument();
440
+ }), n("should handle 0 run_time as falsy (empty string)", () => {
441
+ const e = o({ run_time: 0 });
442
+ d.mockClear(), r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(d).not.toHaveBeenCalled();
443
+ }), n("should handle very large run_time", () => {
444
+ const e = o({ run_time: 500 });
445
+ d.mockClear(), r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(d).toHaveBeenCalledWith(500);
446
+ }), n("should handle year_released as 0 (falsy, uses Film label)", () => {
447
+ const e = o({
448
+ programType: "film",
449
+ year_released: 0
450
+ });
451
+ r(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(i.getByTestId("concat")).toBeInTheDocument();
452
+ }), n("should handle cast with special characters in names", () => {
453
+ const e = o({
454
+ cast: [
455
+ { name: "Character", real_name: "O'Brien-Smith", role: "Lead" },
456
+ { name: "Character", real_name: "José García", role: "Support" }
457
+ ]
458
+ });
459
+ r(/* @__PURE__ */ s(a, { series: e }));
460
+ const c = i.getByTestId("show-about-content");
461
+ t(c).toHaveAttribute("data-cast-str", "O'Brien-Smith, José García");
462
+ }), n("should handle large cast array", () => {
463
+ const e = Array.from({ length: 50 }, (I, y) => ({
464
+ name: `Character ${y}`,
465
+ real_name: `Actor ${y}`,
466
+ role: "Extra"
467
+ })), c = o({ cast: e });
468
+ r(/* @__PURE__ */ s(a, { series: c }));
469
+ const h = i.getByTestId("show-about-content").getAttribute("data-cast-str");
470
+ t(h == null ? void 0 : h.split(", ")).toHaveLength(50);
471
+ }), n("should handle genres with special characters", () => {
472
+ const e = o({ genres: ["Sci-Fi", "Film-Noir", "Neo-Western"] });
473
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
474
+ }), n("should handle unicode in genres", () => {
475
+ const e = o({ genres: ["Drama 🎭", "Comedy 😂"] });
476
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
477
+ });
478
+ }), m("Type Safety", () => {
479
+ n("should accept valid Series object", () => {
480
+ const e = o();
481
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("adjustable-two-column-grid")).toBeInTheDocument();
482
+ }), n("should accept series type", () => {
483
+ r(/* @__PURE__ */ s(a, { ...l, type: "series" })), t(i.getByTestId("show-about-content")).toBeInTheDocument();
484
+ }), n("should accept film type", () => {
485
+ r(/* @__PURE__ */ s(a, { ...l, type: "film" })), t(i.getByTestId("show-about-content")).toBeInTheDocument();
486
+ }), n("should accept unknown type", () => {
487
+ r(/* @__PURE__ */ s(a, { ...l, type: "unknown" })), t(i.getByTestId("show-about-content")).toBeInTheDocument();
488
+ }), n("should accept detailImage with required fields", () => {
489
+ const e = o({
490
+ detailImage: {
491
+ url: "https://example.com/image.jpg",
492
+ aspectRatio: 1.77
493
+ }
494
+ });
495
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("image-card")).toBeInTheDocument();
496
+ }), n("should accept detailImage as null", () => {
497
+ const e = o({ detailImage: null });
498
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
499
+ }), n("should accept genres as string array", () => {
500
+ const e = o({ genres: ["Genre1", "Genre2"] });
501
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
502
+ }), n("should accept genres as string", () => {
503
+ const e = o({ genres: "Single Genre" });
504
+ r(/* @__PURE__ */ s(a, { series: e })), t(i.getByTestId("concat")).toBeInTheDocument();
505
+ });
506
+ }), m("Integration Tests", () => {
507
+ n("should render complete layout with all features", () => {
508
+ const e = o({
509
+ title: "Complete Show",
510
+ genres: ["Drama", "Action"],
511
+ rating: "TV-14",
512
+ detailImage: {
513
+ url: "https://example.com/image.jpg",
514
+ aspectRatio: 1.7777777777777777
515
+ },
516
+ cast: [
517
+ { name: "Char", real_name: "Actor 1" },
518
+ { name: "Char", real_name: "Actor 2" }
519
+ ]
520
+ });
521
+ r(/* @__PURE__ */ s(
522
+ a,
523
+ {
524
+ showUpcoming: !0,
525
+ firstColumnWidth: "40%",
526
+ nextAirdates: ["Date 1", "Date 2"],
527
+ series: e,
528
+ socialShare: {
529
+ enabled: !0,
530
+ url: "https://example.com",
531
+ text: "Share",
532
+ longtext: "Long share text"
533
+ },
534
+ type: "series"
535
+ }
536
+ )), t(i.getByTestId("adjustable-two-column-grid")).toBeInTheDocument(), t(i.getByTestId("image-card")).toBeInTheDocument(), t(i.getByTestId("show-about-content")).toBeInTheDocument();
537
+ }), n("should coordinate all child components correctly", () => {
538
+ const e = o({
539
+ detailImage: {
540
+ url: "https://example.com/image.jpg",
541
+ aspectRatio: 1.7777777777777777
542
+ }
543
+ });
544
+ r(/* @__PURE__ */ s(a, { series: e }));
545
+ const c = i.getByTestId("adjustable-two-column-grid"), u = i.getByTestId("image-card"), h = i.getByTestId("show-about-content");
546
+ t(c).toBeInTheDocument(), t(u).toBeInTheDocument(), t(h).toBeInTheDocument();
547
+ }), n("should switch between Concat and ImageCard based on detailImage", () => {
548
+ const e = o({ detailImage: null }), { rerender: c } = r(/* @__PURE__ */ s(a, { series: e }));
549
+ t(i.getByTestId("concat")).toBeInTheDocument(), t(i.queryByTestId("image-card")).not.toBeInTheDocument();
550
+ const u = o({
551
+ detailImage: {
552
+ url: "https://example.com/image.jpg",
553
+ aspectRatio: 16 / 9
554
+ }
555
+ });
556
+ c(/* @__PURE__ */ s(a, { series: u })), t(i.getByTestId("image-card")).toBeInTheDocument();
557
+ const h = i.getByTestId("image-card");
558
+ t(h.querySelector('[data-testid="concat"]')).toBeInTheDocument();
559
+ }), n("should build different ratingAndTime for series vs film", () => {
560
+ const e = o({
561
+ rating: "PG-13",
562
+ year_released: 2020,
563
+ run_time: 120
564
+ });
565
+ d.mockClear();
566
+ const { rerender: c } = r(/* @__PURE__ */ s(a, { series: e, type: "series" }));
567
+ t(i.getByTestId("concat")).toBeInTheDocument(), d.mockClear(), c(/* @__PURE__ */ s(a, { series: e, type: "film" })), t(d).toHaveBeenCalledWith(120);
568
+ });
569
+ });
570
+ });
@@ -4,7 +4,7 @@ import _ from "../../icons/Tiktok.js";
4
4
  import x from "../../icons/Twitter.js";
5
5
  import { ImageReplacementAnchor as z } from "../ImageReplacementAnchor/ImageReplacementAnchor.js";
6
6
  import s, { forwardRef as u } from "react";
7
- import { P as a } from "../../index-DC2JJV3a.mjs";
7
+ import { P as a } from "../../index-D3kkcgee.mjs";
8
8
  import '../../assets/SocialLinks.css';function h() {
9
9
  return h = Object.assign || function(t) {
10
10
  for (var i = 1; i < arguments.length; i++) {
@@ -1,6 +1,6 @@
1
1
  import { jsx as s, Fragment as c, jsxs as p } from "react/jsx-runtime";
2
2
  import { Fragment as t } from "react";
3
- import { p as n } from "../../index-VjANCDXC.mjs";
3
+ import { p as n } from "../../index-06PEPfBQ.mjs";
4
4
  import { classes as l } from "../../utils/helpers.js";
5
5
  import '../../assets/StringList.css';const e = {
6
6
  "string-list__pipe": "_string-list__pipe_6c2cm_1",