1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | import { locator } from '@instructure/ui-test-locator'
|
26 |
|
27 | import {
|
28 | accessible,
|
29 | parseQueryArguments,
|
30 | findWithLabel,
|
31 | findWithText,
|
32 | findWithTitle,
|
33 | findByQuery,
|
34 | findAllByQuery,
|
35 | matchesSelector,
|
36 | querySelectorAll,
|
37 | querySelector,
|
38 | firstOrNull,
|
39 | wrapQueryResult,
|
40 | find,
|
41 | findAll,
|
42 | findAllFrames,
|
43 | findFrame,
|
44 | debug
|
45 | } from '@instructure/ui-test-queries'
|
46 |
|
47 | import {
|
48 | mount,
|
49 | unmount,
|
50 | stub,
|
51 | spy,
|
52 | viewport,
|
53 | match
|
54 | } from '@instructure/ui-test-sandbox'
|
55 | import type {
|
56 | SinonStub,
|
57 | SinonSpy,
|
58 | SinonSandbox
|
59 | } from '@instructure/ui-test-sandbox'
|
60 |
|
61 | import './utils/shims'
|
62 |
|
63 | import { waitForExpect } from './utils/waitForExpect'
|
64 | import { expect } from './utils/expect'
|
65 |
|
66 | import { generateA11yTests } from './utils/generateA11yTests'
|
67 | import {
|
68 | generateComponentExamples,
|
69 | StoryConfig,
|
70 | Example,
|
71 | ExamplesPage
|
72 | } from './utils/generateComponentExamples'
|
73 | import { generatePropCombinations } from './utils/generatePropCombinations'
|
74 |
|
75 |
|
76 | declare global {
|
77 |
|
78 | export namespace Chai {
|
79 | interface Assertion {
|
80 |
|
81 | readonly contain: Assertion
|
82 | exactly(expected: number): Assertion
|
83 | text(expected: string): void
|
84 | className(expected: string): void
|
85 | descendants(expected: string): void
|
86 | children(expected: string): void
|
87 | ancestors(expected: string): void
|
88 | parents(expected: string): void
|
89 | attribute(
|
90 | expectedAttribute: string,
|
91 | expectedAttributeValue?: string
|
92 | ): void
|
93 | style(expected: string, expectedAttributeValue?: string | number): void
|
94 | bounds(expected: string, expectedAttributeValue?: string | number): void
|
95 | tagName(expected: string): void
|
96 | id(expected: string): void
|
97 | visible(): boolean
|
98 | clickable(): boolean
|
99 | focus(): boolean
|
100 | focused(): boolean
|
101 | focusable(): boolean
|
102 | tabbable(): boolean
|
103 | checked(): boolean
|
104 | selected(): boolean
|
105 | disabled(): boolean
|
106 | enabled(): boolean
|
107 | readonly(): boolean
|
108 | accessible(): boolean
|
109 | role(expected: string): void
|
110 | title(expected: string): void
|
111 | value(expected: string): void
|
112 | label(expected: string): void
|
113 | }
|
114 | }
|
115 | }
|
116 |
|
117 | export type {
|
118 | StoryConfig,
|
119 | Example,
|
120 | ExamplesPage,
|
121 | SinonStub,
|
122 | SinonSpy,
|
123 | SinonSandbox
|
124 | }
|
125 |
|
126 |
|
127 | const within = wrapQueryResult
|
128 | const wrap = wrapQueryResult
|
129 | const wait = waitForExpect
|
130 |
|
131 | export {
|
132 | generateComponentExamples,
|
133 | generatePropCombinations,
|
134 | generateA11yTests,
|
135 | viewport,
|
136 | accessible,
|
137 | parseQueryArguments,
|
138 | findWithLabel,
|
139 | findWithText,
|
140 | findWithTitle,
|
141 | findByQuery,
|
142 | findAllByQuery,
|
143 | matchesSelector,
|
144 | querySelectorAll,
|
145 | querySelector,
|
146 | locator,
|
147 | firstOrNull,
|
148 | within,
|
149 | wrapQueryResult,
|
150 | wrap,
|
151 | waitForExpect,
|
152 | wait,
|
153 | expect,
|
154 | mount,
|
155 | unmount,
|
156 | stub,
|
157 | spy,
|
158 | match,
|
159 | find,
|
160 | findAll,
|
161 | findAllFrames,
|
162 | findFrame,
|
163 | debug
|
164 | }
|