@thisisagile/easy-test-react 17.30.7 → 17.30.9
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/ElementTester.mjs +1 -1
- package/dist/Tester.d.ts +13 -6
- package/dist/Tester.mjs +1 -1
- package/dist/{chunk-NDS2MSSJ.mjs → chunk-W2RE3ASH.mjs} +21 -14
- package/dist/chunk-W2RE3ASH.mjs.map +1 -0
- package/dist/index.js +20 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/Tester.ts +19 -14
- package/dist/chunk-NDS2MSSJ.mjs.map +0 -1
package/dist/ElementTester.mjs
CHANGED
package/dist/Tester.d.ts
CHANGED
|
@@ -6,20 +6,27 @@ export declare class Tester {
|
|
|
6
6
|
constructor(container: HTMLElement);
|
|
7
7
|
static render: (component: ReactElement) => Promise<Tester>;
|
|
8
8
|
static renderSync: (component: ReactElement) => Tester;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
byAlt: (alt: string, index?: number) => HTMLElement;
|
|
10
|
+
atAlt: (alt: string, index?: number) => ElementTester;
|
|
11
11
|
byId: (id: Id, index?: number) => HTMLElement;
|
|
12
12
|
atId: (id: Id, index?: number) => ElementTester;
|
|
13
|
+
byLabel: (label: string, index?: number) => HTMLElement;
|
|
14
|
+
atLabel: (label: string, index?: number) => ElementTester;
|
|
15
|
+
byPlaceholder: (placeholder: string, index?: number) => HTMLElement;
|
|
16
|
+
atPlaceholder: (placeholder: string, index?: number) => ElementTester;
|
|
17
|
+
byQuery: (query: string, index?: number) => HTMLElement;
|
|
18
|
+
atQuery: (query: string, index?: number) => ElementTester;
|
|
13
19
|
byRole: (role: string, index?: number) => HTMLElement;
|
|
14
20
|
atRole: (role: string, index?: number) => ElementTester;
|
|
15
21
|
byRow: (index?: number) => HTMLElement;
|
|
16
22
|
atRow: (index?: number) => ElementTester;
|
|
23
|
+
byText: (text: string, index?: number) => HTMLElement;
|
|
24
|
+
atText: (text: string, index?: number) => ElementTester;
|
|
17
25
|
byTitle: (title: string, index?: number) => HTMLElement;
|
|
18
26
|
atTitle: (title: string, index?: number) => ElementTester;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
atQuery: (query: string, index?: number) => ElementTester;
|
|
27
|
+
byValue: (value: string, index?: number) => HTMLElement;
|
|
28
|
+
atValue: (value: string, index?: number) => ElementTester;
|
|
29
|
+
get isEmpty(): boolean;
|
|
23
30
|
submit: (id?: Id) => ElementTester;
|
|
24
31
|
debug: () => void;
|
|
25
32
|
}
|
package/dist/Tester.mjs
CHANGED
|
@@ -33,29 +33,36 @@ var ElementTester = class {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
// src/Tester.ts
|
|
36
|
+
var byIndex = (getAll, index = 0) => getAll()[index];
|
|
36
37
|
var Tester = class _Tester {
|
|
37
38
|
constructor(container) {
|
|
38
39
|
this.container = container;
|
|
39
40
|
}
|
|
40
41
|
static render = (component) => waitForRender(component).then((c) => new _Tester(c.container));
|
|
41
42
|
static renderSync = (component) => new _Tester(render(component).container);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
byId = (id, index) =>
|
|
43
|
+
byAlt = (alt, index) => byIndex(() => screen.getAllByAltText(alt), index);
|
|
44
|
+
atAlt = (alt, index) => new ElementTester(() => this.byAlt(alt, index));
|
|
45
|
+
byId = (id, index) => byIndex(() => screen.getAllByTestId(id.toString()), index);
|
|
45
46
|
atId = (id, index) => new ElementTester(() => this.byId(id, index));
|
|
46
|
-
|
|
47
|
+
byLabel = (label, index) => byIndex(() => screen.getAllByLabelText(label), index);
|
|
48
|
+
atLabel = (label, index) => new ElementTester(() => this.byLabel(label, index));
|
|
49
|
+
byPlaceholder = (placeholder, index) => byIndex(() => screen.getAllByPlaceholderText(placeholder), index);
|
|
50
|
+
atPlaceholder = (placeholder, index) => new ElementTester(() => this.byPlaceholder(placeholder, index));
|
|
51
|
+
byQuery = (query, index) => byIndex(() => Array.from(this.container.querySelectorAll(query)), index);
|
|
52
|
+
atQuery = (query, index) => new ElementTester(() => this.byQuery(query, index));
|
|
53
|
+
byRole = (role, index) => byIndex(() => screen.getAllByRole(role), index);
|
|
47
54
|
atRole = (role, index) => new ElementTester(() => this.byRole(role, index));
|
|
48
|
-
byRow = (index) =>
|
|
55
|
+
byRow = (index) => byIndex(() => screen.getAllByRole("row"), index);
|
|
49
56
|
atRow = (index) => new ElementTester(() => this.byRow(index));
|
|
50
|
-
|
|
57
|
+
byText = (text, index) => byIndex(() => screen.getAllByText(text), index);
|
|
58
|
+
atText = (text, index) => new ElementTester(() => this.byText(text, index));
|
|
59
|
+
byTitle = (title, index) => byIndex(() => screen.getAllByTitle(title), index);
|
|
51
60
|
atTitle = (title, index) => new ElementTester(() => this.byTitle(title, index));
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
atQuery = (query, index) => new ElementTester(() => this.byQuery(query, index));
|
|
61
|
+
byValue = (value, index) => byIndex(() => screen.getAllByDisplayValue(value), index);
|
|
62
|
+
atValue = (value, index) => new ElementTester(() => this.byValue(value, index));
|
|
63
|
+
get isEmpty() {
|
|
64
|
+
return this.container.innerHTML === "";
|
|
65
|
+
}
|
|
59
66
|
submit = (id = "btn-submit") => this.atId(id);
|
|
60
67
|
debug = () => screen.debug();
|
|
61
68
|
};
|
|
@@ -68,4 +75,4 @@ export {
|
|
|
68
75
|
renders,
|
|
69
76
|
ElementTester
|
|
70
77
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
78
|
+
//# sourceMappingURL=chunk-W2RE3ASH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Tester.ts","../src/ElementTester.ts"],"sourcesContent":["import { render, screen } from '@testing-library/react';\nimport { ReactElement } from 'react';\nimport { Id } from '@thisisagile/easy';\nimport { waitForRender } from './waitForRender';\nimport { ElementTester } from './ElementTester';\n\nconst byIndex = (getAll: () => HTMLElement[], index: number = 0): HTMLElement => getAll()[index];\n\nexport class Tester {\n constructor(public readonly container: HTMLElement) {}\n\n static render = (component: ReactElement): Promise<Tester> => waitForRender(component).then(c => new Tester(c.container));\n static renderSync = (component: ReactElement): Tester => new Tester(render(component).container);\n\n byAlt = (alt: string, index?: number): HTMLElement => byIndex(() => screen.getAllByAltText(alt), index);\n atAlt = (alt: string, index?: number): ElementTester => new ElementTester(() => this.byAlt(alt, index));\n byId = (id: Id, index?: number): HTMLElement => byIndex(() => screen.getAllByTestId(id.toString()), index);\n atId = (id: Id, index?: number): ElementTester => new ElementTester(() => this.byId(id, index));\n byLabel = (label: string, index?: number): HTMLElement => byIndex(() => screen.getAllByLabelText(label), index);\n atLabel = (label: string, index?: number): ElementTester => new ElementTester(() => this.byLabel(label, index));\n byPlaceholder = (placeholder: string, index?: number): HTMLElement => byIndex(() => screen.getAllByPlaceholderText(placeholder), index);\n atPlaceholder = (placeholder: string, index?: number): ElementTester => new ElementTester(() => this.byPlaceholder(placeholder, index));\n byQuery = (query: string, index?: number): HTMLElement => byIndex(() => Array.from(this.container.querySelectorAll<HTMLElement>(query)), index);\n atQuery = (query: string, index?: number): ElementTester => new ElementTester(() => this.byQuery(query, index));\n byRole = (role: string, index?: number): HTMLElement => byIndex(() => screen.getAllByRole(role), index);\n atRole = (role: string, index?: number): ElementTester => new ElementTester(() => this.byRole(role, index));\n byRow = (index?: number): HTMLElement => byIndex(() => screen.getAllByRole('row'), index);\n atRow = (index?: number): ElementTester => new ElementTester(() => this.byRow(index));\n byText = (text: string, index?: number): HTMLElement => byIndex(() => screen.getAllByText(text), index);\n atText = (text: string, index?: number): ElementTester => new ElementTester(() => this.byText(text, index));\n byTitle = (title: string, index?: number): HTMLElement => byIndex(() => screen.getAllByTitle(title), index);\n atTitle = (title: string, index?: number): ElementTester => new ElementTester(() => this.byTitle(title, index));\n byValue = (value: string, index?: number): HTMLElement => byIndex(() => screen.getAllByDisplayValue(value), index);\n atValue = (value: string, index?: number): ElementTester => new ElementTester(() => this.byValue(value, index));\n get isEmpty(): boolean { return this.container.innerHTML === ''; }\n submit = (id: Id = 'btn-submit'): ElementTester => this.atId(id);\n debug = () => screen.debug();\n}\n\nexport const rendersWait = async (component: ReactElement): Promise<Tester> => await Tester.render(component);\nexport const renders = (component: ReactElement): Tester => Tester.renderSync(component);\n","import { fireEvent, waitFor, waitForElementToBeRemoved } from '@testing-library/react';\nimport { isDefined, tryTo } from '@thisisagile/easy';\nimport { Tester } from './Tester';\n\nexport class ElementTester {\n constructor(readonly element: () => Element) {}\n\n get value(): string {\n return (this.element() as any)?.value as string;\n }\n\n get isValid(): boolean {\n return tryTo(() => this.element())\n .is.defined()\n .map(() => true)\n .or(false);\n }\n\n get then(): Tester {\n return new Tester(this.element() as HTMLElement);\n }\n\n click = (): this | undefined => (this.element() && fireEvent.click(this.element()) ? this : undefined);\n awaitClick = (): Promise<boolean> => waitFor(() => fireEvent.click(this.element()));\n keyDown = (key: string): this | undefined => (this.element() && fireEvent.keyDown(this.element(), { key }) ? this : undefined);\n mouseDown = (index?: number): this | undefined =>\n this.element() && fireEvent.mouseDown(isDefined(index) ? this.element().children[index] : this.element()) ? this : undefined;\n pressEnter = (): this | undefined => this.keyDown('Enter');\n clear = (): boolean => this.type('');\n type = (value: string): boolean => fireEvent.change(this.element(), { target: { value } });\n wait = (): Promise<Element> => waitFor(this.element);\n waitForRemove = (): Promise<void> => waitForElementToBeRemoved(this.element);\n}\n"],"mappings":";;;;;AAAA,SAAS,QAAQ,cAAc;;;ACA/B,SAAS,WAAW,SAAS,iCAAiC;AAC9D,SAAS,WAAW,aAAa;AAG1B,IAAM,gBAAN,MAAoB;AAAA,EACzB,YAAqB,SAAwB;AAAxB;AAAA,EAAyB;AAAA,EAE9C,IAAI,QAAgB;AAClB,WAAQ,KAAK,QAAQ,GAAW;AAAA,EAClC;AAAA,EAEA,IAAI,UAAmB;AACrB,WAAO,MAAM,MAAM,KAAK,QAAQ,CAAC,EA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AG,KAAK;AAAA,EACtG,SAAS,CAAC,MAAc,UAAkC,IAAI,cAAc,MAAM,KAAK,OAAO,MAAM,KAAK,CAAC;AAAA,EAC1G,UAAU,CAAC,OAAe,UAAgC,QAAQ,MAAM,OAAO,cAAc,KAAK,GAAG,KAAK;AAAA,EAC1G,UAAU,CAAC,OAAe,UAAkC,IAAI,cAAc,MAAM,KAAK,QAAQ,OAAO,KAAK,CAAC;AAAA,EAC9G,UAAU,CAAC,OAAe,UAAgC,QAAQ,MAAM,OAAO,qBAAqB,KAAK,GAAG,KAAK;AAAA,EACjH,UAAU,CAAC,OAAe,UAAkC,IAAI,cAAc,MAAM,KAAK,QAAQ,OAAO,KAAK,CAAC;AAAA,EAC9G,IAAI,UAAmB;AAAE,WAAO,KAAK,UAAU,cAAc;AAAA,EAAI;AAAA,EACjE,SAAS,CAAC,KAAS,iBAAgC,KAAK,KAAK,EAAE;AAAA,EAC/D,QAAQ,MAAM,OAAO,MAAM;AAC7B;AAEO,IAAM,cAAc,OAAO,cAA6C,MAAM,OAAO,OAAO,SAAS;AACrG,IAAM,UAAU,CAAC,cAAoC,OAAO,WAAW,SAAS;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -49,29 +49,36 @@ async function waitForRender(ui, options) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
// src/Tester.ts
|
|
52
|
+
var byIndex = (getAll, index = 0) => getAll()[index];
|
|
52
53
|
var Tester = class _Tester {
|
|
53
54
|
constructor(container) {
|
|
54
55
|
this.container = container;
|
|
55
56
|
}
|
|
56
57
|
static render = (component) => waitForRender(component).then((c) => new _Tester(c.container));
|
|
57
58
|
static renderSync = (component) => new _Tester((0, import_react3.render)(component).container);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
byId = (id, index) =>
|
|
59
|
+
byAlt = (alt, index) => byIndex(() => import_react3.screen.getAllByAltText(alt), index);
|
|
60
|
+
atAlt = (alt, index) => new ElementTester(() => this.byAlt(alt, index));
|
|
61
|
+
byId = (id, index) => byIndex(() => import_react3.screen.getAllByTestId(id.toString()), index);
|
|
61
62
|
atId = (id, index) => new ElementTester(() => this.byId(id, index));
|
|
62
|
-
|
|
63
|
+
byLabel = (label, index) => byIndex(() => import_react3.screen.getAllByLabelText(label), index);
|
|
64
|
+
atLabel = (label, index) => new ElementTester(() => this.byLabel(label, index));
|
|
65
|
+
byPlaceholder = (placeholder, index) => byIndex(() => import_react3.screen.getAllByPlaceholderText(placeholder), index);
|
|
66
|
+
atPlaceholder = (placeholder, index) => new ElementTester(() => this.byPlaceholder(placeholder, index));
|
|
67
|
+
byQuery = (query, index) => byIndex(() => Array.from(this.container.querySelectorAll(query)), index);
|
|
68
|
+
atQuery = (query, index) => new ElementTester(() => this.byQuery(query, index));
|
|
69
|
+
byRole = (role, index) => byIndex(() => import_react3.screen.getAllByRole(role), index);
|
|
63
70
|
atRole = (role, index) => new ElementTester(() => this.byRole(role, index));
|
|
64
|
-
byRow = (index) =>
|
|
71
|
+
byRow = (index) => byIndex(() => import_react3.screen.getAllByRole("row"), index);
|
|
65
72
|
atRow = (index) => new ElementTester(() => this.byRow(index));
|
|
66
|
-
|
|
73
|
+
byText = (text, index) => byIndex(() => import_react3.screen.getAllByText(text), index);
|
|
74
|
+
atText = (text, index) => new ElementTester(() => this.byText(text, index));
|
|
75
|
+
byTitle = (title, index) => byIndex(() => import_react3.screen.getAllByTitle(title), index);
|
|
67
76
|
atTitle = (title, index) => new ElementTester(() => this.byTitle(title, index));
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
};
|
|
74
|
-
atQuery = (query, index) => new ElementTester(() => this.byQuery(query, index));
|
|
77
|
+
byValue = (value, index) => byIndex(() => import_react3.screen.getAllByDisplayValue(value), index);
|
|
78
|
+
atValue = (value, index) => new ElementTester(() => this.byValue(value, index));
|
|
79
|
+
get isEmpty() {
|
|
80
|
+
return this.container.innerHTML === "";
|
|
81
|
+
}
|
|
75
82
|
submit = (id = "btn-submit") => this.atId(id);
|
|
76
83
|
debug = () => import_react3.screen.debug();
|
|
77
84
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/ElementTester.ts","../src/Tester.ts","../src/waitForRender.ts"],"sourcesContent":["export * from './ElementTester';\nexport * from './Tester';\nexport * from './waitForRender';\n\nexport const mockTimezone = () => {\n jest.spyOn(Intl.DateTimeFormat.prototype, 'resolvedOptions').mockReturnValue(Intl.DateTimeFormat('en-US', { timeZone: 'UTC' }).resolvedOptions());\n};\nmockTimezone();\n","import { fireEvent, waitFor, waitForElementToBeRemoved } from '@testing-library/react';\nimport { isDefined, tryTo } from '@thisisagile/easy';\nimport { Tester } from './Tester';\n\nexport class ElementTester {\n constructor(readonly element: () => Element) {}\n\n get value(): string {\n return (this.element() as any)?.value as string;\n }\n\n get isValid(): boolean {\n return tryTo(() => this.element())\n .is.defined()\n .map(() => true)\n .or(false);\n }\n\n get then(): Tester {\n return new Tester(this.element() as HTMLElement);\n }\n\n click = (): this | undefined => (this.element() && fireEvent.click(this.element()) ? this : undefined);\n awaitClick = (): Promise<boolean> => waitFor(() => fireEvent.click(this.element()));\n keyDown = (key: string): this | undefined => (this.element() && fireEvent.keyDown(this.element(), { key }) ? this : undefined);\n mouseDown = (index?: number): this | undefined =>\n this.element() && fireEvent.mouseDown(isDefined(index) ? this.element().children[index] : this.element()) ? this : undefined;\n pressEnter = (): this | undefined => this.keyDown('Enter');\n clear = (): boolean => this.type('');\n type = (value: string): boolean => fireEvent.change(this.element(), { target: { value } });\n wait = (): Promise<Element> => waitFor(this.element);\n waitForRemove = (): Promise<void> => waitForElementToBeRemoved(this.element);\n}\n","import { render, screen } from '@testing-library/react';\nimport { ReactElement } from 'react';\nimport { Id } from '@thisisagile/easy';\nimport { waitForRender } from './waitForRender';\nimport { ElementTester } from './ElementTester';\n\nexport class Tester {\n constructor(public readonly container: HTMLElement) {}\n\n static render = (component: ReactElement): Promise<Tester> => waitForRender(component).then(c => new Tester(c.container));\n static renderSync = (component: ReactElement): Tester => new Tester(render(component).container);\n\n
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/ElementTester.ts","../src/Tester.ts","../src/waitForRender.ts"],"sourcesContent":["export * from './ElementTester';\nexport * from './Tester';\nexport * from './waitForRender';\n\nexport const mockTimezone = () => {\n jest.spyOn(Intl.DateTimeFormat.prototype, 'resolvedOptions').mockReturnValue(Intl.DateTimeFormat('en-US', { timeZone: 'UTC' }).resolvedOptions());\n};\nmockTimezone();\n","import { fireEvent, waitFor, waitForElementToBeRemoved } from '@testing-library/react';\nimport { isDefined, tryTo } from '@thisisagile/easy';\nimport { Tester } from './Tester';\n\nexport class ElementTester {\n constructor(readonly element: () => Element) {}\n\n get value(): string {\n return (this.element() as any)?.value as string;\n }\n\n get isValid(): boolean {\n return tryTo(() => this.element())\n .is.defined()\n .map(() => true)\n .or(false);\n }\n\n get then(): Tester {\n return new Tester(this.element() as HTMLElement);\n }\n\n click = (): this | undefined => (this.element() && fireEvent.click(this.element()) ? this : undefined);\n awaitClick = (): Promise<boolean> => waitFor(() => fireEvent.click(this.element()));\n keyDown = (key: string): this | undefined => (this.element() && fireEvent.keyDown(this.element(), { key }) ? this : undefined);\n mouseDown = (index?: number): this | undefined =>\n this.element() && fireEvent.mouseDown(isDefined(index) ? this.element().children[index] : this.element()) ? this : undefined;\n pressEnter = (): this | undefined => this.keyDown('Enter');\n clear = (): boolean => this.type('');\n type = (value: string): boolean => fireEvent.change(this.element(), { target: { value } });\n wait = (): Promise<Element> => waitFor(this.element);\n waitForRemove = (): Promise<void> => waitForElementToBeRemoved(this.element);\n}\n","import { render, screen } from '@testing-library/react';\nimport { ReactElement } from 'react';\nimport { Id } from '@thisisagile/easy';\nimport { waitForRender } from './waitForRender';\nimport { ElementTester } from './ElementTester';\n\nconst byIndex = (getAll: () => HTMLElement[], index: number = 0): HTMLElement => getAll()[index];\n\nexport class Tester {\n constructor(public readonly container: HTMLElement) {}\n\n static render = (component: ReactElement): Promise<Tester> => waitForRender(component).then(c => new Tester(c.container));\n static renderSync = (component: ReactElement): Tester => new Tester(render(component).container);\n\n byAlt = (alt: string, index?: number): HTMLElement => byIndex(() => screen.getAllByAltText(alt), index);\n atAlt = (alt: string, index?: number): ElementTester => new ElementTester(() => this.byAlt(alt, index));\n byId = (id: Id, index?: number): HTMLElement => byIndex(() => screen.getAllByTestId(id.toString()), index);\n atId = (id: Id, index?: number): ElementTester => new ElementTester(() => this.byId(id, index));\n byLabel = (label: string, index?: number): HTMLElement => byIndex(() => screen.getAllByLabelText(label), index);\n atLabel = (label: string, index?: number): ElementTester => new ElementTester(() => this.byLabel(label, index));\n byPlaceholder = (placeholder: string, index?: number): HTMLElement => byIndex(() => screen.getAllByPlaceholderText(placeholder), index);\n atPlaceholder = (placeholder: string, index?: number): ElementTester => new ElementTester(() => this.byPlaceholder(placeholder, index));\n byQuery = (query: string, index?: number): HTMLElement => byIndex(() => Array.from(this.container.querySelectorAll<HTMLElement>(query)), index);\n atQuery = (query: string, index?: number): ElementTester => new ElementTester(() => this.byQuery(query, index));\n byRole = (role: string, index?: number): HTMLElement => byIndex(() => screen.getAllByRole(role), index);\n atRole = (role: string, index?: number): ElementTester => new ElementTester(() => this.byRole(role, index));\n byRow = (index?: number): HTMLElement => byIndex(() => screen.getAllByRole('row'), index);\n atRow = (index?: number): ElementTester => new ElementTester(() => this.byRow(index));\n byText = (text: string, index?: number): HTMLElement => byIndex(() => screen.getAllByText(text), index);\n atText = (text: string, index?: number): ElementTester => new ElementTester(() => this.byText(text, index));\n byTitle = (title: string, index?: number): HTMLElement => byIndex(() => screen.getAllByTitle(title), index);\n atTitle = (title: string, index?: number): ElementTester => new ElementTester(() => this.byTitle(title, index));\n byValue = (value: string, index?: number): HTMLElement => byIndex(() => screen.getAllByDisplayValue(value), index);\n atValue = (value: string, index?: number): ElementTester => new ElementTester(() => this.byValue(value, index));\n get isEmpty(): boolean { return this.container.innerHTML === ''; }\n submit = (id: Id = 'btn-submit'): ElementTester => this.atId(id);\n debug = () => screen.debug();\n}\n\nexport const rendersWait = async (component: ReactElement): Promise<Tester> => await Tester.render(component);\nexport const renders = (component: ReactElement): Tester => Tester.renderSync(component);\n","import { render, RenderOptions, RenderResult, waitFor } from '@testing-library/react';\nimport { act, ReactElement } from 'react';\n\n/* istanbul ignore next */\nexport async function waitForRender(ui: ReactElement, options?: Omit<RenderOptions, 'queries'>): Promise<RenderResult> {\n let r = {} as RenderResult;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n await act(async () => {\n r = render(ui, options);\n await waitFor(() => r.container, { container: r.container });\n });\n return r;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA8D;AAC9D,kBAAiC;;;ACDjC,IAAAC,gBAA+B;;;ACA/B,mBAA6D;AAC7D,IAAAC,gBAAkC;AAGlC,eAAsB,cAAc,IAAkB,SAAiE;AACrH,MAAI,IAAI,CAAC;AAET,YAAM,mBAAI,YAAY;AACpB,YAAI,qBAAO,IAAI,OAAO;AACtB,cAAM,sBAAQ,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC;AAAA,EAC7D,CAAC;AACD,SAAO;AACT;;;ADNA,IAAM,UAAU,CAAC,QAA6B,QAAgB,MAAmB,OAAO,EAAE,KAAK;AAExF,IAAM,SAAN,MAAM,QAAO;AAAA,EAClB,YAA4B,WAAwB;AAAxB;AAAA,EAAyB;AAAA,EAErD,OAAO,SAAS,CAAC,cAA6C,cAAc,SAAS,EAAE,KAAK,OAAK,IAAI,QAAO,EAAE,SAAS,CAAC;AAAA,EACxH,OAAO,aAAa,CAAC,cAAoC,IAAI,YAAO,sBAAO,SAAS,EAAE,SAAS;AAAA,EAE/F,QAAQ,CAAC,KAAa,UAAgC,QAAQ,MAAM,qBAAO,gBAAgB,GAAG,GAA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CAAC;AAAA,EAClF,UAAU,CAAC,QAAmC,KAAK,QAAQ,KAAK,wBAAU,QAAQ,KAAK,QAAQ,GAAG,EAAE,IAAI,CAAC,IAAI,OAAO;AAAA,EACpH,YAAY,CAAC,UACX,KAAK,QAAQ,KAAK,wBAAU,cAAU,uBAAU,KAAK,IAAI,KAAK,QAAQ,EAAE,SAAS,KAAK,IAAI,KAAK,QAAQ,CAAC,IAAI,OAAO;AAAA,EACrH,aAAa,MAAwB,KAAK,QAAQ,OAAO;AAAA,EACzD,QAAQ,MAAe,KAAK,KAAK,EAAE;AAAA,EACnC,OAAO,CAAC,UAA2B,wBAAU,OAAO,KAAK,QAAQ,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAAA,EACzF,OAAO,UAAwB,uBAAQ,KAAK,OAAO;AAAA,EACnD,gBAAgB,UAAqB,yCAA0B,KAAK,OAAO;AAC7E;;;AD5BO,IAAM,eAAe,MAAM;AAChC,OAAK,MAAM,KAAK,eAAe,WAAW,iBAAiB,EAAE,gBAAgB,KAAK,eAAe,SAAS,EAAE,UAAU,MAAM,CAAC,EAAE,gBAAgB,CAAC;AAClJ;AACA,aAAa;","names":["import_react","import_react","import_react"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy-test-react",
|
|
3
|
-
"version": "17.30.
|
|
3
|
+
"version": "17.30.9",
|
|
4
4
|
"description": "Straightforward wrapper library for testing-library/react",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@testing-library/dom": "^10.4.0",
|
|
45
45
|
"@testing-library/jest-dom": "^6.6.3",
|
|
46
46
|
"@testing-library/react": "^16.3.0",
|
|
47
|
-
"@thisisagile/easy": "^17.30.
|
|
47
|
+
"@thisisagile/easy": "^17.30.9",
|
|
48
48
|
"@types/react": "^18.3.18",
|
|
49
49
|
"react": "^18.3.1",
|
|
50
50
|
"react-dom": "^18.3.1"
|
package/src/Tester.ts
CHANGED
|
@@ -4,30 +4,35 @@ import { Id } from '@thisisagile/easy';
|
|
|
4
4
|
import { waitForRender } from './waitForRender';
|
|
5
5
|
import { ElementTester } from './ElementTester';
|
|
6
6
|
|
|
7
|
+
const byIndex = (getAll: () => HTMLElement[], index: number = 0): HTMLElement => getAll()[index];
|
|
8
|
+
|
|
7
9
|
export class Tester {
|
|
8
10
|
constructor(public readonly container: HTMLElement) {}
|
|
9
11
|
|
|
10
12
|
static render = (component: ReactElement): Promise<Tester> => waitForRender(component).then(c => new Tester(c.container));
|
|
11
13
|
static renderSync = (component: ReactElement): Tester => new Tester(render(component).container);
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
byId = (id: Id, index?: number): HTMLElement => (
|
|
15
|
+
byAlt = (alt: string, index?: number): HTMLElement => byIndex(() => screen.getAllByAltText(alt), index);
|
|
16
|
+
atAlt = (alt: string, index?: number): ElementTester => new ElementTester(() => this.byAlt(alt, index));
|
|
17
|
+
byId = (id: Id, index?: number): HTMLElement => byIndex(() => screen.getAllByTestId(id.toString()), index);
|
|
16
18
|
atId = (id: Id, index?: number): ElementTester => new ElementTester(() => this.byId(id, index));
|
|
17
|
-
|
|
19
|
+
byLabel = (label: string, index?: number): HTMLElement => byIndex(() => screen.getAllByLabelText(label), index);
|
|
20
|
+
atLabel = (label: string, index?: number): ElementTester => new ElementTester(() => this.byLabel(label, index));
|
|
21
|
+
byPlaceholder = (placeholder: string, index?: number): HTMLElement => byIndex(() => screen.getAllByPlaceholderText(placeholder), index);
|
|
22
|
+
atPlaceholder = (placeholder: string, index?: number): ElementTester => new ElementTester(() => this.byPlaceholder(placeholder, index));
|
|
23
|
+
byQuery = (query: string, index?: number): HTMLElement => byIndex(() => Array.from(this.container.querySelectorAll<HTMLElement>(query)), index);
|
|
24
|
+
atQuery = (query: string, index?: number): ElementTester => new ElementTester(() => this.byQuery(query, index));
|
|
25
|
+
byRole = (role: string, index?: number): HTMLElement => byIndex(() => screen.getAllByRole(role), index);
|
|
18
26
|
atRole = (role: string, index?: number): ElementTester => new ElementTester(() => this.byRole(role, index));
|
|
19
|
-
byRow = (index?: number): HTMLElement => (
|
|
27
|
+
byRow = (index?: number): HTMLElement => byIndex(() => screen.getAllByRole('row'), index);
|
|
20
28
|
atRow = (index?: number): ElementTester => new ElementTester(() => this.byRow(index));
|
|
21
|
-
|
|
29
|
+
byText = (text: string, index?: number): HTMLElement => byIndex(() => screen.getAllByText(text), index);
|
|
30
|
+
atText = (text: string, index?: number): ElementTester => new ElementTester(() => this.byText(text, index));
|
|
31
|
+
byTitle = (title: string, index?: number): HTMLElement => byIndex(() => screen.getAllByTitle(title), index);
|
|
22
32
|
atTitle = (title: string, index?: number): ElementTester => new ElementTester(() => this.byTitle(title, index));
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
byQuery = (query: string, index: number = 0): HTMLElement => {
|
|
27
|
-
const elements = this.container.querySelectorAll(query);
|
|
28
|
-
return elements[index] as HTMLElement;
|
|
29
|
-
};
|
|
30
|
-
atQuery = (query: string, index?: number): ElementTester => new ElementTester(() => this.byQuery(query, index));
|
|
33
|
+
byValue = (value: string, index?: number): HTMLElement => byIndex(() => screen.getAllByDisplayValue(value), index);
|
|
34
|
+
atValue = (value: string, index?: number): ElementTester => new ElementTester(() => this.byValue(value, index));
|
|
35
|
+
get isEmpty(): boolean { return this.container.innerHTML === ''; }
|
|
31
36
|
submit = (id: Id = 'btn-submit'): ElementTester => this.atId(id);
|
|
32
37
|
debug = () => screen.debug();
|
|
33
38
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Tester.ts","../src/ElementTester.ts"],"sourcesContent":["import { render, screen } from '@testing-library/react';\nimport { ReactElement } from 'react';\nimport { Id } from '@thisisagile/easy';\nimport { waitForRender } from './waitForRender';\nimport { ElementTester } from './ElementTester';\n\nexport class Tester {\n constructor(public readonly container: HTMLElement) {}\n\n static render = (component: ReactElement): Promise<Tester> => waitForRender(component).then(c => new Tester(c.container));\n static renderSync = (component: ReactElement): Tester => new Tester(render(component).container);\n\n byText = (text: string, index?: number): HTMLElement => (index ? screen.getAllByText(text)[index] : screen.getByText(text));\n atText = (text: string, index?: number): ElementTester => new ElementTester(() => this.byText(text, index));\n byId = (id: Id, index?: number): HTMLElement => (index ? screen.getAllByTestId(id.toString())[index] : screen.getByTestId(id.toString()));\n atId = (id: Id, index?: number): ElementTester => new ElementTester(() => this.byId(id, index));\n byRole = (role: string, index?: number): HTMLElement => (index ? screen.getAllByRole(role)[index] : screen.getByRole(role));\n atRole = (role: string, index?: number): ElementTester => new ElementTester(() => this.byRole(role, index));\n byRow = (index?: number): HTMLElement => (index ? screen.getAllByRole('row')[index] : screen.getByRole('row'));\n atRow = (index?: number): ElementTester => new ElementTester(() => this.byRow(index));\n byTitle = (title: string, index?: number): HTMLElement => (index ? screen.getAllByTitle(title)[index] : screen.getByTitle(title));\n atTitle = (title: string, index?: number): ElementTester => new ElementTester(() => this.byTitle(title, index));\n byPlaceholder = (placeholder: string, index?: number): HTMLElement =>\n index ? screen.getAllByPlaceholderText(placeholder)[index] : screen.getByPlaceholderText(placeholder);\n atPlaceholder = (placeholder: string, index?: number): ElementTester => new ElementTester(() => this.byPlaceholder(placeholder, index));\n byQuery = (query: string, index: number = 0): HTMLElement => {\n const elements = this.container.querySelectorAll(query);\n return elements[index] as HTMLElement;\n };\n atQuery = (query: string, index?: number): ElementTester => new ElementTester(() => this.byQuery(query, index));\n submit = (id: Id = 'btn-submit'): ElementTester => this.atId(id);\n debug = () => screen.debug();\n}\n\nexport const rendersWait = async (component: ReactElement): Promise<Tester> => await Tester.render(component);\nexport const renders = (component: ReactElement): Tester => Tester.renderSync(component);\n","import { fireEvent, waitFor, waitForElementToBeRemoved } from '@testing-library/react';\nimport { isDefined, tryTo } from '@thisisagile/easy';\nimport { Tester } from './Tester';\n\nexport class ElementTester {\n constructor(readonly element: () => Element) {}\n\n get value(): string {\n return (this.element() as any)?.value as string;\n }\n\n get isValid(): boolean {\n return tryTo(() => this.element())\n .is.defined()\n .map(() => true)\n .or(false);\n }\n\n get then(): Tester {\n return new Tester(this.element() as HTMLElement);\n }\n\n click = (): this | undefined => (this.element() && fireEvent.click(this.element()) ? this : undefined);\n awaitClick = (): Promise<boolean> => waitFor(() => fireEvent.click(this.element()));\n keyDown = (key: string): this | undefined => (this.element() && fireEvent.keyDown(this.element(), { key }) ? this : undefined);\n mouseDown = (index?: number): this | undefined =>\n this.element() && fireEvent.mouseDown(isDefined(index) ? this.element().children[index] : this.element()) ? this : undefined;\n pressEnter = (): this | undefined => this.keyDown('Enter');\n clear = (): boolean => this.type('');\n type = (value: string): boolean => fireEvent.change(this.element(), { target: { value } });\n wait = (): Promise<Element> => waitFor(this.element);\n waitForRemove = (): Promise<void> => waitForElementToBeRemoved(this.element);\n}\n"],"mappings":";;;;;AAAA,SAAS,QAAQ,cAAc;;;ACA/B,SAAS,WAAW,SAAS,iCAAiC;AAC9D,SAAS,WAAW,aAAa;AAG1B,IAAM,gBAAN,MAAoB;AAAA,EACzB,YAAqB,SAAwB;AAAxB;AAAA,EAAyB;AAAA,EAE9C,IAAI,QAAgB;AAClB,WAAQ,KAAK,QAAQ,GAAW;AAAA,EAClC;AAAA,EAEA,IAAI,UAAmB;AACrB,WAAO,MAAM,MAAM,KAAK,QAAQ,CAAC,EAC9B,GAAG,QAAQ,EACX,IAAI,MAAM,IAAI,EACd,GAAG,KAAK;AAAA,EACb;AAAA,EAEA,IAAI,OAAe;AACjB,WAAO,IAAI,OAAO,KAAK,QAAQ,CAAgB;AAAA,EACjD;AAAA,EAEA,QAAQ,MAAyB,KAAK,QAAQ,KAAK,UAAU,MAAM,KAAK,QAAQ,CAAC,IAAI,OAAO;AAAA,EAC5F,aAAa,MAAwB,QAAQ,MAAM,UAAU,MAAM,KAAK,QAAQ,CAAC,CAAC;AAAA,EAClF,UAAU,CA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