mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
more test fixes
This commit is contained in:
parent
5002effbfe
commit
6db965b79a
@ -72,13 +72,13 @@ describe('Files', () => {
|
||||
const { container, getByText } = renderComponent()
|
||||
|
||||
// open
|
||||
fireEvent.click(getByText('+ From public URL'))
|
||||
fireEvent.click(getByText('+ From URL'))
|
||||
await waitForElement(() => getByText('- Cancel'))
|
||||
expect(container.querySelector('.itemForm')).toBeInTheDocument()
|
||||
|
||||
// close
|
||||
fireEvent.click(getByText('- Cancel'))
|
||||
await waitForElement(() => getByText('+ From public URL'))
|
||||
await waitForElement(() => getByText('+ From URL'))
|
||||
expect(container.querySelector('.itemForm')).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
@ -109,7 +109,7 @@ describe('Files', () => {
|
||||
it('item can be added', async () => {
|
||||
const { getByText, getByPlaceholderText } = renderComponent()
|
||||
|
||||
fireEvent.click(getByText('+ From public URL'))
|
||||
fireEvent.click(getByText('+ From URL'))
|
||||
await waitForElement(() => getByText('- Cancel'))
|
||||
fireEvent.change(getByPlaceholderText('Hello'), {
|
||||
target: { value: 'https://hello.com' }
|
||||
|
@ -173,7 +173,7 @@ export default class Files extends PureComponent<FilesProps, FilesStates> {
|
||||
)}
|
||||
|
||||
<Button link onClick={this.toggleForm}>
|
||||
{isFormShown ? '- Cancel' : '+ From public URL'}
|
||||
{isFormShown ? '- Cancel' : '+ From URL'}
|
||||
</Button>
|
||||
|
||||
<Button link onClick={this.toggleIpfsForm}>
|
||||
|
@ -14,7 +14,7 @@ context('Publish', () => {
|
||||
cy.get('input#name').type('Commons Integration Test')
|
||||
// Open Add a file form
|
||||
cy.get('button')
|
||||
.contains('+ Add a file')
|
||||
.contains('+ From URL')
|
||||
.click()
|
||||
// Fill url of file
|
||||
cy.get('input#url').type(
|
||||
|
Loading…
Reference in New Issue
Block a user