@ember-joinery/test-support 0.0.0-stage → 1.0.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 (285) hide show
  1. package/CHANGELOG.md +550 -0
  2. package/LICENSE.md +9 -0
  3. package/NOTICE +532 -0
  4. package/README.md +356 -2
  5. package/addon-main.cjs +4 -0
  6. package/dist/-private/checkable.d.ts +21 -0
  7. package/dist/-private/checkable.d.ts.map +1 -0
  8. package/dist/-private/checkable.js +80 -0
  9. package/dist/-private/control.d.ts +18 -0
  10. package/dist/-private/control.d.ts.map +1 -0
  11. package/dist/-private/control.js +55 -0
  12. package/dist/-private/menu.d.ts +145 -0
  13. package/dist/-private/menu.d.ts.map +1 -0
  14. package/dist/-private/menu.js +322 -0
  15. package/dist/-private/overlay.d.ts +9 -0
  16. package/dist/-private/overlay.d.ts.map +1 -0
  17. package/dist/-private/overlay.js +39 -0
  18. package/dist/-private/showing.d.ts +7 -0
  19. package/dist/-private/showing.d.ts.map +1 -0
  20. package/dist/-private/showing.js +10 -0
  21. package/dist/-private/size.d.ts +10 -0
  22. package/dist/-private/size.d.ts.map +1 -0
  23. package/dist/-private/size.js +24 -0
  24. package/dist/-private/tree.d.ts +34 -0
  25. package/dist/-private/tree.d.ts.map +1 -0
  26. package/dist/-private/tree.js +80 -0
  27. package/dist/accordion.d.ts +62 -0
  28. package/dist/accordion.d.ts.map +1 -0
  29. package/dist/accordion.js +112 -0
  30. package/dist/alert-dialog.d.ts +24 -0
  31. package/dist/alert-dialog.d.ts.map +1 -0
  32. package/dist/alert-dialog.js +37 -0
  33. package/dist/alert.d.ts +27 -0
  34. package/dist/alert.d.ts.map +1 -0
  35. package/dist/alert.js +43 -0
  36. package/dist/aspect-ratio.d.ts +21 -0
  37. package/dist/aspect-ratio.d.ts.map +1 -0
  38. package/dist/aspect-ratio.js +30 -0
  39. package/dist/attachment.d.ts +86 -0
  40. package/dist/attachment.d.ts.map +1 -0
  41. package/dist/attachment.js +156 -0
  42. package/dist/avatar.d.ts +65 -0
  43. package/dist/avatar.d.ts.map +1 -0
  44. package/dist/avatar.js +106 -0
  45. package/dist/badge.d.ts +29 -0
  46. package/dist/badge.d.ts.map +1 -0
  47. package/dist/badge.js +49 -0
  48. package/dist/breadcrumb.d.ts +36 -0
  49. package/dist/breadcrumb.d.ts.map +1 -0
  50. package/dist/breadcrumb.js +80 -0
  51. package/dist/bubble.d.ts +56 -0
  52. package/dist/bubble.d.ts.map +1 -0
  53. package/dist/bubble.js +94 -0
  54. package/dist/button-group.d.ts +34 -0
  55. package/dist/button-group.d.ts.map +1 -0
  56. package/dist/button-group.js +62 -0
  57. package/dist/button.d.ts +37 -0
  58. package/dist/button.d.ts.map +1 -0
  59. package/dist/button.js +77 -0
  60. package/dist/calendar.d.ts +115 -0
  61. package/dist/calendar.d.ts.map +1 -0
  62. package/dist/calendar.js +276 -0
  63. package/dist/card.d.ts +31 -0
  64. package/dist/card.d.ts.map +1 -0
  65. package/dist/card.js +49 -0
  66. package/dist/checkbox.d.ts +46 -0
  67. package/dist/checkbox.d.ts.map +1 -0
  68. package/dist/checkbox.js +84 -0
  69. package/dist/child.d.ts +29 -0
  70. package/dist/child.d.ts.map +1 -0
  71. package/dist/child.js +27 -0
  72. package/dist/collapsible.d.ts +44 -0
  73. package/dist/collapsible.d.ts.map +1 -0
  74. package/dist/collapsible.js +83 -0
  75. package/dist/color-scheme.d.ts +44 -0
  76. package/dist/color-scheme.d.ts.map +1 -0
  77. package/dist/color-scheme.js +123 -0
  78. package/dist/combobox.d.ts +114 -0
  79. package/dist/combobox.d.ts.map +1 -0
  80. package/dist/combobox.js +293 -0
  81. package/dist/command.d.ts +92 -0
  82. package/dist/command.d.ts.map +1 -0
  83. package/dist/command.js +183 -0
  84. package/dist/context-menu.d.ts +37 -0
  85. package/dist/context-menu.d.ts.map +1 -0
  86. package/dist/context-menu.js +59 -0
  87. package/dist/date-picker.d.ts +48 -0
  88. package/dist/date-picker.d.ts.map +1 -0
  89. package/dist/date-picker.js +136 -0
  90. package/dist/dialog.d.ts +64 -0
  91. package/dist/dialog.d.ts.map +1 -0
  92. package/dist/dialog.js +142 -0
  93. package/dist/drawer.d.ts +63 -0
  94. package/dist/drawer.d.ts.map +1 -0
  95. package/dist/drawer.js +136 -0
  96. package/dist/dropdown-menu.d.ts +35 -0
  97. package/dist/dropdown-menu.d.ts.map +1 -0
  98. package/dist/dropdown-menu.js +49 -0
  99. package/dist/empty.d.ts +29 -0
  100. package/dist/empty.d.ts.map +1 -0
  101. package/dist/empty.js +47 -0
  102. package/dist/field.d.ts +86 -0
  103. package/dist/field.d.ts.map +1 -0
  104. package/dist/field.js +150 -0
  105. package/dist/file-drop.d.ts +74 -0
  106. package/dist/file-drop.d.ts.map +1 -0
  107. package/dist/file-drop.js +137 -0
  108. package/dist/focus.d.ts +54 -0
  109. package/dist/focus.d.ts.map +1 -0
  110. package/dist/focus.js +174 -0
  111. package/dist/harness.d.ts +90 -0
  112. package/dist/harness.d.ts.map +1 -0
  113. package/dist/harness.js +189 -0
  114. package/dist/heading.d.ts +16 -0
  115. package/dist/heading.d.ts.map +1 -0
  116. package/dist/heading.js +19 -0
  117. package/dist/hero.d.ts +21 -0
  118. package/dist/hero.d.ts.map +1 -0
  119. package/dist/hero.js +28 -0
  120. package/dist/hover-card.d.ts +46 -0
  121. package/dist/hover-card.d.ts.map +1 -0
  122. package/dist/hover-card.js +85 -0
  123. package/dist/icon.d.ts +10 -0
  124. package/dist/icon.d.ts.map +1 -0
  125. package/dist/icon.js +13 -0
  126. package/dist/index.d.ts +86 -0
  127. package/dist/index.d.ts.map +1 -0
  128. package/dist/index.js +87 -0
  129. package/dist/input-group.d.ts +55 -0
  130. package/dist/input-group.d.ts.map +1 -0
  131. package/dist/input-group.js +103 -0
  132. package/dist/input-otp.d.ts +103 -0
  133. package/dist/input-otp.d.ts.map +1 -0
  134. package/dist/input-otp.js +293 -0
  135. package/dist/input.d.ts +53 -0
  136. package/dist/input.d.ts.map +1 -0
  137. package/dist/input.js +90 -0
  138. package/dist/item.d.ts +63 -0
  139. package/dist/item.d.ts.map +1 -0
  140. package/dist/item.js +104 -0
  141. package/dist/kbd.d.ts +28 -0
  142. package/dist/kbd.d.ts.map +1 -0
  143. package/dist/kbd.js +36 -0
  144. package/dist/keys.d.ts +20 -0
  145. package/dist/keys.d.ts.map +1 -0
  146. package/dist/keys.js +32 -0
  147. package/dist/label.d.ts +24 -0
  148. package/dist/label.d.ts.map +1 -0
  149. package/dist/label.js +39 -0
  150. package/dist/layers.d.ts +42 -0
  151. package/dist/layers.d.ts.map +1 -0
  152. package/dist/layers.js +70 -0
  153. package/dist/link.d.ts +44 -0
  154. package/dist/link.d.ts.map +1 -0
  155. package/dist/link.js +60 -0
  156. package/dist/marker.d.ts +42 -0
  157. package/dist/marker.d.ts.map +1 -0
  158. package/dist/marker.js +73 -0
  159. package/dist/menubar.d.ts +76 -0
  160. package/dist/menubar.d.ts.map +1 -0
  161. package/dist/menubar.js +139 -0
  162. package/dist/message-scroller.d.ts +101 -0
  163. package/dist/message-scroller.d.ts.map +1 -0
  164. package/dist/message-scroller.js +215 -0
  165. package/dist/message.d.ts +48 -0
  166. package/dist/message.d.ts.map +1 -0
  167. package/dist/message.js +72 -0
  168. package/dist/native-form.d.ts +44 -0
  169. package/dist/native-form.d.ts.map +1 -0
  170. package/dist/native-form.js +111 -0
  171. package/dist/native-select.d.ts +56 -0
  172. package/dist/native-select.d.ts.map +1 -0
  173. package/dist/native-select.js +100 -0
  174. package/dist/navigation-menu.d.ts +97 -0
  175. package/dist/navigation-menu.d.ts.map +1 -0
  176. package/dist/navigation-menu.js +207 -0
  177. package/dist/observers.d.ts +21 -0
  178. package/dist/observers.d.ts.map +1 -0
  179. package/dist/observers.js +34 -0
  180. package/dist/pagination.d.ts +39 -0
  181. package/dist/pagination.d.ts.map +1 -0
  182. package/dist/pagination.js +71 -0
  183. package/dist/pointer.d.ts +38 -0
  184. package/dist/pointer.d.ts.map +1 -0
  185. package/dist/pointer.js +82 -0
  186. package/dist/popover.d.ts +50 -0
  187. package/dist/popover.d.ts.map +1 -0
  188. package/dist/popover.js +90 -0
  189. package/dist/progress.d.ts +38 -0
  190. package/dist/progress.d.ts.map +1 -0
  191. package/dist/progress.js +81 -0
  192. package/dist/questionnaire.d.ts +117 -0
  193. package/dist/questionnaire.d.ts.map +1 -0
  194. package/dist/questionnaire.js +240 -0
  195. package/dist/radio-group.d.ts +53 -0
  196. package/dist/radio-group.d.ts.map +1 -0
  197. package/dist/radio-group.js +95 -0
  198. package/dist/rating.d.ts +67 -0
  199. package/dist/rating.d.ts.map +1 -0
  200. package/dist/rating.js +160 -0
  201. package/dist/resizable.d.ts +76 -0
  202. package/dist/resizable.d.ts.map +1 -0
  203. package/dist/resizable.js +138 -0
  204. package/dist/routing.d.ts +36 -0
  205. package/dist/routing.d.ts.map +1 -0
  206. package/dist/routing.js +50 -0
  207. package/dist/roving-focus.d.ts +38 -0
  208. package/dist/roving-focus.d.ts.map +1 -0
  209. package/dist/roving-focus.js +60 -0
  210. package/dist/scroll-area.d.ts +58 -0
  211. package/dist/scroll-area.d.ts.map +1 -0
  212. package/dist/scroll-area.js +153 -0
  213. package/dist/scroller.d.ts +41 -0
  214. package/dist/scroller.d.ts.map +1 -0
  215. package/dist/scroller.js +65 -0
  216. package/dist/select.d.ts +98 -0
  217. package/dist/select.d.ts.map +1 -0
  218. package/dist/select.js +203 -0
  219. package/dist/selectors.d.ts +44 -0
  220. package/dist/selectors.d.ts.map +1 -0
  221. package/dist/selectors.js +63 -0
  222. package/dist/send-pointer.d.ts +17 -0
  223. package/dist/send-pointer.d.ts.map +1 -0
  224. package/dist/send-pointer.js +35 -0
  225. package/dist/separator.d.ts +26 -0
  226. package/dist/separator.d.ts.map +1 -0
  227. package/dist/separator.js +40 -0
  228. package/dist/shadowed.d.ts +55 -0
  229. package/dist/shadowed.d.ts.map +1 -0
  230. package/dist/shadowed.js +97 -0
  231. package/dist/sheet.d.ts +14 -0
  232. package/dist/sheet.d.ts.map +1 -0
  233. package/dist/sheet.js +15 -0
  234. package/dist/sidebar.d.ts +159 -0
  235. package/dist/sidebar.d.ts.map +1 -0
  236. package/dist/sidebar.js +299 -0
  237. package/dist/skeleton.d.ts +18 -0
  238. package/dist/skeleton.d.ts.map +1 -0
  239. package/dist/skeleton.js +25 -0
  240. package/dist/slider.d.ts +66 -0
  241. package/dist/slider.d.ts.map +1 -0
  242. package/dist/slider.js +155 -0
  243. package/dist/spinner.d.ts +10 -0
  244. package/dist/spinner.d.ts.map +1 -0
  245. package/dist/spinner.js +13 -0
  246. package/dist/sticky-footer.d.ts +33 -0
  247. package/dist/sticky-footer.d.ts.map +1 -0
  248. package/dist/sticky-footer.js +65 -0
  249. package/dist/switch.d.ts +44 -0
  250. package/dist/switch.d.ts.map +1 -0
  251. package/dist/switch.js +77 -0
  252. package/dist/table.d.ts +41 -0
  253. package/dist/table.d.ts.map +1 -0
  254. package/dist/table.js +100 -0
  255. package/dist/tabs.d.ts +66 -0
  256. package/dist/tabs.d.ts.map +1 -0
  257. package/dist/tabs.js +149 -0
  258. package/dist/test-hooks.d.ts +9 -0
  259. package/dist/test-hooks.d.ts.map +1 -0
  260. package/dist/test-hooks.js +1 -0
  261. package/dist/textarea.d.ts +47 -0
  262. package/dist/textarea.d.ts.map +1 -0
  263. package/dist/textarea.js +78 -0
  264. package/dist/toaster.d.ts +172 -0
  265. package/dist/toaster.d.ts.map +1 -0
  266. package/dist/toaster.js +307 -0
  267. package/dist/toggle-group.d.ts +51 -0
  268. package/dist/toggle-group.d.ts.map +1 -0
  269. package/dist/toggle-group.js +97 -0
  270. package/dist/toggle.d.ts +21 -0
  271. package/dist/toggle.d.ts.map +1 -0
  272. package/dist/toggle.js +26 -0
  273. package/dist/tooltip.d.ts +48 -0
  274. package/dist/tooltip.d.ts.map +1 -0
  275. package/dist/tooltip.js +91 -0
  276. package/dist/trace.d.ts +118 -0
  277. package/dist/trace.d.ts.map +1 -0
  278. package/dist/trace.js +196 -0
  279. package/dist/translator.d.ts +34 -0
  280. package/dist/translator.d.ts.map +1 -0
  281. package/dist/translator.js +75 -0
  282. package/dist/zoetrope.d.ts +51 -0
  283. package/dist/zoetrope.d.ts.map +1 -0
  284. package/dist/zoetrope.js +94 -0
  285. package/package.json +68 -3
@@ -0,0 +1,118 @@
1
+ import { Harness } from './harness.ts';
2
+ /**
3
+ * Drives a `<TraceLine>` from `@ember-joinery/ember`: one line of a trace. It reads the line's
4
+ * title, description and status, and clicks whatever wraps it (a collapsible's trigger, a link,
5
+ * a dialog's or a sheet's trigger), as a reader would:
6
+ *
7
+ * const build = new TraceLineHarness('build') // <TraceLine @name="build" @status="running">
8
+ * assert.true(build.isRunning)
9
+ * assert.strictEqual(build.title, 'Running pnpm build')
10
+ */
11
+ export declare class TraceLineHarness extends Harness {
12
+ static component: string;
13
+ /** All the text it shows, whitespace collapsed: its title, then its description. */
14
+ get text(): string;
15
+ /** Its title part. Throws when it has none. */
16
+ get titleElement(): HTMLElement;
17
+ /** Its title's text, a hidden note (`sr-only`) included, as a screen reader hears it. */
18
+ get title(): string;
19
+ /** Its description's text, or `''` without one. */
20
+ get description(): string;
21
+ /** Whether it has a description. */
22
+ get hasDescription(): boolean;
23
+ /** Its icon slots, in order: the action's before the title, an indicator after it. */
24
+ get icons(): HTMLElement[];
25
+ /** Its `@status`: `running`, `error`, `pending`, or `null` for work that is done. */
26
+ get status(): string | null;
27
+ /** Whether the work it reports is under way. */
28
+ get isRunning(): boolean;
29
+ /** Whether the work it reports failed. */
30
+ get isError(): boolean;
31
+ /** Whether the work it reports hasn't started. */
32
+ get isPending(): boolean;
33
+ /**
34
+ * What wraps the line and acts for it: the nearest link or button around it (a
35
+ * `TraceCollapsible`'s trigger, an `<a>`, a dialog's or a sheet's trigger), or `null` for a
36
+ * line on its own, which reads as text.
37
+ */
38
+ get control(): HTMLElement | null;
39
+ /** Whether it is a link: wrapped in an `<a href>`. */
40
+ get isLink(): boolean;
41
+ /** Where its link goes, or `null` when it isn't one. */
42
+ get href(): string | null;
43
+ /** Whether its link opens a new tab (`target="_blank"`). */
44
+ get opensInNewTab(): boolean;
45
+ /** Clicks what wraps it, as a reader would. Throws for a line on its own. */
46
+ click(): Promise<void>;
47
+ /** Moves focus to what wraps it. Throws for a line on its own, which isn't a tab stop. */
48
+ focus(): Promise<void>;
49
+ }
50
+ /**
51
+ * Drives a `<TraceCollapsible>` from `@ember-joinery/ember`: a trace row that expands. Its state
52
+ * is read from the trigger's `aria-expanded`, so every test also checks what assistive
53
+ * technology hears:
54
+ *
55
+ * const run = new TraceCollapsibleHarness('node') // <TraceCollapsible @name="node">
56
+ * await run.open()
57
+ * assert.strictEqual(run.line.title, 'Ran node --version')
58
+ * assert.strictEqual(run.text, '$ node --version v24.18.0')
59
+ */
60
+ export declare class TraceCollapsibleHarness extends Harness {
61
+ static component: string;
62
+ /** The button that opens and closes it. */
63
+ get trigger(): HTMLButtonElement;
64
+ /** The line in its trigger. */
65
+ get line(): TraceLineHarness;
66
+ /** The chevron after the line, which turns while it is open. */
67
+ get indicator(): HTMLElement;
68
+ /** The content's element, which is there (`hidden`, empty) while closed. */
69
+ get content(): HTMLElement;
70
+ /** Whether it is open, from the trigger's `aria-expanded`. */
71
+ get isOpen(): boolean;
72
+ /** Whether its content shows: open, or still animating out. */
73
+ get isShown(): boolean;
74
+ /** Whether the trigger can't open or close it. */
75
+ get isDisabled(): boolean;
76
+ /** The trigger's accessible name: its line's text (the chevron is hidden). */
77
+ get label(): string;
78
+ /** The content's text, whitespace collapsed: `''` while it is closed. */
79
+ get text(): string;
80
+ /** Whether the trigger names the content in `aria-controls`, as the ARIA pattern asks. */
81
+ get controlsContent(): boolean;
82
+ /** Clicks the trigger, as a reader does. */
83
+ toggle(): Promise<void>;
84
+ /** Opens it with the trigger, unless it is open. */
85
+ open(): Promise<void>;
86
+ /** Closes it with the trigger, unless it is closed. */
87
+ close(): Promise<void>;
88
+ /** Moves focus to the trigger. */
89
+ focus(): Promise<void>;
90
+ }
91
+ /**
92
+ * Drives a `<Trace>` from `@ember-joinery/ember`: a list of lines. It finds the lines and rows in
93
+ * it, nested ones included, in document order:
94
+ *
95
+ * const trace = new TraceHarness()
96
+ * assert.deepEqual(trace.titles, ['Searched for useChat', 'Ran pnpm test'])
97
+ * await trace.collapsible({ index: 0 }).open()
98
+ */
99
+ export declare class TraceHarness extends Harness {
100
+ static component: string;
101
+ /** Every line in it, nested ones (in a row's content) included, in document order. */
102
+ get lines(): TraceLineHarness[];
103
+ /** Each line's title, in order. */
104
+ get titles(): string[];
105
+ /** Every row that expands in it, nested ones included, in document order. */
106
+ get collapsibles(): TraceCollapsibleHarness[];
107
+ /** A line in it, by `@name` or position. */
108
+ line(options?: string | {
109
+ name?: string;
110
+ index?: number;
111
+ }): TraceLineHarness;
112
+ /** A row in it, by `@name` or position. */
113
+ collapsible(options?: string | {
114
+ name?: string;
115
+ index?: number;
116
+ }): TraceCollapsibleHarness;
117
+ }
118
+ //# sourceMappingURL=trace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../src/trace.ts"],"names":[],"mappings":"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"}
package/dist/trace.js ADDED
@@ -0,0 +1,196 @@
1
+ import { click, focus } from '@ember/test-helpers';
2
+ import { Harness } from "./harness.js";
3
+ import { isShowing } from "./-private/showing.js";
4
+ function text(element) {
5
+ return (element?.textContent ?? '').replace(/\s+/g, ' ').trim();
6
+ }
7
+ /**
8
+ * Drives a `<TraceLine>` from `@ember-joinery/ember`: one line of a trace. It reads the line's
9
+ * title, description and status, and clicks whatever wraps it (a collapsible's trigger, a link,
10
+ * a dialog's or a sheet's trigger), as a reader would:
11
+ *
12
+ * const build = new TraceLineHarness('build') // <TraceLine @name="build" @status="running">
13
+ * assert.true(build.isRunning)
14
+ * assert.strictEqual(build.title, 'Running pnpm build')
15
+ */
16
+ export class TraceLineHarness extends Harness {
17
+ static component = 'trace-line';
18
+ /** All the text it shows, whitespace collapsed: its title, then its description. */
19
+ get text() {
20
+ return text(this.element);
21
+ }
22
+ /** Its title part. Throws when it has none. */
23
+ get titleElement() {
24
+ return this.part('title');
25
+ }
26
+ /** Its title's text, a hidden note (`sr-only`) included, as a screen reader hears it. */
27
+ get title() {
28
+ return text(this.queryPart('title'));
29
+ }
30
+ /** Its description's text, or `''` without one. */
31
+ get description() {
32
+ return text(this.queryPart('description'));
33
+ }
34
+ /** Whether it has a description. */
35
+ get hasDescription() {
36
+ return this.queryPart('description') !== null;
37
+ }
38
+ /** Its icon slots, in order: the action's before the title, an indicator after it. */
39
+ get icons() {
40
+ return this.parts('icon');
41
+ }
42
+ /** Its `@status`: `running`, `error`, `pending`, or `null` for work that is done. */
43
+ get status() {
44
+ return this.element.getAttribute('data-status');
45
+ }
46
+ /** Whether the work it reports is under way. */
47
+ get isRunning() {
48
+ return this.status === 'running';
49
+ }
50
+ /** Whether the work it reports failed. */
51
+ get isError() {
52
+ return this.status === 'error';
53
+ }
54
+ /** Whether the work it reports hasn't started. */
55
+ get isPending() {
56
+ return this.status === 'pending';
57
+ }
58
+ /**
59
+ * What wraps the line and acts for it: the nearest link or button around it (a
60
+ * `TraceCollapsible`'s trigger, an `<a>`, a dialog's or a sheet's trigger), or `null` for a
61
+ * line on its own, which reads as text.
62
+ */
63
+ get control() {
64
+ return this.element.closest('a[href], button');
65
+ }
66
+ /** Whether it is a link: wrapped in an `<a href>`. */
67
+ get isLink() {
68
+ return this.control instanceof HTMLAnchorElement;
69
+ }
70
+ /** Where its link goes, or `null` when it isn't one. */
71
+ get href() {
72
+ return this.isLink ? this.control.getAttribute('href') : null;
73
+ }
74
+ /** Whether its link opens a new tab (`target="_blank"`). */
75
+ get opensInNewTab() {
76
+ return this.isLink && this.control.getAttribute('target') === '_blank';
77
+ }
78
+ /** Clicks what wraps it, as a reader would. Throws for a line on its own. */
79
+ async click() {
80
+ const control = this.control;
81
+ if (!control)
82
+ throw new Error(`Joinery harness: ${this} isn't wrapped in a link or a button`);
83
+ await click(control);
84
+ }
85
+ /** Moves focus to what wraps it. Throws for a line on its own, which isn't a tab stop. */
86
+ async focus() {
87
+ const control = this.control;
88
+ if (!control)
89
+ throw new Error(`Joinery harness: ${this} isn't wrapped in a link or a button`);
90
+ await focus(control);
91
+ }
92
+ }
93
+ /**
94
+ * Drives a `<TraceCollapsible>` from `@ember-joinery/ember`: a trace row that expands. Its state
95
+ * is read from the trigger's `aria-expanded`, so every test also checks what assistive
96
+ * technology hears:
97
+ *
98
+ * const run = new TraceCollapsibleHarness('node') // <TraceCollapsible @name="node">
99
+ * await run.open()
100
+ * assert.strictEqual(run.line.title, 'Ran node --version')
101
+ * assert.strictEqual(run.text, '$ node --version v24.18.0')
102
+ */
103
+ export class TraceCollapsibleHarness extends Harness {
104
+ static component = 'trace-collapsible';
105
+ /** The button that opens and closes it. */
106
+ get trigger() {
107
+ return this.part('trigger');
108
+ }
109
+ /** The line in its trigger. */
110
+ get line() {
111
+ return new TraceLineHarness({ within: this.trigger });
112
+ }
113
+ /** The chevron after the line, which turns while it is open. */
114
+ get indicator() {
115
+ return this.part('indicator');
116
+ }
117
+ /** The content's element, which is there (`hidden`, empty) while closed. */
118
+ get content() {
119
+ return this.part('content');
120
+ }
121
+ /** Whether it is open, from the trigger's `aria-expanded`. */
122
+ get isOpen() {
123
+ return this.trigger.getAttribute('aria-expanded') === 'true';
124
+ }
125
+ /** Whether its content shows: open, or still animating out. */
126
+ get isShown() {
127
+ return isShowing(this.content);
128
+ }
129
+ /** Whether the trigger can't open or close it. */
130
+ get isDisabled() {
131
+ return this.trigger.disabled;
132
+ }
133
+ /** The trigger's accessible name: its line's text (the chevron is hidden). */
134
+ get label() {
135
+ return text(this.trigger);
136
+ }
137
+ /** The content's text, whitespace collapsed: `''` while it is closed. */
138
+ get text() {
139
+ const content = this.content;
140
+ return content.hidden ? '' : text(content);
141
+ }
142
+ /** Whether the trigger names the content in `aria-controls`, as the ARIA pattern asks. */
143
+ get controlsContent() {
144
+ const content = this.content;
145
+ return Boolean(content.id) && this.trigger.getAttribute('aria-controls') === content.id;
146
+ }
147
+ /** Clicks the trigger, as a reader does. */
148
+ async toggle() {
149
+ await click(this.trigger);
150
+ }
151
+ /** Opens it with the trigger, unless it is open. */
152
+ async open() {
153
+ if (!this.isOpen)
154
+ await this.toggle();
155
+ }
156
+ /** Closes it with the trigger, unless it is closed. */
157
+ async close() {
158
+ if (this.isOpen)
159
+ await this.toggle();
160
+ }
161
+ /** Moves focus to the trigger. */
162
+ async focus() {
163
+ await focus(this.trigger);
164
+ }
165
+ }
166
+ /**
167
+ * Drives a `<Trace>` from `@ember-joinery/ember`: a list of lines. It finds the lines and rows in
168
+ * it, nested ones included, in document order:
169
+ *
170
+ * const trace = new TraceHarness()
171
+ * assert.deepEqual(trace.titles, ['Searched for useChat', 'Ran pnpm test'])
172
+ * await trace.collapsible({ index: 0 }).open()
173
+ */
174
+ export class TraceHarness extends Harness {
175
+ static component = 'trace';
176
+ /** Every line in it, nested ones (in a row's content) included, in document order. */
177
+ get lines() {
178
+ return this.findAll(TraceLineHarness);
179
+ }
180
+ /** Each line's title, in order. */
181
+ get titles() {
182
+ return this.lines.map(line => line.title);
183
+ }
184
+ /** Every row that expands in it, nested ones included, in document order. */
185
+ get collapsibles() {
186
+ return this.findAll(TraceCollapsibleHarness);
187
+ }
188
+ /** A line in it, by `@name` or position. */
189
+ line(options) {
190
+ return this.find(TraceLineHarness, options);
191
+ }
192
+ /** A row in it, by `@name` or position. */
193
+ collapsible(options) {
194
+ return this.find(TraceCollapsibleHarness, options);
195
+ }
196
+ }
@@ -0,0 +1,34 @@
1
+ import type { TestHooks } from './test-hooks.ts';
2
+ /** A built-in string, as `@ember-joinery/primitives/i18n` declares it (the msgid contract). */
3
+ export interface TranslatorMessage {
4
+ id: string;
5
+ message: string;
6
+ plural?: string;
7
+ context?: string;
8
+ description?: string;
9
+ }
10
+ /** What translates Joinery's built-in strings, as `@ember-joinery/primitives/i18n` declares it. */
11
+ export interface TestTranslator {
12
+ readonly locale: string;
13
+ t(message: TranslatorMessage, values?: Record<string, unknown>): string;
14
+ }
15
+ /**
16
+ * Registers `translator` as the test's `translator:main` before each test, so Joinery's
17
+ * components show their built-in strings through it. Call it after `setupRenderingTest(hooks)`
18
+ * or `setupApplicationTest(hooks)`.
19
+ *
20
+ * module('in French', function (hooks) {
21
+ * setupRenderingTest(hooks)
22
+ * setupTranslator(hooks, myTranslator)
23
+ * })
24
+ */
25
+ export declare function setupTranslator(hooks: TestHooks, translator: TestTranslator): void;
26
+ /**
27
+ * A pseudo-locale (`en-XA`): every string comes out accented and wrapped, `⟦Ćĺóśé⟧`, so a test
28
+ * can tell a built-in string that went through the translator from one that skipped it. Values
29
+ * (a name, a number, a date) are interpolated as given.
30
+ *
31
+ * setupTranslator(hooks, pseudoTranslator)
32
+ */
33
+ export declare const pseudoTranslator: TestTranslator;
34
+ //# sourceMappingURL=translator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../src/translator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,+FAA+F;AAC/F,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,mGAAmG;AACnG,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,CAAC,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAA;CACxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,GAAG,IAAI,CAWlF;AA6CD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAO9B,CAAA"}
@@ -0,0 +1,75 @@
1
+ import { isNumber } from '@sindresorhus/is';
2
+ import { getContext } from '@ember/test-helpers';
3
+ /**
4
+ * Registers `translator` as the test's `translator:main` before each test, so Joinery's
5
+ * components show their built-in strings through it. Call it after `setupRenderingTest(hooks)`
6
+ * or `setupApplicationTest(hooks)`.
7
+ *
8
+ * module('in French', function (hooks) {
9
+ * setupRenderingTest(hooks)
10
+ * setupTranslator(hooks, myTranslator)
11
+ * })
12
+ */
13
+ export function setupTranslator(hooks, translator) {
14
+ hooks.beforeEach(() => {
15
+ const context = getContext();
16
+ if (!context?.owner) {
17
+ throw new Error('Joinery: setupTranslator(hooks) found no test owner; call it after setupRenderingTest(hooks) or setupApplicationTest(hooks)');
18
+ }
19
+ context.owner.register('translator:main', translator, { instantiate: false });
20
+ });
21
+ }
22
+ const ACCENTS = {
23
+ a: 'á',
24
+ c: 'ç',
25
+ e: 'é',
26
+ i: 'í',
27
+ n: 'ñ',
28
+ o: 'ó',
29
+ s: 'ś',
30
+ u: 'ú',
31
+ y: 'ý',
32
+ z: 'ź',
33
+ A: 'Á',
34
+ C: 'Ç',
35
+ E: 'É',
36
+ I: 'Í',
37
+ N: 'Ñ',
38
+ O: 'Ó',
39
+ S: 'Ś',
40
+ U: 'Ú',
41
+ Y: 'Ý',
42
+ Z: 'Ź',
43
+ };
44
+ // The English, accented outside its `{placeholders}`, so a value passed in shows as given.
45
+ function accent(text) {
46
+ return text.replace(/\{\w+\}|[A-Za-z]/g, match => ACCENTS[match] ?? match);
47
+ }
48
+ // shortcut: a local copy of the msgid contract's English formatting, until msgid is published.
49
+ function format(message, values) {
50
+ const count = values?.['count'];
51
+ const text = message.plural !== undefined &&
52
+ isNumber(count) &&
53
+ new Intl.PluralRules('en').select(count) !== 'one'
54
+ ? message.plural
55
+ : message.message;
56
+ if (!values)
57
+ return text;
58
+ return text.replace(/\{(\w+)\}/g, (placeholder, name) => Object.hasOwn(values, name) ? String(values[name]) : placeholder);
59
+ }
60
+ /**
61
+ * A pseudo-locale (`en-XA`): every string comes out accented and wrapped, `⟦Ćĺóśé⟧`, so a test
62
+ * can tell a built-in string that went through the translator from one that skipped it. Values
63
+ * (a name, a number, a date) are interpolated as given.
64
+ *
65
+ * setupTranslator(hooks, pseudoTranslator)
66
+ */
67
+ export const pseudoTranslator = {
68
+ locale: 'en-XA',
69
+ t(message, values) {
70
+ const accented = { ...message, message: accent(message.message) };
71
+ if (message.plural !== undefined)
72
+ accented.plural = accent(message.plural);
73
+ return `⟦${format(accented, values)}⟧`;
74
+ },
75
+ };
@@ -0,0 +1,51 @@
1
+ import { Harness } from './harness.ts';
2
+ /**
3
+ * Drives a `<Zoetrope>` from `@ember-joinery/primitives/zoetrope`: its items, which of them are
4
+ * in view, and the buttons that scroll it. It is ember-primitives' `ZoetropeHelper`, as a
5
+ * harness.
6
+ *
7
+ * const releases = new ZoetropeHarness('releases') // <Zoetrope @name="releases">
8
+ * assert.strictEqual(releases.visibleItemCount, 2)
9
+ * await releases.scrollRight()
10
+ * assert.false(releases.canScrollRight)
11
+ *
12
+ * `scrollLeft()` and `scrollRight()` click the `scroll-left` and `scroll-right` parts: the
13
+ * default buttons, or yours in `<:controls>` when they carry `data-test-jn-part="scroll-left"`
14
+ * and `"scroll-right"`.
15
+ */
16
+ export declare class ZoetropeHarness extends Harness {
17
+ static component: string;
18
+ /** The header block's element, or `null` without one. */
19
+ get header(): HTMLElement | null;
20
+ /** The default buttons' element, or `null` when they aren't shown. */
21
+ get controls(): HTMLElement | null;
22
+ /** The track the items are in, which scrolls. */
23
+ get scroller(): HTMLElement;
24
+ /** The button that scrolls left, or `null` when there is none (nothing to scroll). */
25
+ get leftButton(): HTMLButtonElement | null;
26
+ /** The button that scrolls right, or `null` when there is none. */
27
+ get rightButton(): HTMLButtonElement | null;
28
+ /** Every item, in order. */
29
+ get items(): HTMLElement[];
30
+ /**
31
+ * The items at least partly inside the track's box, in order: what a user sees of the row.
32
+ */
33
+ get visibleItems(): HTMLElement[];
34
+ /** How many items are at least partly in view. */
35
+ get visibleItemCount(): number;
36
+ /** How far the track is scrolled from where its items start, in pixels, in either direction. */
37
+ get scrolled(): number;
38
+ /** Whether there is a left button and it can be used. */
39
+ get canScrollLeft(): boolean;
40
+ /** Whether there is a right button and it can be used. */
41
+ get canScrollRight(): boolean;
42
+ /** Clicks the left button, and waits for the scroll to end. */
43
+ scrollLeft(): Promise<void>;
44
+ /** Clicks the right button, and waits for the scroll to end. */
45
+ scrollRight(): Promise<void>;
46
+ /** Moves focus to an item, by its index, as a click or a script would. */
47
+ focusItem(index: number): Promise<void>;
48
+ /** The index of the item that has focus, or `-1`. */
49
+ get focusedIndex(): number;
50
+ }
51
+ //# sourceMappingURL=zoetrope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoetrope.d.ts","sourceRoot":"","sources":["../src/zoetrope.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC;;;;;;;;;;;;;GAaG;AACH,qBAAa,eAAgB,SAAQ,OAAO;IAC1C,OAAgB,SAAS,SAAa;IAEtC,yDAAyD;IACzD,IAAI,MAAM,IAAI,WAAW,GAAG,IAAI,CAE/B;IAED,sEAAsE;IACtE,IAAI,QAAQ,IAAI,WAAW,GAAG,IAAI,CAEjC;IAED,iDAAiD;IACjD,IAAI,QAAQ,IAAI,WAAW,CAE1B;IAED,sFAAsF;IACtF,IAAI,UAAU,IAAI,iBAAiB,GAAG,IAAI,CAEzC;IAED,mEAAmE;IACnE,IAAI,WAAW,IAAI,iBAAiB,GAAG,IAAI,CAE1C;IAED,4BAA4B;IAC5B,IAAI,KAAK,IAAI,WAAW,EAAE,CAEzB;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,WAAW,EAAE,CAMhC;IAED,kDAAkD;IAClD,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED,gGAAgG;IAChG,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,yDAAyD;IACzD,IAAI,aAAa,IAAI,OAAO,CAG3B;IAED,0DAA0D;IAC1D,IAAI,cAAc,IAAI,OAAO,CAG5B;IAED,+DAA+D;IACzD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAKjC,gEAAgE;IAC1D,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC,0EAA0E;IACpE,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C,qDAAqD;IACrD,IAAI,YAAY,IAAI,MAAM,CAGzB;CACF"}
@@ -0,0 +1,94 @@
1
+ import { click, focus } from '@ember/test-helpers';
2
+ import { Harness } from "./harness.js";
3
+ import { waitForObservers } from "./observers.js";
4
+ /**
5
+ * Drives a `<Zoetrope>` from `@ember-joinery/primitives/zoetrope`: its items, which of them are
6
+ * in view, and the buttons that scroll it. It is ember-primitives' `ZoetropeHelper`, as a
7
+ * harness.
8
+ *
9
+ * const releases = new ZoetropeHarness('releases') // <Zoetrope @name="releases">
10
+ * assert.strictEqual(releases.visibleItemCount, 2)
11
+ * await releases.scrollRight()
12
+ * assert.false(releases.canScrollRight)
13
+ *
14
+ * `scrollLeft()` and `scrollRight()` click the `scroll-left` and `scroll-right` parts: the
15
+ * default buttons, or yours in `<:controls>` when they carry `data-test-jn-part="scroll-left"`
16
+ * and `"scroll-right"`.
17
+ */
18
+ export class ZoetropeHarness extends Harness {
19
+ static component = 'zoetrope';
20
+ /** The header block's element, or `null` without one. */
21
+ get header() {
22
+ return this.queryPart('header');
23
+ }
24
+ /** The default buttons' element, or `null` when they aren't shown. */
25
+ get controls() {
26
+ return this.queryPart('controls');
27
+ }
28
+ /** The track the items are in, which scrolls. */
29
+ get scroller() {
30
+ return this.part('scroller');
31
+ }
32
+ /** The button that scrolls left, or `null` when there is none (nothing to scroll). */
33
+ get leftButton() {
34
+ return this.queryPart('scroll-left');
35
+ }
36
+ /** The button that scrolls right, or `null` when there is none. */
37
+ get rightButton() {
38
+ return this.queryPart('scroll-right');
39
+ }
40
+ /** Every item, in order. */
41
+ get items() {
42
+ return [...this.scroller.children];
43
+ }
44
+ /**
45
+ * The items at least partly inside the track's box, in order: what a user sees of the row.
46
+ */
47
+ get visibleItems() {
48
+ const track = this.scroller.getBoundingClientRect();
49
+ return this.items.filter(item => {
50
+ const box = item.getBoundingClientRect();
51
+ return box.right > track.left && box.left < track.right;
52
+ });
53
+ }
54
+ /** How many items are at least partly in view. */
55
+ get visibleItemCount() {
56
+ return this.visibleItems.length;
57
+ }
58
+ /** How far the track is scrolled from where its items start, in pixels, in either direction. */
59
+ get scrolled() {
60
+ return Math.abs(this.scroller.scrollLeft);
61
+ }
62
+ /** Whether there is a left button and it can be used. */
63
+ get canScrollLeft() {
64
+ const button = this.leftButton;
65
+ return Boolean(button && !button.disabled);
66
+ }
67
+ /** Whether there is a right button and it can be used. */
68
+ get canScrollRight() {
69
+ const button = this.rightButton;
70
+ return Boolean(button && !button.disabled);
71
+ }
72
+ /** Clicks the left button, and waits for the scroll to end. */
73
+ async scrollLeft() {
74
+ await click(this.part('scroll-left'));
75
+ await waitForObservers();
76
+ }
77
+ /** Clicks the right button, and waits for the scroll to end. */
78
+ async scrollRight() {
79
+ await click(this.part('scroll-right'));
80
+ await waitForObservers();
81
+ }
82
+ /** Moves focus to an item, by its index, as a click or a script would. */
83
+ async focusItem(index) {
84
+ const item = this.items[index];
85
+ if (!item)
86
+ throw new Error(`Joinery harness: ${this} has no item ${index}`);
87
+ await focus(item);
88
+ }
89
+ /** The index of the item that has focus, or `-1`. */
90
+ get focusedIndex() {
91
+ const active = this.element.ownerDocument.activeElement;
92
+ return this.items.findIndex(item => item === active);
93
+ }
94
+ }
package/package.json CHANGED
@@ -1,6 +1,71 @@
1
1
  {
2
2
  "name": "@ember-joinery/test-support",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.1",
4
+ "description": "A test harness for every Joinery primitive and component, driven through data-test-jn selectors and ARIA.",
5
+ "keywords": [
6
+ "ember-addon",
7
+ "ember",
8
+ "testing",
9
+ "harness",
10
+ "joinery"
11
+ ],
12
+ "license": "MIT",
13
+ "author": "Joe Gaudet <joe@joegaudet.com>",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/joegaudet/ember-joinery.git",
17
+ "directory": "packages/test-support"
18
+ },
19
+ "homepage": "https://joegaudet.com/ember-joinery/",
20
+ "bugs": "https://github.com/joegaudet/ember-joinery/issues",
21
+ "type": "module",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "default": "./dist/index.js"
26
+ },
27
+ "./addon-main.js": "./addon-main.cjs"
28
+ },
29
+ "files": [
30
+ "addon-main.cjs",
31
+ "dist",
32
+ "README.md",
33
+ "CHANGELOG.md",
34
+ "LICENSE.md",
35
+ "NOTICE"
36
+ ],
37
+ "sideEffects": false,
38
+ "dependencies": {
39
+ "@embroider/addon-shim": "^1.10.3",
40
+ "@sindresorhus/is": "^8.1.0"
41
+ },
42
+ "peerDependencies": {
43
+ "@ember/test-helpers": ">= 5.0.0"
44
+ },
45
+ "devDependencies": {
46
+ "@ember/library-tsconfig": "^3.0.0",
47
+ "@ember/test-helpers": "^5.7.0",
48
+ "ember-source": "~7.3.0",
49
+ "typescript": "~6.0.3"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "engines": {
55
+ "node": ">=22.12.0"
56
+ },
57
+ "ember-addon": {
58
+ "version": 2,
59
+ "type": "addon",
60
+ "main": "addon-main.cjs"
61
+ },
62
+ "joinery": {
63
+ "barrels": [
64
+ "src"
65
+ ]
66
+ },
67
+ "scripts": {
68
+ "build": "node ../../scripts/gen-barrels.mjs . && rm -rf dist && tsc -p tsconfig.json",
69
+ "typecheck": "node ../../scripts/gen-barrels.mjs . && tsc -p tsconfig.json --noEmit && tsc -p type-tests/tsconfig.json"
70
+ }
6
71
  }