@leaflink/dom-testing-utils 0.0.0-PR-143--478f586 → 0.0.0-PR-143--cbd7d06
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.
- package/dist/utils/__tests__/assertSelectElementItems.spec.d.ts +1 -0
- package/dist/utils/__tests__/assertSelectElementItems.spec.js +68 -0
- package/dist/utils/__tests__/assertSelectElementItems.spec.js.map +1 -0
- package/dist/utils/__tests__/setSelectElementItems.spec.d.ts +1 -0
- package/dist/utils/__tests__/setSelectElementItems.spec.js +59 -0
- package/dist/utils/__tests__/setSelectElementItems.spec.js.map +1 -0
- package/dist/utils/__tests__/setSelectElementRandomItems.spec.d.ts +1 -0
- package/dist/utils/__tests__/setSelectElementRandomItems.spec.js +48 -0
- package/dist/utils/__tests__/setSelectElementRandomItems.spec.js.map +1 -0
- package/dist/utils/assertSelectElementItems.d.ts +31 -2
- package/dist/utils/assertSelectElementItems.js +26 -1
- package/dist/utils/assertSelectElementItems.js.map +1 -1
- package/dist/utils/getSelectElementItems.d.ts +5 -2
- package/dist/utils/getSelectElementItems.js +1 -1
- package/dist/utils/getSelectElementItems.js.map +1 -1
- package/dist/utils/getSelectElementOptions.d.ts +6 -1
- package/dist/utils/getSelectElementOptions.js +1 -1
- package/dist/utils/getSelectElementOptions.js.map +1 -1
- package/dist/utils/getSelectElementValues.d.ts +1 -1
- package/dist/utils/getSelectElementValues.js +1 -1
- package/dist/utils/setSelectElementItems.d.ts +6 -2
- package/dist/utils/setSelectElementItems.js +4 -1
- package/dist/utils/setSelectElementItems.js.map +1 -1
- package/dist/utils/setSelectElementRandomItems.d.ts +16 -2
- package/dist/utils/setSelectElementRandomItems.js +11 -1
- package/dist/utils/setSelectElementRandomItems.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import userEvent from '@testing-library/user-event';
|
|
2
|
+
import { render, screen } from '@testing-library/vue';
|
|
3
|
+
import assertSelectElementItems from '../assertSelectElementItems';
|
|
4
|
+
// single-select template
|
|
5
|
+
const singleTemplate = `
|
|
6
|
+
<div>
|
|
7
|
+
<label for="color-select">Color</label>
|
|
8
|
+
<select id="color-select">
|
|
9
|
+
<option value="apple">Apple</option>
|
|
10
|
+
<option value="banana">Banana</option>
|
|
11
|
+
<option value="cherry">Cherry</option>
|
|
12
|
+
</select>
|
|
13
|
+
</div>
|
|
14
|
+
`;
|
|
15
|
+
const multipleTemplate = `
|
|
16
|
+
<div>
|
|
17
|
+
<label for="fruit-select">Fruits</label>
|
|
18
|
+
<select id="fruit-select" multiple>
|
|
19
|
+
<option value="apple">Apple</option>
|
|
20
|
+
<option value="banana">Banana</option>
|
|
21
|
+
<option value="cherry">Cherry</option>
|
|
22
|
+
</select>
|
|
23
|
+
</div>
|
|
24
|
+
`;
|
|
25
|
+
it('asserts a selected option for a single-select element by label', async () => {
|
|
26
|
+
const { container } = render({ template: singleTemplate });
|
|
27
|
+
const selectSingle = screen.getByLabelText('Color');
|
|
28
|
+
await userEvent.selectOptions(selectSingle, 'banana');
|
|
29
|
+
// should not throw
|
|
30
|
+
assertSelectElementItems({
|
|
31
|
+
label: 'Color',
|
|
32
|
+
values: 'banana',
|
|
33
|
+
withinElement: container,
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
it('asserts a single selected option by label', async () => {
|
|
37
|
+
const { container } = render({ template: multipleTemplate });
|
|
38
|
+
const select = screen.getByLabelText('Fruits');
|
|
39
|
+
await userEvent.selectOptions(select, 'banana');
|
|
40
|
+
// should not throw
|
|
41
|
+
assertSelectElementItems({
|
|
42
|
+
label: 'Fruits',
|
|
43
|
+
values: 'banana',
|
|
44
|
+
withinElement: container,
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
it('asserts multiple selected options by element', async () => {
|
|
48
|
+
const { container } = render({ template: multipleTemplate });
|
|
49
|
+
const select = screen.getByLabelText('Fruits');
|
|
50
|
+
await userEvent.selectOptions(select, ['apple', 'cherry']);
|
|
51
|
+
// should not throw
|
|
52
|
+
assertSelectElementItems({
|
|
53
|
+
element: select,
|
|
54
|
+
values: ['apple', 'cherry'],
|
|
55
|
+
withinElement: container,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
it('throws when selected values do not match expected', async () => {
|
|
59
|
+
const { container } = render({ template: multipleTemplate });
|
|
60
|
+
const select = screen.getByLabelText('Fruits');
|
|
61
|
+
await userEvent.selectOptions(select, 'apple');
|
|
62
|
+
expect(() => assertSelectElementItems({
|
|
63
|
+
label: 'Fruits',
|
|
64
|
+
values: ['banana'],
|
|
65
|
+
withinElement: container,
|
|
66
|
+
})).toThrow();
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=assertSelectElementItems.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertSelectElementItems.spec.js","sourceRoot":"src/","sources":["utils/__tests__/assertSelectElementItems.spec.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,yBAAyB;AACzB,MAAM,cAAc,GAAG;;;;;;;;;CAStB,CAAC;AAEF,MAAM,gBAAgB,GAAG;;;;;;;;;GAStB,CAAC;AAEJ,EAAE,CAAC,gEAAgE,EAAE,KAAK,IAAI,EAAE;IAC9E,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IAC3D,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAoB,OAAO,CAAC,CAAC;IACvE,MAAM,SAAS,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAEtD,mBAAmB;IACnB,wBAAwB,CAAC;QACvB,KAAK,EAAE,OAAO;QACd,MAAM,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,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/C,MAAM,CAAC,GAAG,EAAE,CACV,wBAAwB,CAAC;QACvB,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,aAAa,EAAE,SAAwB;KACxC,CAAC,CACH,CAAC,OAAO,EAAE,CAAC;AACd,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/vue';
|
|
2
|
+
import getSelectElementItems from '../getSelectElementItems';
|
|
3
|
+
import setSelectElementItems from '../setSelectElementItems';
|
|
4
|
+
const singleTemplate = `
|
|
5
|
+
<div>
|
|
6
|
+
<label for="color-select">Color</label>
|
|
7
|
+
<select id="color-select">
|
|
8
|
+
<option value="apple">Apple</option>
|
|
9
|
+
<option value="banana">Banana</option>
|
|
10
|
+
<option value="cherry">Cherry</option>
|
|
11
|
+
</select>
|
|
12
|
+
</div>
|
|
13
|
+
`;
|
|
14
|
+
const multipleTemplate = `
|
|
15
|
+
<div>
|
|
16
|
+
<label for="fruit-select">Fruits</label>
|
|
17
|
+
<select id="fruit-select" multiple>
|
|
18
|
+
<option value="apple">Apple</option>
|
|
19
|
+
<option value="banana">Banana</option>
|
|
20
|
+
<option value="cherry">Cherry</option>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
it('sets a single-select option by label', async () => {
|
|
25
|
+
const { container } = render({ template: singleTemplate });
|
|
26
|
+
await setSelectElementItems({
|
|
27
|
+
label: 'Color',
|
|
28
|
+
selectedOptionValues: ['apple'],
|
|
29
|
+
withinElement: container,
|
|
30
|
+
});
|
|
31
|
+
const select = screen.getByLabelText('Color');
|
|
32
|
+
expect(getSelectElementItems({ element: select, withinElement: container })).toEqual(['apple']);
|
|
33
|
+
});
|
|
34
|
+
it('sets multiple-select options by element', async () => {
|
|
35
|
+
const { container } = render({ template: multipleTemplate });
|
|
36
|
+
const select = screen.getByLabelText('Fruits');
|
|
37
|
+
await setSelectElementItems({
|
|
38
|
+
element: select,
|
|
39
|
+
selectedOptionValues: ['apple', 'cherry'],
|
|
40
|
+
withinElement: container,
|
|
41
|
+
});
|
|
42
|
+
expect(getSelectElementItems({ element: select, withinElement: container })).toEqual([
|
|
43
|
+
'apple',
|
|
44
|
+
'cherry',
|
|
45
|
+
]);
|
|
46
|
+
});
|
|
47
|
+
it('throws when selecting multiple values on a single-select', async () => {
|
|
48
|
+
const { container } = render({ template: singleTemplate });
|
|
49
|
+
await expect(setSelectElementItems({
|
|
50
|
+
label: 'Color',
|
|
51
|
+
selectedOptionValues: ['apple', 'banana'],
|
|
52
|
+
withinElement: container,
|
|
53
|
+
})).rejects.toThrow(/Cannot select multiple options on a single-select element/);
|
|
54
|
+
});
|
|
55
|
+
it('throws when neither element nor label is provided', async () => {
|
|
56
|
+
const { container } = render({ template: singleTemplate });
|
|
57
|
+
await expect(setSelectElementItems({ selectedOptionValues: ['apple'], withinElement: container })).rejects.toThrow(/a select element or its associated label is required/);
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=setSelectElementItems.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setSelectElementItems.spec.js","sourceRoot":"src/","sources":["utils/__tests__/setSelectElementItems.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D,MAAM,cAAc,GAAG;;;;;;;;;CAStB,CAAC;AAEF,MAAM,gBAAgB,GAAG;;;;;;;;;CASxB,CAAC;AAEF,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;IACpD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,EAAE,QAAQ,EAAE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,CACH,CAAC,OAAO,CAAC,OAAO,CAAC,2DAA2D,CAAC,CAAC;AACjF,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;IACjE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IAC3D,MAAM,MAAM,CACV,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,SAAwB,EAAE,CAAC,CACpG,CAAC,OAAO,CAAC,OAAO,CAAC,sDAAsD,CAAC,CAAC;AAC5E,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/vue';
|
|
2
|
+
import getSelectElementItems from '../getSelectElementItems';
|
|
3
|
+
import setSelectElementRandomItems from '../setSelectElementRandomItems';
|
|
4
|
+
const template = `
|
|
5
|
+
<div>
|
|
6
|
+
<label for="fruit-select">Fruits</label>
|
|
7
|
+
<select id="fruit-select" multiple>
|
|
8
|
+
<option value="apple">Apple</option>
|
|
9
|
+
<option value="banana">Banana</option>
|
|
10
|
+
<option value="cherry">Cherry</option>
|
|
11
|
+
</select>
|
|
12
|
+
</div>
|
|
13
|
+
`;
|
|
14
|
+
it('selects random options by label', async () => {
|
|
15
|
+
const { container } = render({ template });
|
|
16
|
+
const select = screen.getByLabelText('Fruits');
|
|
17
|
+
const selected = await setSelectElementRandomItems({
|
|
18
|
+
label: 'Fruits',
|
|
19
|
+
numOfItems: 2,
|
|
20
|
+
withinElement: container,
|
|
21
|
+
});
|
|
22
|
+
expect(getSelectElementItems({ element: select, withinElement: container })).toEqual(expect.arrayContaining(selected));
|
|
23
|
+
expect(selected).toHaveLength(2);
|
|
24
|
+
});
|
|
25
|
+
it('selects random options by element', async () => {
|
|
26
|
+
const { container } = render({ template });
|
|
27
|
+
const select = screen.getByLabelText('Fruits');
|
|
28
|
+
const selected = await setSelectElementRandomItems({
|
|
29
|
+
element: select,
|
|
30
|
+
numOfItems: 1,
|
|
31
|
+
withinElement: container,
|
|
32
|
+
});
|
|
33
|
+
expect(getSelectElementItems({ element: select, withinElement: container })).toEqual(expect.arrayContaining(selected));
|
|
34
|
+
expect(selected).toHaveLength(1);
|
|
35
|
+
});
|
|
36
|
+
it('throws when requesting more items than available', async () => {
|
|
37
|
+
const { container } = render({ template });
|
|
38
|
+
await expect(setSelectElementRandomItems({
|
|
39
|
+
label: 'Fruits',
|
|
40
|
+
numOfItems: 5,
|
|
41
|
+
withinElement: container,
|
|
42
|
+
})).rejects.toThrow();
|
|
43
|
+
});
|
|
44
|
+
it('throws when neither element nor label is provided', async () => {
|
|
45
|
+
const { container } = render({ template });
|
|
46
|
+
await expect(setSelectElementRandomItems({ numOfItems: 1, withinElement: container })).rejects.toThrow();
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=setSelectElementRandomItems.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setSelectElementRandomItems.spec.js","sourceRoot":"src/","sources":["utils/__tests__/setSelectElementRandomItems.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,QAAQ,GAAG;;;;;;;;;CAShB,CAAC;AAEF,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;IAC/C,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAAoB,QAAQ,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,MAAM,2BAA2B,CAAC;QACjD,KAAK,EAAE,QAAQ;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;AAEH,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;IACjE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,MAAM,MAAM,CACV,2BAA2B,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,SAAwB,EAAE,CAAC,CACxF,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC"}
|
|
@@ -1,17 +1,46 @@
|
|
|
1
1
|
export interface AssertSelectElementItemsArgs {
|
|
2
|
+
/** The select element to check. If omitted, `label` is used to find it. */
|
|
2
3
|
element?: HTMLSelectElement;
|
|
4
|
+
/** Accessible name of the select element; used when `element` is not provided. */
|
|
3
5
|
label?: string;
|
|
6
|
+
/** Expected selected value or array of values. */
|
|
4
7
|
values: string | string[];
|
|
5
|
-
|
|
8
|
+
/** Root container to scope the query; defaults to document.body. */
|
|
9
|
+
withinElement?: HTMLElement;
|
|
6
10
|
}
|
|
7
11
|
/**
|
|
8
12
|
* Asserts that the selected values of a <select> element match the expected values.
|
|
9
13
|
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // single value
|
|
17
|
+
* assertSelectElementItems({
|
|
18
|
+
* label: 'Fruits',
|
|
19
|
+
* values: 'apple',
|
|
20
|
+
* withinElement: container,
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* // multiple values
|
|
24
|
+
* assertSelectElementItems({
|
|
25
|
+
* label: 'Fruits',
|
|
26
|
+
* values: ['apple', 'banana'],
|
|
27
|
+
* withinElement: container,
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* // using element directly
|
|
31
|
+
* const select = container.querySelector<HTMLSelectElement>('#fruit-select');
|
|
32
|
+
* assertSelectElementItems({
|
|
33
|
+
* element: selectElement,
|
|
34
|
+
* values: ['apple', 'banana'],
|
|
35
|
+
* withinElement: container,
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
10
39
|
* @param options Options for assertion.
|
|
11
40
|
* @param [options.element] The select element to check. If omitted, `label` is used to find it.
|
|
12
41
|
* @param [options.label] Accessible name of the select element; used when `element` is not provided.
|
|
13
42
|
* @param options.values Expected selected value or array of values.
|
|
14
|
-
* @param options.withinElement
|
|
43
|
+
* @param [options.withinElement] Root container to scope the query; defaults to document.body.
|
|
15
44
|
* @returns void
|
|
16
45
|
*/
|
|
17
46
|
export default function assertSelectElementItems({ element, label, values, withinElement, }: AssertSelectElementItemsArgs): void;
|
|
@@ -2,11 +2,36 @@ import getSelectElementItems from './getSelectElementItems';
|
|
|
2
2
|
/**
|
|
3
3
|
* Asserts that the selected values of a <select> element match the expected values.
|
|
4
4
|
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* // single value
|
|
8
|
+
* assertSelectElementItems({
|
|
9
|
+
* label: 'Fruits',
|
|
10
|
+
* values: 'apple',
|
|
11
|
+
* withinElement: container,
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* // multiple values
|
|
15
|
+
* assertSelectElementItems({
|
|
16
|
+
* label: 'Fruits',
|
|
17
|
+
* values: ['apple', 'banana'],
|
|
18
|
+
* withinElement: container,
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // using element directly
|
|
22
|
+
* const select = container.querySelector<HTMLSelectElement>('#fruit-select');
|
|
23
|
+
* assertSelectElementItems({
|
|
24
|
+
* element: selectElement,
|
|
25
|
+
* values: ['apple', 'banana'],
|
|
26
|
+
* withinElement: container,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
5
30
|
* @param options Options for assertion.
|
|
6
31
|
* @param [options.element] The select element to check. If omitted, `label` is used to find it.
|
|
7
32
|
* @param [options.label] Accessible name of the select element; used when `element` is not provided.
|
|
8
33
|
* @param options.values Expected selected value or array of values.
|
|
9
|
-
* @param options.withinElement
|
|
34
|
+
* @param [options.withinElement] Root container to scope the query; defaults to document.body.
|
|
10
35
|
* @returns void
|
|
11
36
|
*/
|
|
12
37
|
export default function assertSelectElementItems({ element, label, values, withinElement, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertSelectElementItems.js","sourceRoot":"src/","sources":["utils/assertSelectElementItems.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"assertSelectElementItems.js","sourceRoot":"src/","sources":["utils/assertSelectElementItems.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAa5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,OAAO,EACP,KAAK,EACL,MAAM,EACN,aAAa,GACgB;IAC7B,MAAM,cAAc,GAAG,qBAAqB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEtE,2CAA2C;IAC3C,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export interface GetSelectElementItemsArgs {
|
|
2
|
+
/** The select element to query. */
|
|
2
3
|
element?: HTMLSelectElement;
|
|
4
|
+
/** Accessible name to find the select element. */
|
|
3
5
|
label?: string;
|
|
4
|
-
|
|
6
|
+
/** Root container to scope the query; defaults to document.body. */
|
|
7
|
+
withinElement?: HTMLElement;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
7
10
|
* Returns the selected option values from a <select> element.
|
|
@@ -9,7 +12,7 @@ export interface GetSelectElementItemsArgs {
|
|
|
9
12
|
* @param args Options for retrieving selected items.
|
|
10
13
|
* @param [args.element] The select element to query.
|
|
11
14
|
* @param [args.label] Accessible name to find the select element.
|
|
12
|
-
* @param args.withinElement
|
|
15
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
13
16
|
* @returns The array of selected option values.
|
|
14
17
|
*/
|
|
15
18
|
export default function getSelectElementItems({ element, label, withinElement }: GetSelectElementItemsArgs): string[];
|
|
@@ -5,7 +5,7 @@ import getSelectElementOptions from './getSelectElementOptions';
|
|
|
5
5
|
* @param args Options for retrieving selected items.
|
|
6
6
|
* @param [args.element] The select element to query.
|
|
7
7
|
* @param [args.label] Accessible name to find the select element.
|
|
8
|
-
* @param args.withinElement
|
|
8
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
9
9
|
* @returns The array of selected option values.
|
|
10
10
|
*/
|
|
11
11
|
export default function getSelectElementItems({ element, label, withinElement }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSelectElementItems.js","sourceRoot":"src/","sources":["utils/getSelectElementItems.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"getSelectElementItems.js","sourceRoot":"src/","sources":["utils/getSelectElementItems.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAWhE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAA6B;IACxG,MAAM,OAAO,GAAG,uBAAuB,CAAC;QACtC,OAAO;QACP,KAAK;QACL,aAAa;KACd,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export interface GetSelectElementOptionsArgs {
|
|
2
|
+
/** Accessible name to find the select element. */
|
|
2
3
|
label?: string;
|
|
4
|
+
/** The select element to query. */
|
|
3
5
|
element?: HTMLSelectElement;
|
|
6
|
+
/** Root container to scope the query; defaults to document.body. */
|
|
4
7
|
withinElement?: HTMLElement;
|
|
8
|
+
/** Exclude disabled options if true. */
|
|
5
9
|
excludeDisabled?: boolean;
|
|
10
|
+
/** Exclude empty-value options if true. */
|
|
6
11
|
excludeEmpty?: boolean;
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
@@ -11,7 +16,7 @@ export interface GetSelectElementOptionsArgs {
|
|
|
11
16
|
* @param args Options for retrieving select element options.
|
|
12
17
|
* @param [args.element] The select element to query.
|
|
13
18
|
* @param [args.label] Accessible name to find the select element.
|
|
14
|
-
* @param [args.withinElement] Root container to scope the query.
|
|
19
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
15
20
|
* @param [args.excludeDisabled] Exclude disabled options if true.
|
|
16
21
|
* @param [args.excludeEmpty] Exclude empty-value options if true.
|
|
17
22
|
* @returns The array of option elements.
|
|
@@ -6,7 +6,7 @@ import getSelectElementByLabel from './getSelectElementByLabel';
|
|
|
6
6
|
* @param args Options for retrieving select element options.
|
|
7
7
|
* @param [args.element] The select element to query.
|
|
8
8
|
* @param [args.label] Accessible name to find the select element.
|
|
9
|
-
* @param [args.withinElement] Root container to scope the query.
|
|
9
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
10
10
|
* @param [args.excludeDisabled] Exclude disabled options if true.
|
|
11
11
|
* @param [args.excludeEmpty] Exclude empty-value options if true.
|
|
12
12
|
* @returns The array of option elements.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSelectElementOptions.js","sourceRoot":"src/","sources":["utils/getSelectElementOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"getSelectElementOptions.js","sourceRoot":"src/","sources":["utils/getSelectElementOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAehE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAO,EACP,KAAK,EACL,aAAa,EACb,eAAe,GAAG,KAAK,EACvB,YAAY,GAAG,IAAI,MACY,EAAE;IACjC,IAAI,aAAa,GAA6B,IAAI,CAAC;IAEnD,IAAI,OAAO,EAAE,CAAC;QACZ,aAAa,GAAG,OAAO,CAAC;IAC1B,CAAC;SAAM,IAAI,KAAK,EAAE,CAAC;QACjB,aAAa,GAAG,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAChE,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC;SAClC,YAAY,CAAoB,QAAQ,CAAC;SACzC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;QACd,IAAI,eAAe,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YACpC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,CAAC,YAAY,IAAI,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC;IACpD,CAAC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -6,7 +6,7 @@ export type GetSelectElementValuesArgs = GetSelectElementOptionsArgs;
|
|
|
6
6
|
* @param args Options for retrieving select element values.
|
|
7
7
|
* @param [args.element] The select element to query.
|
|
8
8
|
* @param [args.label] Accessible name to find the select element.
|
|
9
|
-
* @param [args.withinElement] Root container to scope the query.
|
|
9
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
10
10
|
* @param [args.excludeDisabled] Exclude disabled options if true.
|
|
11
11
|
* @param [args.excludeEmpty] Exclude empty-value options if true.
|
|
12
12
|
* @returns The array of option values.
|
|
@@ -5,7 +5,7 @@ import getSelectElementOptions from './getSelectElementOptions';
|
|
|
5
5
|
* @param args Options for retrieving select element values.
|
|
6
6
|
* @param [args.element] The select element to query.
|
|
7
7
|
* @param [args.label] Accessible name to find the select element.
|
|
8
|
-
* @param [args.withinElement] Root container to scope the query.
|
|
8
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
9
9
|
* @param [args.excludeDisabled] Exclude disabled options if true.
|
|
10
10
|
* @param [args.excludeEmpty] Exclude empty-value options if true.
|
|
11
11
|
* @returns The array of option values.
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export interface SetSelectElementItemsArgs {
|
|
2
|
+
/** The select element to target. If omitted, `label` is used to find it. */
|
|
2
3
|
element?: HTMLSelectElement;
|
|
4
|
+
/** Accessible name of the select element; used when `element` is not provided. */
|
|
3
5
|
label?: string;
|
|
6
|
+
/** Array of values to select. */
|
|
4
7
|
selectedOptionValues: string[];
|
|
5
|
-
|
|
8
|
+
/** Root container to scope the query. */
|
|
9
|
+
withinElement?: HTMLElement;
|
|
6
10
|
}
|
|
7
11
|
/**
|
|
8
12
|
* Sets the selected option values on a <select> element.
|
|
@@ -11,7 +15,7 @@ export interface SetSelectElementItemsArgs {
|
|
|
11
15
|
* @param [args.element] The select element to target. If omitted, `label` is used to find it.
|
|
12
16
|
* @param [args.label] Accessible name of the select element; used when `element` is not provided.
|
|
13
17
|
* @param args.selectedOptionValues Array of values to select.
|
|
14
|
-
* @param args.withinElement
|
|
18
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
15
19
|
* @returns Promise<void>
|
|
16
20
|
*/
|
|
17
21
|
export default function setSelectElementItems({ element, label, selectedOptionValues, withinElement, }: SetSelectElementItemsArgs): Promise<void>;
|
|
@@ -7,7 +7,7 @@ import getSelectElementByLabel from './getSelectElementByLabel';
|
|
|
7
7
|
* @param [args.element] The select element to target. If omitted, `label` is used to find it.
|
|
8
8
|
* @param [args.label] Accessible name of the select element; used when `element` is not provided.
|
|
9
9
|
* @param args.selectedOptionValues Array of values to select.
|
|
10
|
-
* @param args.withinElement
|
|
10
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
11
11
|
* @returns Promise<void>
|
|
12
12
|
*/
|
|
13
13
|
export default async function setSelectElementItems({ element, label, selectedOptionValues, withinElement, }) {
|
|
@@ -24,6 +24,9 @@ export default async function setSelectElementItems({ element, label, selectedOp
|
|
|
24
24
|
if (!selectElement) {
|
|
25
25
|
throw new Error('Could not find select element');
|
|
26
26
|
}
|
|
27
|
+
else if (!selectElement.multiple && selectedOptionValues.length > 1) {
|
|
28
|
+
throw new Error('Cannot select multiple options on a single-select element');
|
|
29
|
+
}
|
|
27
30
|
await userEvent.selectOptions(selectElement, selectedOptionValues);
|
|
28
31
|
}
|
|
29
32
|
//# sourceMappingURL=setSelectElementItems.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setSelectElementItems.js","sourceRoot":"src/","sources":["utils/setSelectElementItems.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"setSelectElementItems.js","sourceRoot":"src/","sources":["utils/setSelectElementItems.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAahE;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAClD,OAAO,EACP,KAAK,EACL,oBAAoB,EACpB,aAAa,GACa;IAC1B,IAAI,aAAa,GAA6B,IAAI,CAAC;IAEnD,IAAI,OAAO,EAAE,CAAC;QACZ,aAAa,GAAG,OAAO,CAAC;IAC1B,CAAC;SAAM,IAAI,KAAK,EAAE,CAAC;QACjB,aAAa,GAAG,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAChE,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;SAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtE,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,SAAS,CAAC,aAAa,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
export interface SetSelectElementRandomItemsArgs {
|
|
2
|
+
/** The select element to target. If omitted, `label` is used to find it. */
|
|
2
3
|
element?: HTMLSelectElement;
|
|
4
|
+
/** Accessible name of the select element; used when element is not provided. */
|
|
3
5
|
label?: string;
|
|
6
|
+
/** Number of items to randomly select. */
|
|
4
7
|
numOfItems: number;
|
|
5
|
-
|
|
8
|
+
/** Root container to scope the query; defaults to document.body. */
|
|
9
|
+
withinElement?: HTMLElement;
|
|
6
10
|
}
|
|
7
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Sets a random selection of options on a <select> element.
|
|
13
|
+
*
|
|
14
|
+
* @param args Options for random selection.
|
|
15
|
+
* @param [args.element] The select element to target. If omitted, `label` is used to find it.
|
|
16
|
+
* @param [args.label] Accessible name of the select element; used when element is not provided.
|
|
17
|
+
* @param args.numOfItems Number of items to randomly select.
|
|
18
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
19
|
+
* @returns The array of selected option values.
|
|
20
|
+
*/
|
|
21
|
+
export default function setSelectElementRandomItems({ element, label, numOfItems, withinElement, }: SetSelectElementRandomItemsArgs): Promise<string[]>;
|
|
@@ -2,6 +2,16 @@ import userEvent from '@testing-library/user-event';
|
|
|
2
2
|
import getRandomItemsFromArray from './getRandomItemsFromArray';
|
|
3
3
|
import getSelectElementByLabel from './getSelectElementByLabel';
|
|
4
4
|
import getSelectElementOptions from './getSelectElementOptions';
|
|
5
|
+
/**
|
|
6
|
+
* Sets a random selection of options on a <select> element.
|
|
7
|
+
*
|
|
8
|
+
* @param args Options for random selection.
|
|
9
|
+
* @param [args.element] The select element to target. If omitted, `label` is used to find it.
|
|
10
|
+
* @param [args.label] Accessible name of the select element; used when element is not provided.
|
|
11
|
+
* @param args.numOfItems Number of items to randomly select.
|
|
12
|
+
* @param [args.withinElement] Root container to scope the query; defaults to document.body.
|
|
13
|
+
* @returns The array of selected option values.
|
|
14
|
+
*/
|
|
5
15
|
export default async function setSelectElementRandomItems({ element, label, numOfItems, withinElement, }) {
|
|
6
16
|
let selectElement = null;
|
|
7
17
|
if (element) {
|
|
@@ -26,6 +36,6 @@ export default async function setSelectElementRandomItems({ element, label, numO
|
|
|
26
36
|
}
|
|
27
37
|
const selectedOptionValues = getRandomItemsFromArray(availableOptions, numOfItems);
|
|
28
38
|
await userEvent.selectOptions(selectElement, selectedOptionValues);
|
|
29
|
-
return selectedOptionValues;
|
|
39
|
+
return selectedOptionValues.map(({ value }) => value);
|
|
30
40
|
}
|
|
31
41
|
//# sourceMappingURL=setSelectElementRandomItems.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setSelectElementRandomItems.js","sourceRoot":"src/","sources":["utils/setSelectElementRandomItems.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"setSelectElementRandomItems.js","sourceRoot":"src/","sources":["utils/setSelectElementRandomItems.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAahE;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,2BAA2B,CAAC,EACxD,OAAO,EACP,KAAK,EACL,UAAU,EACV,aAAa,GACmB;IAChC,IAAI,aAAa,GAA6B,IAAI,CAAC;IAEnD,IAAI,OAAO,EAAE,CAAC;QACZ,aAAa,GAAG,OAAO,CAAC;IAC1B,CAAC;SAAM,IAAI,KAAK,EAAE,CAAC;QACjB,aAAa,GAAG,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAChE,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,sBAAsB;IACtB,MAAM,SAAS,CAAC,eAAe,CAC7B,aAAa,EACb,CAAC,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAC7D,CAAC;IAEF,wDAAwD;IACxD,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IAExG,mCAAmC;IACnC,IAAI,gBAAgB,C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