mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Matthias Kretschmann
5b0c3486dd
* split up components * move actions state management into single action component * layout & style tweaks * update tests
35 lines
902 B
JavaScript
35 lines
902 B
JavaScript
/// <reference types="Cypress" />
|
|
context('Faucet', () => {
|
|
before(() => {
|
|
cy.visit('/faucet')
|
|
// Wait for end of loading
|
|
cy.get('button[name="FaucetETH"]', { timeout: 60000 }).should(
|
|
'have.length',
|
|
1
|
|
)
|
|
})
|
|
|
|
beforeEach(() => {
|
|
cy.get('button[name="FaucetETH"]')
|
|
.first()
|
|
.as('button')
|
|
})
|
|
|
|
it('Faucet button is clickable when user is connected.', () => {
|
|
cy.get('@button')
|
|
.contains('Request ETH')
|
|
.should('not.be.disabled')
|
|
})
|
|
|
|
it('Execute faucet call', () => {
|
|
// Execute call
|
|
cy.get('@button')
|
|
.contains('Request ETH')
|
|
.click()
|
|
// Verify that we got response from server
|
|
cy.contains(/(Successfully added|Already requested)/, {
|
|
timeout: 60000
|
|
}).should('be.visible')
|
|
})
|
|
})
|