Skip to content

Commit

Permalink
tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Jul 2, 2024
1 parent 96d6302 commit 429b1ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export function FileForm({ file, availableTags, updateFiles, setTagOptions }: Fi
}
/>
<Button
data-testid="add-custom-tag"
className={styles.edit_tags_btn}
variant="secondary"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,21 +455,9 @@ describe('UploadDatasetFiles', () => {
)
// wait for upload to finish
cy.findByText('1 file uploaded').should('exist')
cy.findByTitle('Edit tag options').first().click()
cy.get('input').last().type('Hello, World!')
cy.findByText('Apply').click()
cy.findByText('Close').click()
cy.findByTitle('Edit tag options').first().click()
cy.get('input').last().type('Hello, World, again!')
cy.findByText('Apply').click()
cy.findByLabelText('Close').click()
cy.findByTitle('Edit tag options').first().click()
cy.get('input').last().type('Hello, World, yet again!{enter}')
cy.findByLabelText('Close').click()
cy.findByTitle('Select tags').first().click()
cy.get('input[placeholder="Add new custom file tag..."]').first().type('Hello, World!')
cy.findByTestId('add-custom-tag').click()
cy.findByText('Hello, World!').should('exist')
cy.findByText('Hello, World, again!').should('exist')
cy.findByText('Hello, World, yet again!').should('exist')
cy.findByText('Hello, World!').click()
cy.get('input[type=text]').first().type('Hello, World!')
cy.get('input[placeholder="File path"]').first().type('Hello, World!')
Expand Down Expand Up @@ -516,12 +504,11 @@ describe('UploadDatasetFiles', () => {
cy.findByTitle('Cancel Changes').click()
cy.findByText('Edit files').first().click()
cy.findByText('Add tags').first().click()
cy.findByTitle('Custom tag').type('Hello, World!{enter}')
cy.findByTitle('Custom tag').type('Hello, World 2!{enter}')
cy.findByLabelText('Close').click()
cy.findByText('Edit files').first().click()
cy.findByText('Add tags').first().click()
cy.findByTitle('Select tags to add').first().click()
cy.findByText('Hello, World!').click()
cy.findByTitle('Custom tag').type('Hello, World 3!{enter}')
cy.findByTitle('Save Changes').click()
})
})

0 comments on commit 429b1ca

Please sign in to comment.