import React from 'react';
import { screen } from '@testing-library/react';
import { renderInAppContext } from '@theorchard/suite-testing';
import * as accountDetailResponse from 'src/__fixtures__/graphql/account-detail-response.json';
import PaymentDetail from 'src/components/account-detail/payment-detail';

describe('<PaymentDetail>', () => {
    const { actionStates } = accountDetailResponse.abacusAccount.accountPayee;
    const accountPayee = {
        ...accountDetailResponse.abacusAccount.accountPayee,
        actionStates: [
            ...actionStates,
            {
                actionName: 'payment_eligibility',
                actionStatus: 'approved',
            },
        ],
    };

    renderInAppContext(<PaymentDetail accountPayee={accountPayee} />);

    it('renders the account general section', () => {
        expect(screen.getByText('Payee Name')).toBeDefined();
        expect(screen.getByText('Joe Payoneer')).toBeDefined();
    });
});
