Page MenuHomePhabricator

[Cashtab] Add tests for routing
ClosedPublic

Authored by bytesofman on Jan 30 2024, 22:32.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABCf6bc5905da4a: [Cashtab] Add tests for routing
Summary

Add tests to confirm routing functionality of the main nav menu

Note: no version bump as this diff has no impact on the production app

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
test-routing
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26769
Build 53106: Build Diffcashtab-tests
Build 53105: arc lint + arc unit

Event Timeline

bytesofman edited the summary of this revision. (Show Details)
bytesofman edited the summary of this revision. (Show Details)
emack requested changes to this revision.Jan 31 2024, 06:33
emack added a subscriber: emack.
emack added inline comments.
cashtab/src/components/Common/__tests__/App.test.js
111
This revision now requires changes to proceed.Jan 31 2024, 06:33
bytesofman added inline comments.
cashtab/src/components/Common/__tests__/App.test.js
111

imo this is overkill, we already establish that the containing element has height 0. we don't need to prove that we can't see child menu items.

also fwiw, this would fail -- the menu elements are in the document. not.toBeInTheDocument() is for elements we expect not render, i.e. something is rendered conditionally on some state variable.

These elements are hidden with css, so would need to test that property.

This revision is now accepted and ready to land.Jan 31 2024, 11:19
This revision was automatically updated to reflect the committed changes.