Skip to content

Commit

Permalink
Fixed my lint and some other files
Browse files Browse the repository at this point in the history
  • Loading branch information
hjetpoluru committed Feb 23, 2024
1 parent efa1a8d commit 0a73d83
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from 'react';
import configureMockStore from 'redux-mock-store';
import mockStore from '../../../../../test/data/mock-state.json';

import {
renderWithProvider,
} from '../../../../../test/jest';
import { renderWithProvider } from '../../../../../test/jest';
import TransactionAlreadyConfirmed from '.';

const getStoreWithModalData = () => {
Expand All @@ -26,7 +24,7 @@ const getStoreWithModalData = () => {
describe('Transaction Already Confirmed modal', () => {
it('should match snapshot', async () => {
const { baseElement } = renderWithProvider(
<TransactionAlreadyConfirmed />,
<TransactionAlreadyConfirmed />,
getStoreWithModalData(),
);
expect(baseElement).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion ui/hooks/useModalProps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ describe('useModalProps', () => {
expect(props).toStrictEqual(MOCK_PROPS);
expect(hideModal).toStrictEqual(expect.any(Function));
});
});
});
33 changes: 24 additions & 9 deletions ui/pages/settings/info-tab/info-tab.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,47 @@ describe('InfoTab', () => {

it('should have correct href for "Privacy Policy" link', () => {
const privacyPolicyLink = getByText('Privacy policy');
expect(privacyPolicyLink).toHaveAttribute('href', 'https://metamask.io/privacy.html');
expect(privacyPolicyLink).toHaveAttribute(
'href',
'https://metamask.io/privacy.html',
);
});

it('should have correct href for "Terms of Use" link', () => {
const termsOfUseLink = getByText('Terms of use');
expect(termsOfUseLink).toHaveAttribute('href', 'https://metamask.io/terms.html');
expect(termsOfUseLink).toHaveAttribute(
'href',
'https://metamask.io/terms.html',
);
});

it('should have correct href for "Attributions" link', () => {
const attributionsLink = getByText('Attributions');
expect(attributionsLink).toHaveAttribute('href', 'https://metamask.io/attributions.html');
const attributionsLink = getByText('Attributions');
expect(attributionsLink).toHaveAttribute(
'href',
'https://metamask.io/attributions.html',
);
});

it('should have correct href for "Support" link', () => {
const supportLink = getByText('Visit our support center');
expect(supportLink).toHaveAttribute('href', 'https://support.metamask.io');
expect(supportLink).toHaveAttribute(
'href',
'https://support.metamask.io',
);
});

it('should have correct href for "Visit our website" link', () => {
const websiteLink = getByText('Visit our website');
expect(websiteLink).toHaveAttribute('href', 'https://metamask.io/');
const websiteLink = getByText('Visit our website');
expect(websiteLink).toHaveAttribute('href', 'https://metamask.io/');
});

it('should have correct href for "Contact us" link', () => {
const contactUsLink = getByText('Contact us');
expect(contactUsLink).toHaveAttribute('href', 'https://metamask.zendesk.com/hc/en-us');
const contactUsLink = getByText('Contact us');
expect(contactUsLink).toHaveAttribute(
'href',
'https://metamask.zendesk.com/hc/en-us',
);
});
});
});

0 comments on commit 0a73d83

Please sign in to comment.