From 54f75c1be37e7b92c6d1b26420045494af9c2f7a Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Thu, 12 Mar 2020 16:33:37 -0600 Subject: [PATCH] fix(find*): waitForElement was still in use --- src/query-helpers.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/query-helpers.js b/src/query-helpers.js index 3c3295ae..3e493699 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 {waitFor} from './wait-for' 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. +// waitFor 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, waitForOptions) => + waitFor(() => getter(container, text, options), waitForOptions) } function buildQueries(queryAllBy, getMultipleError, getMissingError) {