@linzjs/step-ag-grid 7.16.4 → 7.16.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/package.json
CHANGED
package/src/utils/testUtil.ts
CHANGED
|
@@ -111,8 +111,8 @@ export const validateMenuOptions = async (
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
export const clickMenuOption = async (menuOptionText: string | RegExp): Promise<void> => {
|
|
114
|
-
const menuOption = await findMenuOption(menuOptionText);
|
|
115
114
|
await act(async () => {
|
|
115
|
+
const menuOption = await findMenuOption(menuOptionText);
|
|
116
116
|
userEvent.click(menuOption);
|
|
117
117
|
});
|
|
118
118
|
};
|
|
@@ -159,7 +159,7 @@ const typeInput = async (value: string, filter: IQueryQuick): Promise<void> => {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
export const typeOnlyInput = async (value: string): Promise<void> => {
|
|
162
|
-
await typeInput(value, { child: { tagName: "input[type='text']" } });
|
|
162
|
+
await typeInput(value, { child: { tagName: "input[type='text'], textarea" } });
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
export const typeInputByLabel = async (value: string, labelText: string): Promise<void> => {
|
|
@@ -170,11 +170,14 @@ export const typeInputByLabel = async (value: string, labelText: string): Promis
|
|
|
170
170
|
if (labels.length > 1) {
|
|
171
171
|
throw Error(`Multiple labels found for text: ${labelText}`);
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
const inputId = labels[0].getAttribute("for");
|
|
174
|
+
await typeInput(value, { child: { tagName: `input[id='${inputId}'], textarea[id='${inputId}']` } });
|
|
174
175
|
};
|
|
175
176
|
|
|
176
177
|
export const typeInputByPlaceholder = async (value: string, placeholder: string): Promise<void> => {
|
|
177
|
-
await typeInput(value, {
|
|
178
|
+
await typeInput(value, {
|
|
179
|
+
child: { tagName: `input[placeholder='${placeholder}'], textarea[placeholder='${placeholder}']` },
|
|
180
|
+
});
|
|
178
181
|
};
|
|
179
182
|
|
|
180
183
|
export const typeOtherInput = async (value: string): Promise<void> => {
|