Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fix broken unit test for new payments tab component #6916

Merged
merged 1 commit into from
Jan 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions test/unit/app/renderer/paymentsTabTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ describe('PaymentsTab component', function () {
assert.equal(wrapper.find('[data-test-id="creatingWallet"]').length, 1)
})

it.skip('renders payment history button', function () {
it('renders payment history button (requires wallet and reconcileStamp)', function () {
const wrapper = shallow(
<PaymentsTab
showOverlay={function () {}}
hideOverlay={function () {}}
ledgerData={Immutable.Map({created: true, transactions: {size: 3}})} />
ledgerData={Immutable.Map({created: true, transactions: {size: 3}, reconcileStamp: 1})} />
)
assert.equal(wrapper.find('.paymentHistoryButton').length, 1)
})
Expand All @@ -123,6 +123,16 @@ describe('PaymentsTab component', function () {
)
assert.equal(wrapper.find('.paymentHistoryButton').length, 0)
})

it('does not render payment history button when reconcileStamp is not set', function () {
const wrapper = shallow(
<PaymentsTab
showOverlay={function () {}}
hideOverlay={function () {}}
ledgerData={Immutable.Map({created: true, transactions: {size: 3}})} />
)
assert.equal(wrapper.find('.paymentHistoryButton').length, 0)
})
})

describe('fundsamount functionality', function () {
Expand Down