2019-06-19 15:28:31 +02:00
|
|
|
/// <reference types="Cypress" />
|
|
|
|
context('Search', () => {
|
|
|
|
before(() => {
|
2019-06-26 11:13:41 +02:00
|
|
|
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('Search for assets from homepage', () => {
|
|
|
|
// Fill search phrase
|
|
|
|
cy.get('input#search').type('Title test')
|
|
|
|
// 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
|
|
|
|
)
|
|
|
|
})
|
|
|
|
})
|