@homebound/beam 2.369.5 → 2.369.6
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/rtl.d.ts +3 -3
- package/dist/utils/rtl.js +9 -9
- package/package.json +1 -1
package/dist/utils/rtl.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { blur as _blur, change as _change, click as _click, clickAndWait as _clickAndWait, focus as _focus,
|
|
1
|
+
import { withRouter as _withRouter } from "@homebound/rtl-react-router-utils";
|
|
2
|
+
import { blur as _blur, change as _change, click as _click, clickAndWait as _clickAndWait, focus as _focus, input as _input, type as _type, typeAndWait as _typeAndWait, wait as _wait, RenderResult, Wrapper } from "@homebound/rtl-utils";
|
|
3
3
|
import { ReactElement } from "react";
|
|
4
|
-
export { _blur as blur, _change as change, _click as click, _clickAndWait as clickAndWait, _focus as focus, _input as input,
|
|
4
|
+
export { _blur as blur, _change as change, _click as click, _clickAndWait as clickAndWait, _focus as focus, _input as input, _type as type, _typeAndWait as typeAndWait, _wait as wait, _withRouter as withRouter, };
|
|
5
5
|
interface RenderOpts {
|
|
6
6
|
at?: {
|
|
7
7
|
url: string;
|
package/dist/utils/rtl.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withBeamRTL = exports.withRouter = exports.wait = exports.typeAndWait = exports.type = exports.
|
|
3
|
+
exports.withBeamRTL = exports.withRouter = exports.wait = exports.typeAndWait = exports.type = exports.input = exports.focus = exports.clickAndWait = exports.click = exports.change = exports.blur = void 0;
|
|
4
4
|
exports.render = render;
|
|
5
5
|
exports.cell = cell;
|
|
6
6
|
exports.cellOf = cellOf;
|
|
@@ -14,7 +14,6 @@ exports.getSelected = getSelected;
|
|
|
14
14
|
exports.getOptions = getOptions;
|
|
15
15
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
16
16
|
const rtl_react_router_utils_1 = require("@homebound/rtl-react-router-utils");
|
|
17
|
-
Object.defineProperty(exports, "newLocation", { enumerable: true, get: function () { return rtl_react_router_utils_1.newLocation; } });
|
|
18
17
|
Object.defineProperty(exports, "withRouter", { enumerable: true, get: function () { return rtl_react_router_utils_1.withRouter; } });
|
|
19
18
|
const rtl_utils_1 = require("@homebound/rtl-utils");
|
|
20
19
|
Object.defineProperty(exports, "blur", { enumerable: true, get: function () { return rtl_utils_1.blur; } });
|
|
@@ -22,15 +21,13 @@ Object.defineProperty(exports, "change", { enumerable: true, get: function () {
|
|
|
22
21
|
Object.defineProperty(exports, "click", { enumerable: true, get: function () { return rtl_utils_1.click; } });
|
|
23
22
|
Object.defineProperty(exports, "clickAndWait", { enumerable: true, get: function () { return rtl_utils_1.clickAndWait; } });
|
|
24
23
|
Object.defineProperty(exports, "focus", { enumerable: true, get: function () { return rtl_utils_1.focus; } });
|
|
25
|
-
Object.defineProperty(exports, "rtlUtilGetOptions", { enumerable: true, get: function () { return rtl_utils_1.getOptions; } });
|
|
26
24
|
Object.defineProperty(exports, "input", { enumerable: true, get: function () { return rtl_utils_1.input; } });
|
|
27
|
-
Object.defineProperty(exports, "rtlUtilSelect", { enumerable: true, get: function () { return rtl_utils_1.select; } });
|
|
28
25
|
Object.defineProperty(exports, "type", { enumerable: true, get: function () { return rtl_utils_1.type; } });
|
|
29
26
|
Object.defineProperty(exports, "typeAndWait", { enumerable: true, get: function () { return rtl_utils_1.typeAndWait; } });
|
|
30
27
|
Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return rtl_utils_1.wait; } });
|
|
31
28
|
const react_1 = require("@testing-library/react");
|
|
32
|
-
const mobx_utils_1 = require("mobx-utils");
|
|
33
29
|
const components_1 = require("../components");
|
|
30
|
+
const index_1 = require("./index");
|
|
34
31
|
function render(component, wrapperOrOpts, ...otherWrappers) {
|
|
35
32
|
let wrappers;
|
|
36
33
|
if (wrapperOrOpts && "wrap" in wrapperOrOpts) {
|
|
@@ -59,7 +56,7 @@ function cellOf(r, tableTestId, rowNum, column) {
|
|
|
59
56
|
}
|
|
60
57
|
function cellAnd(r, row, column, testId) {
|
|
61
58
|
return (cell(r, row, column).querySelector(`[data-testid="${testId}"]`) ||
|
|
62
|
-
(0,
|
|
59
|
+
(0, index_1.fail)(`Element not found ${(0, react_1.prettyDOM)(cell(r, row, column))}`));
|
|
63
60
|
}
|
|
64
61
|
function row(r, row, tableTestId = "gridTable") {
|
|
65
62
|
const dataRows = Array.from(r.getByTestId(tableTestId).querySelectorAll("[data-gridrow]"));
|
|
@@ -67,7 +64,7 @@ function row(r, row, tableTestId = "gridTable") {
|
|
|
67
64
|
}
|
|
68
65
|
function rowAnd(r, rowNum, testId) {
|
|
69
66
|
const e = row(r, rowNum);
|
|
70
|
-
return e.querySelector(`[data-testid="${testId}"]`) || (0,
|
|
67
|
+
return e.querySelector(`[data-testid="${testId}"]`) || (0, index_1.fail)(`Element not found ${(0, react_1.prettyDOM)(e)}`);
|
|
71
68
|
}
|
|
72
69
|
/** Intended to be used to generate a human-readable text
|
|
73
70
|
* representation of a GridTable using the markdown table syntax.
|
|
@@ -224,8 +221,11 @@ function getOptions(select) {
|
|
|
224
221
|
.filter((o) => !!o);
|
|
225
222
|
}
|
|
226
223
|
function findListBox(select) {
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
if (select.tagName === "DIV")
|
|
225
|
+
(0, index_1.fail)("SelectField is readOnly");
|
|
226
|
+
const listboxId = select.getAttribute("aria-controls") ||
|
|
227
|
+
(0, index_1.fail)("aria-controls attribute not found, the SelectField is probably readOnly");
|
|
228
|
+
return document.getElementById(listboxId) || (0, index_1.fail)("listbox not found");
|
|
229
229
|
}
|
|
230
230
|
function assertListBoxInput(select) {
|
|
231
231
|
if (isSelectElement(select)) {
|