2019-06-19 15:28:31 +02:00
|
|
|
/// <reference types="Cypress" />
|
2019-09-18 15:54:50 +02:00
|
|
|
describe('Search', () => {
|
2019-06-19 15:28:31 +02:00
|
|
|
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
|
|
|
})
|
|
|
|
|
2019-09-18 15:54:50 +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
|
2020-05-19 10:36:18 +02:00
|
|
|
cy.get('button').contains('Search').click()
|
2019-06-19 15:28:31 +02:00
|
|
|
// 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
|
|
|
|
)
|
|
|
|
})
|
|
|
|
})
|