Skip to content

Commit

Permalink
removed comments, changed names for build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Mangan committed Jan 4, 2024
1 parent 7f860cf commit 45578bf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/sections/create-dataset/CreateDatasetContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const CreateDatasetContainer: React.FC = () => {
submitComplete={submitComplete}
formData={formData}
handleCreateDatasetFieldChange={handleCreateDatasetFieldChange}
// TODO: Fix using IIFE (Immediately-invoked Function Expression)
// eslint-disable-next-line @typescript-eslint/no-misused-promises
handleCreateDatasetSubmit={handleCreateDatasetSubmit}
submitting={submitting}
Expand Down
3 changes: 0 additions & 3 deletions src/sections/create-dataset/CreateDatasetForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export default function CreateDatasetFormPresenter({
}: CreateDatasetFormPresenterProps) {
const { t } = useTranslation('createDataset')
// TODO: Replace this with a FormSkeleton or remove entirely
// if (loading) {
// return <DatasetSkeleton />
// }

// TODO:
// Conversion from form => dataset object for post
Expand Down
14 changes: 0 additions & 14 deletions tests/component/views/create-dataset/CreateDataset.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ import CreateDatasetContainer from '../../../../src/sections/create-dataset/Crea
import { mount } from 'cypress/react18'

describe('Form component', () => {
// beforeEach(() => {
// mount(<CreateDatasetContainer />).then((wrapper) =>
// cy.spy(wrapper.component, 'handleCreateDatasetSubmit').as('handleCreateDatasetSubmit')
// )
// })
it('renders the Create Dataset page and its contents', () => {
mount(<CreateDatasetContainer />)
cy.findByText(/Create Dataset/i).should('exist')
Expand All @@ -27,13 +22,6 @@ describe('Form component', () => {
it('can submit a valid form', () => {
cy.log('Submit form')
mount(<CreateDatasetContainer />)
// mount(<CreateDatasetContainer />).then((wrapper) => {
// cy.spy(wrapper.component, 'handleCreateDatasetSubmit').as('onSubmit')
// cy.spy(wrapper.component, 'handleCreateDatasetSubmit')
// })
// const spy = cy.spy('CreateDatasetContainer', 'handleCreateDatasetSubmit').as('bar')
// const withFoo = spy.withArgs('handleCreateDatasetSubmit').as('withFoo')
// const handleCreateDatasetSubmit = cy.spy().as('handleCreateDatasetSubmit')
cy.get('input[name="createDatasetTitle"]')
.should('exist')
.type('Test Dataset Title')
Expand All @@ -42,7 +30,5 @@ describe('Form component', () => {

cy.findByText(/Save Dataset/i).click()
cy.findByText('Form Submitted!')
// Check if handleClose was called
// cy.get('@handleCreateDatasetSubmit').should('have.been.calledOnce')
})
})

0 comments on commit 45578bf

Please sign in to comment.