Page MenuHomePhabricator

[Cashtab] Improve flakiness in orderbook tests
ClosedPublic

Authored by bytesofman on Wed, Nov 6, 18:09.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa2ed269a3d3c: [Cashtab] Improve flakiness in orderbook tests
Summary

The min amounts are calculated, so can have a race condition here.

Use await screen.findByText for values that are expected to appear after async.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
flakiness-improvement
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31038
Build 61579: Build Diffcashtab-tests
Build 61578: arc lint + arc unit

Event Timeline

Failed tests logs:

====== CashTab Unit Tests: <SendXec /> Pass a valid alias and bip21 query string with invalid amount param (too many decimals) to Send To field ======
Error: expect(element).toHaveValue(chicken.xec?amount=500.123)

Expected the element to have value:
  chicken.xec?amount=500.123
Received:
  chicken.xec?amount=500.23
    at Object.toHaveValue (/work/cashtab/src/components/Send/__tests__/SendXec.test.js:815:32)

Each failure log is accessible here:
CashTab Unit Tests: <SendXec /> Pass a valid alias and bip21 query string with invalid amount param (too many decimals) to Send To field

Failed tests logs:

====== CashTab Unit Tests: <SendXec /> Pass a valid alias and bip21 query string with invalid amount param (too many decimals) to Send To field ======
Error: expect(element).toHaveValue(chicken.xec?amount=500.123)

Expected the element to have value:
  chicken.xec?amount=500.123
Received:
  chicken.xec?amount=500.23
    at Object.toHaveValue (/work/cashtab/src/components/Send/__tests__/SendXec.test.js:815:32)

Each failure log is accessible here:
CashTab Unit Tests: <SendXec /> Pass a valid alias and bip21 query string with invalid amount param (too many decimals) to Send To field

haven't seen this before...will keep an eye on it

bytesofman published this revision for review.Wed, Nov 6, 19:03
This revision is now accepted and ready to land.Thu, Nov 7, 08:42