1
0
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:
Matthias Kretschmann 2019-09-05 12:34:11 +02:00
parent 5002effbfe
commit 6db965b79a
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 5 additions and 5 deletions

View File

@ -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' }

View File

@ -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}>

View File

@ -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(