@telefonica/acceptance-testing 5.0.0 → 5.1.0-beta1
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/index.js +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -275,11 +275,15 @@ const buildQueryMethods = ({ page, element } = {}) => {
|
|
|
275
275
|
const doc = await (0, pptr_testing_library_1.getDocument)(page ?? (0, exports.getGlobalPage)());
|
|
276
276
|
const body = await doc.$('body');
|
|
277
277
|
const queryArgs = [...args];
|
|
278
|
-
if (queryName.startsWith('findBy')) {
|
|
279
|
-
|
|
278
|
+
if (queryName.startsWith('findBy') || queryName.startsWith('findAllBy')) {
|
|
279
|
+
while (queryArgs.length < 3) {
|
|
280
280
|
queryArgs.push(undefined);
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
// set default timeout to 10 seconds if not specified
|
|
283
|
+
queryArgs[2] = {
|
|
284
|
+
timeout: 10000,
|
|
285
|
+
...(queryArgs[2] ?? {}),
|
|
286
|
+
};
|
|
283
287
|
}
|
|
284
288
|
const elementHandle = await queryFn(element ?? body, ...queryArgs);
|
|
285
289
|
const newElementHandle = Object.create(elementHandle);
|