forked from binary-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: finalized AccumulatorsProfitLossTooltip
- Loading branch information
1 parent
3c68299
commit ddb700d
Showing
6 changed files
with
127 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
.../Modules/SmartChart/Components/Markers/__tests__/accumulators-profit-loss-tooltip.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
import { configure, shallow } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
import AccumulatorsProfitLossTooltip from '../accumulators-profit-loss-tooltip.jsx'; | ||
|
||
configure({ adapter: new Adapter() }); | ||
|
||
describe('AccumulatorsProfitLossTooltip', () => { | ||
const props = { | ||
contract_info: { | ||
currency: 'USD', | ||
exit_tick: 6468.95, | ||
exit_tick_time: 1666091856, | ||
profit: +0.15, | ||
}, | ||
className: 'profit-loss-tooltip', | ||
}; | ||
|
||
it('should render with an arrow on the left', () => { | ||
const wrapper = shallow(<AccumulatorsProfitLossTooltip {...props} />); | ||
expect(wrapper.find('.profit-loss-tooltip').exists()).to.be.true; | ||
expect(wrapper.find('.profit-loss-tooltip__spot-circle').exists()).to.be.true; | ||
expect(wrapper.find('.profit-loss-tooltip__content').render()[0].attribs.class).to.include('arrow-left'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters