Commit eafc8465 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Add test for positive quantity

parent fd82718c
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
<div class="d-flex justify-content-between bold gl-mt-3 gl-mb-3"> <div class="d-flex justify-content-between bold gl-mt-3 gl-mb-3">
<div data-testid="selected-plan"> <div data-testid="selected-plan">
{{ sprintf($options.i18n.selectedPlanText, { selectedPlanText }) }} {{ sprintf($options.i18n.selectedPlanText, { selectedPlanText }) }}
<span v-if="quantity > 0" data-testid="quantity">{{ <span v-if="quantity" data-testid="quantity">{{
sprintf($options.i18n.quantity, { quantity }) sprintf($options.i18n.quantity, { quantity })
}}</span> }}</span>
</div> </div>
......
...@@ -76,6 +76,10 @@ describe('Order Summary', () => { ...@@ -76,6 +76,10 @@ describe('Order Summary', () => {
subscription: { quantity: 3 }, subscription: { quantity: 3 },
}); });
}); });
it('renders amount', () => {
expect(wrapper.find('[data-testid="amount"]').text()).toBe('$30');
});
}); });
describe('when quantity is less than or equal to zero', () => { describe('when quantity is less than or equal to zero', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment