diff --git a/src/query-helpers.js b/src/query-helpers.js index 3c3295ae..4f0cd8be 100644 --- a/src/query-helpers.js +++ b/src/query-helpers.js @@ -1,5 +1,5 @@ import {fuzzyMatches, matches, makeNormalizer} from './matches' -import {waitForElement} from './wait-for-element' +import {wait} from './wait' import {getConfig} from './config' function getMultipleElementsFoundError(message, container) { @@ -65,13 +65,10 @@ function makeGetAllQuery(allQuery, getMissingError) { } // this accepts a getter query function and returns a function which calls -// waitForElement and passing a function which invokes the getter. +// wait and passing a function which invokes the getter. function makeFindQuery(getter) { - return (container, text, options, waitForElementOptions) => - waitForElement( - () => getter(container, text, options), - waitForElementOptions, - ) + return (container, text, options, waitOptions) => + wait(() => getter(container, text, options), waitOptions) } function buildQueries(queryAllBy, getMultipleError, getMissingError) {