Skip to content

Commit

Permalink
[ART] fix POA request card filename
Browse files Browse the repository at this point in the history
  • Loading branch information
nihil2501 committed Dec 31, 2024
1 parent 965719b commit 1f7a83e
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import startReactApp from '@department-of-veterans-affairs/platform-startup/reac
import { connectFeatureToggle } from 'platform/utilities/feature-toggles';

import './sass/accredited-representative-portal.scss';
import './sass/POARequestsCard.scss';
import './sass/POARequestCard.scss';
import './sass/POARequestDetails.scss';

import manifest from './manifest.json';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/api';

import mockPOARequestsResponse from '../mocks/mockPOARequestsResponse.json';
import POARequestCard from '../components/POARequestsCard/POARequestsCard';
import POARequestCard from '../components/POARequestCard/POARequestCard';
import DigitalSubmissionAlert from '../components/DigitalSubmissionAlert/DigitalSubmissionAlert';

const STATUSES = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { expect } from 'chai';
import React from 'react';
import POARequestCard from '../../../components/POARequestCard/POARequestCard';
import mockPOARequestsResponse from '../../../mocks/mockPOARequestsResponse.json';
import { renderTestComponent } from '../helpers';

describe('POARequestCard', () => {
it('renders a card', () => {
const { attributes: poaRequest, id } = mockPOARequestsResponse.data[0];
const component = <POARequestCard poaRequest={poaRequest} id={id} />;

const { getByTestId } = renderTestComponent(component);

expect(getByTestId('poa-request-card-12345-status')).to.exist;
});
});

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react';
import { Provider } from 'react-redux';
import { MemoryRouter } from 'react-router-dom';
import {
createMemoryRouter,
RouterProvider,
MemoryRouter,
} from 'react-router-dom';
import { render } from '@testing-library/react';

import createReduxStore from '../../../store';
Expand All @@ -20,3 +24,14 @@ export function renderTestApp(children, { initAction, initialEntries } = {}) {
</Provider>,
);
}

export function renderTestComponent(element) {
const router = createMemoryRouter([
{
path: '',
element,
},
]);

return render(<RouterProvider router={router} />);
}

0 comments on commit 1f7a83e

Please sign in to comment.