1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/cypress/integration/2_search.spec.js

23 lines
635 B
JavaScript
Raw Normal View History

2019-06-19 15:28:31 +02:00
/// <reference types="Cypress" />
describe('Search', () => {
2019-06-19 15:28:31 +02:00
before(() => {
cy.visit('/')
2019-06-19 15:28:31 +02:00
// Wait for end of loading
2019-06-20 13:41:11 +02:00
cy.get('button', { timeout: 60000 }).should('have.length', 1)
2019-06-19 15:28:31 +02:00
})
it('should search for assets from homepage', () => {
2019-06-19 15:28:31 +02:00
// Fill search phrase
2019-11-14 13:16:53 +01:00
cy.get('input#search').type('Commons Integration Test')
2019-06-19 15:28:31 +02:00
// Start search
cy.get('button')
.contains('Search')
.click()
// Verify there are results
2019-06-20 13:41:11 +02:00
cy.get('article > a', { timeout: 60000 }).should(
2019-06-19 15:28:31 +02:00
'have.length.greaterThan',
0
)
})
})