Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed Apr 29, 2024
1 parent 2fdfb7e commit d3afe3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import {
} from '../../../../../constants/healthPlanPackages'
import { GenericErrorPage } from '../../../../Errors/GenericErrorPage'
import { getVisibleLatestContractFormData } from '../../../../../gqlHelpers/contractsAndRates'
import {
Program,
Contract,
ContractRevision,
} from '../../../../../gen/gqlClient'
import { Program, Contract, ContractRevision } from '../../../../../gen/gqlClient'
import { usePreviousSubmission } from '../../../../../hooks/usePreviousSubmission'
import { booleanAsYesNoUserValue } from '../../../../../components/Form/FieldYesNo/FieldYesNo'
import { SectionCard } from '../../../../../components/SectionCard'
Expand Down Expand Up @@ -45,10 +41,7 @@ export const SubmissionTypeSummarySectionV2 = ({
}: SubmissionTypeSummarySectionV2Props): React.ReactElement => {
const isPreviousSubmission = usePreviousSubmission()
const contractOrRev = contractRev ? contractRev : contract
const contractFormData = getVisibleLatestContractFormData(
contractOrRev,
isStateUser
)
const contractFormData = getVisibleLatestContractFormData(contractOrRev, isStateUser)
if (!contractFormData) return <GenericErrorPage />

const programNames = statePrograms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('SubmissionRevisionSummary', () => {
apolloProvider: {
mocks: [
fetchCurrentUserMock({
user: mockValidStateUser(),
user: mockValidCMSUser(),
statusCode: 200,
}),
fetchContractMockSuccess({
Expand All @@ -46,15 +46,16 @@ describe('SubmissionRevisionSummary', () => {
expect(
await screen.findByRole('heading', { name: 'Contract details' })
).toBeInTheDocument()
screen.debug()
// const submissionVersion = `${dayjs
// .utc('2022-03-24T01:19:46.154Z')
// .tz('America/New_York')
// .format('MM/DD/YY h:mma')} ET version`
// expect(await screen.findByText(submissionVersion)).toBeInTheDocument()
expect(
await screen.findByTestId('previous-submission-banner')

await screen.findByTestId('previous-submission-banner')
).toBeInTheDocument()
screen.debug()
})
// it('extracts the correct dates from the submission and displays them in tables', async () => {
// renderWithProviders(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const SubmissionRevisionSummaryV2 = (): React.ReactElement => {
})
}, [name, updateHeading])


if (fetchContractLoading) {
return (
<GridContainer>
Expand Down

0 comments on commit d3afe3e

Please sign in to comment.