Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/origin-visits.spec.js
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | describe('Visits tests', function() { | ||||
it('should display list of visits and mark them on calendar', function() { | it('should display list of visits and mark them on calendar', function() { | ||||
cy.get('.swh-visits-list-row .swh-visit-full') | cy.get('.swh-visits-list-row .swh-visit-full') | ||||
.should('be.visible') | .should('be.visible') | ||||
.each(($el) => { | .each(($el) => { | ||||
checkTimeLink($el); | checkTimeLink($el); | ||||
searchInCalendar(getTime($el.text())); | searchInCalendar(getTime($el.text())); | ||||
}); | }); | ||||
}); | }); | ||||
it('should close calendar popover when leaving day', function() { | |||||
cy.get('#swh-last-visit > .swh-visit-full') | |||||
.then(($el) => { | |||||
const date = getTime($el.text()); | |||||
searchInCalendar(date); | |||||
cy.contains('.month', date.monthName) | |||||
.find('.day-content') | |||||
.eq(date.date - 1) | |||||
.trigger('mouseout'); | |||||
cy.get('.popover') | |||||
.should('not.be.visible'); | |||||
}); | |||||
}); | |||||
}); | }); |