Skip to content

Releases: testing-library/dom-testing-library

v7.18.1

25 Jun 14:57
373dbc4
Compare
Choose a tag to compare

7.18.1 (2020-06-25)

Bug Fixes

  • use the first label for LabelText query suggestions (#672) (373dbc4)

v7.18.0

24 Jun 21:18
6bc8e2e
Compare
Choose a tag to compare

7.18.0 (2020-06-24)

Features

  • waitFor: add onTimeout which adds DOM output to timeout errors (#671) (6bc8e2e), closes #559

v7.17.2

24 Jun 13:55
86205e5
Compare
Choose a tag to compare

7.17.2 (2020-06-24)

Bug Fixes

v7.17.1

23 Jun 21:24
4ad3673
Compare
Choose a tag to compare

7.17.1 (2020-06-23)

Bug Fixes

  • waitFor: handle odd timing issue with fake timers (#667) (4ad3673)

v7.17.0

23 Jun 16:19
5b2640a
Compare
Choose a tag to compare

7.17.0 (2020-06-23)

Features

  • waitFor: add complete support for fake timers (#662) (5b2640a), closes #661

🚨 It's possible this will break your tests if you were working around our limitations before. Fixing the issue should be straightforward. Here's an example from my (Kent's) own workaround:

  // using fake timers to skip debounce time
  jest.useFakeTimers()
  userEvent.clear(notesTextarea)
  userEvent.type(notesTextarea, newNotes)
- act(() => jest.runAllTimers())

  await screen.findByLabelText(/loading/i)
  // wait for the loading spinner to go away
  await waitForLoadingToFinish()

  jest.useRealTimers()

Notice that all I needed to change was removing manually advancing timers because now we handle things automatically for you 🎉

v7.16.3

23 Jun 07:52
a2a3212
Compare
Choose a tag to compare

7.16.3 (2020-06-23)

Bug Fixes

v7.16.2

17 Jun 20:07
ea22d73
Compare
Choose a tag to compare

7.16.2 (2020-06-17)

Bug Fixes

v7.16.1

16 Jun 04:56
2c19f4f
Compare
Choose a tag to compare

7.16.1 (2020-06-16)

Bug Fixes

  • use custom testIdAttribute in getSuggestedQuery (#651) (2c19f4f)

v7.16.0

15 Jun 20:35
df57d7b
Compare
Choose a tag to compare

7.16.0 (2020-06-15)

Features

  • createEvent: allow creating generic events (#650) (df57d7b)

v7.15.1

15 Jun 19:01
167b4ac
Compare
Choose a tag to compare

7.15.1 (2020-06-15)

Bug Fixes

  • runWithRealTimers to be compatible with new version of jest (#649) (167b4ac), closes #612