* fix: move vue app to parent dir * test: prepare vue for cypress testing * test: add basic cypress test for vue app * test: add agenda-neue header tests * test: meeting generator for cypress tests (wip) * test: agenda-neue meeting nav + settings button * test: agenda-neue check settings button position against viewport size * test: agenda-neue fix viewport + add schedule list header tests * test: agenda-neue timezone tests + future meeting template * test: agenda-neue add test floor plan image fixtures * test: floor-plan-neue - handle floor plan images * test: floor-plan-neue room selection + pin drop tests * test: floor-plan-neue - test all viewports * test: floor-plan-neue add missing header tests * test: agenda-neue - generate areas + groups * test: agenda-neue - test filter areas + groups dialog * test: agenda-neue code cleanup + generate schedule (wip) * test: agenda-neue - generate schedule (wip) * test: agenda-neue - generate schedule + test settings dialog (wip) * test: agenda-neue - settings timezone controls * test: agenda-neue - settings toggles + agenda table headers tests * test: agenda-neue - table events + memory fixes * test - agenda-neue - table events remaining columns tests * test: agenda-neue - meeting materials dialog + future schedule list table buttons * test: agenda-neue - remove skips * test: agenda-neue - search * test: agenda-neue - remove skips * test: agenda-neue - use random seed for deterministic results * test: agenda-neue - set constant clock * test: add percy to cypress + upgrade cypress * test: agenda-neue - jump to day tests * test: agenda-neue - add to calendar tests * test: agenda-neue - add pick sessions tests * test: agenda-neue - calendar view tests * test: agenda-neue - color assignment tests * test: agenda-neue - skip test not supported in firefox/safari * test: agenda-neue - live sessions tests * test: agenda-neue - smaller screens tests * chore: update workflows to handle modern + legacy cypress tests * test: fix legacy agenda weekview test + cypress legacy config
95 lines
3.5 KiB
JavaScript
95 lines
3.5 KiB
JavaScript
describe('meeting agenda', () => {
|
|
before(() => {
|
|
cy.visit('/meeting/113/agenda/')
|
|
})
|
|
|
|
it('toggle customize panel when clicking on customize header bar', () => {
|
|
cy.get('#agenda-filter-customize').click()
|
|
cy.get('#customize').should('be.visible').and('have.class', 'show')
|
|
|
|
cy.get('#agenda-filter-customize').click()
|
|
cy.get('#customize').should('not.be.visible').and('not.have.class', 'show')
|
|
})
|
|
|
|
it('customize panel should have at least 3 areas', () => {
|
|
cy.get('#agenda-filter-customize').click()
|
|
cy.get('.agenda-filter-areaselectbtn').should('have.length.at.least', 3)
|
|
})
|
|
|
|
it('customize panel should have at least 10 groups', () => {
|
|
cy.get('.agenda-filter-groupselectbtn').should('have.length.at.least', 10)
|
|
})
|
|
|
|
it('filtering the agenda should modify the URL', () => {
|
|
cy.get('.agenda-filter-groupselectbtn').take(5).as('selectedGroups').each(randomElement => {
|
|
cy.wrap(randomElement).click()
|
|
cy.wrap(randomElement).invoke('attr', 'data-filter-item').then(keyword => {
|
|
cy.url().should('contain', keyword)
|
|
})
|
|
})
|
|
|
|
// Deselect everything
|
|
cy.get('@selectedGroups').click({ multiple: true })
|
|
})
|
|
|
|
it('selecting an area should select all corresponding groups', () => {
|
|
cy.get('.agenda-filter-areaselectbtn').first().click().invoke('attr', 'data-filter-item').then(area => {
|
|
cy.url().should('contain', area)
|
|
|
|
cy.get(`.agenda-filter-groupselectbtn[data-filter-keywords*="${area}"]`).each(group => {
|
|
cy.wrap(group).invoke('attr', 'data-filter-keywords').then(groupKeywords => {
|
|
// In case value is a comma-separated list of keywords...
|
|
if (groupKeywords.indexOf(',') < 0 || groupKeywords.split(',').includes(area)) {
|
|
cy.wrap(group).should('have.class', 'active')
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
it('weekview iframe should load', () => {
|
|
cy.get('#weekview > iframe').its('0.contentDocument').should('exist')
|
|
cy.get('#weekview > iframe').its('0.contentDocument.readyState').should('equal', 'complete')
|
|
cy.get('#weekview > iframe').its('0.contentDocument.body', {
|
|
timeout: 30000
|
|
}).should('not.be.empty')
|
|
})
|
|
})
|
|
|
|
describe('meeting agenda weekview', () => {
|
|
before(() => {
|
|
cy.visit('/meeting/113/agenda/week-view.html')
|
|
})
|
|
it('should have day headers', () => {
|
|
cy.get('.agenda-weekview-day').should('have.length.greaterThan', 0).and('be.visible')
|
|
})
|
|
it('should have day columns', () => {
|
|
cy.get('.agenda-weekview-column').should('have.length.greaterThan', 0).and('be.visible')
|
|
})
|
|
|
|
it('should have the same number of day headers and columns', () => {
|
|
cy.get('.agenda-weekview-day').its('length').then(lgth => {
|
|
cy.get('.agenda-weekview-column').should('have.length', lgth)
|
|
})
|
|
})
|
|
|
|
it('should have meetings', () => {
|
|
cy.get('.agenda-weekview-meeting').should('have.length.greaterThan', 0).and('be.visible')
|
|
})
|
|
|
|
it('meeting hover should cause expansion to column width', () => {
|
|
cy.get('.agenda-weekview-column:first').invoke('outerWidth').then(colWidth => {
|
|
/* eslint-disable cypress/no-unnecessary-waiting */
|
|
cy.get('.agenda-weekview-meeting-mini').any(5).each(meeting => {
|
|
cy.wrap(meeting)
|
|
.wait(250)
|
|
.realHover({ position: 'center' })
|
|
.invoke('outerWidth')
|
|
.should('be.closeTo', colWidth, 1)
|
|
// Move over to top left corner of the page to end the mouseover of the current meeting block
|
|
cy.get('.agenda-weekview-day:first').realHover().wait(250)
|
|
})
|
|
})
|
|
})
|
|
})
|