@@ -180,21 +180,21 @@ test.describe('lib/fixture.ts (locators)', () => {
180180 test . afterEach ( async ( { page} ) => page . close ( ) )
181181
182182 test ( 'should handle the findBy* methods' , async ( { queries} ) => {
183- const locator = await queries . findByText ( 'Loaded!' , undefined , { timeout : 7000 } )
183+ const locator = await queries . findByText ( 'Loaded!' , undefined , { timeout : 3000 } )
184184
185185 expect ( await locator . textContent ( ) ) . toEqual ( 'Loaded!' )
186186 } )
187187
188188 test ( 'should handle the findAllBy* methods' , async ( { queries} ) => {
189- const locator = await queries . findAllByText ( / H e l l o / , undefined , { timeout : 7000 } )
189+ const locator = await queries . findAllByText ( / H e l l o / , undefined , { timeout : 3000 } )
190190
191191 const text = await Promise . all ( [ locator . nth ( 0 ) . textContent ( ) , locator . nth ( 1 ) . textContent ( ) ] )
192192
193193 expect ( text ) . toEqual ( [ 'Hello h1' , 'Hello h2' ] )
194194 } )
195195
196196 test ( 'throws Testing Library error when locator times out' , async ( { queries} ) => {
197- const query = async ( ) => queries . findByText ( / L o a d e d ! / , undefined , { timeout : 1000 } )
197+ const query = async ( ) => queries . findByText ( / L o a d e d ! / , undefined , { timeout : 500 } )
198198
199199 await expect ( query ) . rejects . toThrowError (
200200 expect . objectContaining ( {
@@ -204,7 +204,7 @@ test.describe('lib/fixture.ts (locators)', () => {
204204 } )
205205
206206 test ( 'throws Testing Library error when multi-element locator times out' , async ( { queries} ) => {
207- const query = async ( ) => queries . findAllByText ( / H e l l o / , undefined , { timeout : 1000 } )
207+ const query = async ( ) => queries . findAllByText ( / H e l l o / , undefined , { timeout : 500 } )
208208
209209 await expect ( query ) . rejects . toThrowError (
210210 expect . objectContaining ( {
@@ -214,7 +214,7 @@ test.describe('lib/fixture.ts (locators)', () => {
214214 } )
215215
216216 test . describe ( 'configuring asynchronous queries via `use`' , ( ) => {
217- test . use ( { asyncUtilTimeout : 7000 } )
217+ test . use ( { asyncUtilTimeout : 3000 } )
218218
219219 test ( 'reads timeout configuration from `use` configuration' , async ( { queries, page} ) => {
220220 // Ensure this test fails if we don't set `timeout` correctly in the `waitFor` in our find query
@@ -232,7 +232,7 @@ test.describe('lib/fixture.ts (locators)', () => {
232232 await expect ( queries . getByText ( 'Hidden' ) ) . toBeHidden ( )
233233
234234 const locator = await queries . findByText ( 'Hidden' , undefined , {
235- timeout : 7000 ,
235+ timeout : 3000 ,
236236 state : 'visible' ,
237237 } )
238238
@@ -245,7 +245,7 @@ test.describe('lib/fixture.ts (locators)', () => {
245245 test ( 'waits for hidden element to be visible' , async ( { queries} ) => {
246246 await expect ( queries . getByText ( 'Hidden' ) ) . toBeHidden ( )
247247
248- const locator = await queries . findByText ( 'Hidden' , undefined , { timeout : 7000 } )
248+ const locator = await queries . findByText ( 'Hidden' , undefined , { timeout : 3000 } )
249249
250250 expect ( await locator . textContent ( ) ) . toEqual ( 'Hidden' )
251251 } )
@@ -257,7 +257,7 @@ test.describe('lib/fixture.ts (locators)', () => {
257257 await expect ( queries . queryByText ( 'Attached' ) ) . toHaveCount ( 0 )
258258
259259 const locator = await queries . findByText ( 'Attached' , undefined , {
260- timeout : 7000 ,
260+ timeout : 3000 ,
261261 state : 'attached' ,
262262 } )
263263
@@ -271,7 +271,7 @@ test.describe('lib/fixture.ts (locators)', () => {
271271 test ( 'waits for hidden element to be attached' , async ( { queries} ) => {
272272 await expect ( queries . queryByText ( 'Attached' ) ) . toHaveCount ( 0 )
273273
274- const locator = await queries . findByText ( 'Attached' , undefined , { timeout : 7000 } )
274+ const locator = await queries . findByText ( 'Attached' , undefined , { timeout : 3000 } )
275275
276276 expect ( await locator . textContent ( ) ) . toEqual ( 'Attached' )
277277 await expect ( locator ) . toBeHidden ( )
0 commit comments