Skip to content

Commit

Permalink
add back additional test for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed Aug 21, 2024
1 parent ed3174a commit 8db087a
Showing 1 changed file with 38 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import userEvent from '@testing-library/user-event'
import {
mockContractAndRatesDraft,
fetchCurrentUserMock,
mockDraft,
mockBaseContract,
fetchContractMockSuccess,
mockContractPackageDraft,
mockContractPackageUnlockedWithUnlockedType
} from '../../../testHelpers/apolloMocks'

Expand Down Expand Up @@ -634,7 +631,19 @@ describe('ContractDetails', () => {
})
})

it.skip('disabled with alert after first attempt to continue with zero files', async () => {
it('disabled with alert after first attempt to continue with zero files', async () => {
const draftContract = mockContractPackageUnlockedWithUnlockedType()
draftContract.draftRevision.formData.contractDocuments = []
vi.spyOn(
useContractForm,
'useContractForm'
).mockReturnValue({
updateDraft: mockUpdateDraftFn,
createDraft: vi.fn(),
showPageErrorMessage: false,
draftSubmission: draftContract,
})

renderWithProviders(<ContractDetails />, {
apolloProvider: defaultApolloProvider,
})
Expand All @@ -655,7 +664,7 @@ describe('ContractDetails', () => {
})
})

it.skip('disabled with alert after first attempt to continue with invalid duplicate files', async () => {
it('disabled with alert after first attempt to continue with invalid duplicate files', async () => {
renderWithProviders(<ContractDetails />, {
apolloProvider: defaultApolloProvider,
})
Expand Down Expand Up @@ -683,7 +692,18 @@ describe('ContractDetails', () => {
})
})

it.skip('disabled with alert after first attempt to continue with invalid files', async () => {
it('disabled with alert after first attempt to continue with invalid files', async () => {
const draftContract = mockContractPackageUnlockedWithUnlockedType()
draftContract.draftRevision.formData.contractDocuments = []
vi.spyOn(
useContractForm,
'useContractForm'
).mockReturnValue({
updateDraft: mockUpdateDraftFn,
createDraft: vi.fn(),
showPageErrorMessage: false,
draftSubmission: draftContract,
})
renderWithProviders(<ContractDetails />, {
apolloProvider: defaultApolloProvider,
})
Expand All @@ -709,7 +729,18 @@ describe('ContractDetails', () => {

expect(continueButton).toHaveAttribute('aria-disabled', 'true')
})
it.skip('disabled with alert when trying to continue while a file is still uploading', async () => {
it('disabled with alert when trying to continue while a file is still uploading', async () => {
const draftContract = mockContractPackageUnlockedWithUnlockedType()
draftContract.draftRevision.formData.contractDocuments = []
vi.spyOn(
useContractForm,
'useContractForm'
).mockReturnValue({
updateDraft: mockUpdateDraftFn,
createDraft: vi.fn(),
showPageErrorMessage: false,
draftSubmission: draftContract,
})
renderWithProviders(<ContractDetails />, {
apolloProvider: defaultApolloProvider,
})
Expand Down

0 comments on commit 8db087a

Please sign in to comment.