import * as identity from '@orchard/frontend-identity/dist/cjs/identity';
import { render } from '@testing-library/react';
import { createIdentityContext } from 'lib/test/identity';
import React from 'react';
import AccountPage from '../accountPage';

describe('<AccountPage>', () => {
    test('has classname', () => {
        const context = createIdentityContext();
        jest.spyOn(identity, 'useIdentity').mockReturnValue(context);

        const { container } = render(<AccountPage />);
        const element = container.getElementsByClassName(AccountPage.CLASSNAME).item(0);
        expect(element).toBeVisible();
    });
});
