Commit e74be1cc authored by vvempati's avatar vvempati

Prettify changed files

parent 470b4983
...@@ -166,9 +166,12 @@ describe('Buy Addons Shared App', () => { ...@@ -166,9 +166,12 @@ describe('Buy Addons Shared App', () => {
}); });
it('shows labels correctly for 2 packs', async () => { it('shows labels correctly for 2 packs', async () => {
const mockApollo = createMockApolloProvider({ const mockApollo = createMockApolloProvider(
{
plansQueryMock: jest.fn().mockResolvedValue({ data: { plans: mockStoragePlans } }), plansQueryMock: jest.fn().mockResolvedValue({ data: { plans: mockStoragePlans } }),
}, { quantity: 2 }); },
{ quantity: 2 },
);
await createComponent(mockApollo, STORAGE_ADDON_PROPS); await createComponent(mockApollo, STORAGE_ADDON_PROPS);
expect(findQuantityText().text()).toMatchInterpolatedText( expect(findQuantityText().text()).toMatchInterpolatedText(
...@@ -179,9 +182,12 @@ describe('Buy Addons Shared App', () => { ...@@ -179,9 +182,12 @@ describe('Buy Addons Shared App', () => {
}); });
it('does not show labels if input is invalid', async () => { it('does not show labels if input is invalid', async () => {
const mockApollo = createMockApolloProvider({ const mockApollo = createMockApolloProvider(
{
plansQueryMock: jest.fn().mockResolvedValue({ data: { plans: mockStoragePlans } }), plansQueryMock: jest.fn().mockResolvedValue({ data: { plans: mockStoragePlans } }),
}, { quantity: -1 }); },
{ quantity: -1 },
);
await createComponent(mockApollo, STORAGE_ADDON_PROPS); await createComponent(mockApollo, STORAGE_ADDON_PROPS);
expect(findQuantityText().text()).toMatchInterpolatedText('x 10 GB per pack'); expect(findQuantityText().text()).toMatchInterpolatedText('x 10 GB per pack');
......
...@@ -4,10 +4,7 @@ import plansQuery from 'ee/subscriptions/graphql/queries/plans.customer.query.gr ...@@ -4,10 +4,7 @@ import plansQuery from 'ee/subscriptions/graphql/queries/plans.customer.query.gr
import orderPreviewQuery from 'ee/subscriptions/graphql/queries/order_preview.customer.query.graphql'; import orderPreviewQuery from 'ee/subscriptions/graphql/queries/order_preview.customer.query.graphql';
import { createMockClient } from 'helpers/mock_apollo_helper'; import { createMockClient } from 'helpers/mock_apollo_helper';
import { CUSTOMERSDOT_CLIENT } from 'ee/subscriptions/buy_addons_shared/constants'; import { CUSTOMERSDOT_CLIENT } from 'ee/subscriptions/buy_addons_shared/constants';
import { import { mockDefaultCache, mockOrderPreview } from 'ee_jest/subscriptions/mock_data';
mockDefaultCache,
mockOrderPreview,
} from 'ee_jest/subscriptions/mock_data';
export function createMockApolloProvider(mockResponses = {}, dataset = {}) { export function createMockApolloProvider(mockResponses = {}, dataset = {}) {
const { const {
......
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