Skip to content

Commit

Permalink
test for timegrid morelink positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Jan 11, 2023
1 parent 8fdd30f commit a000d65
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/src/legacy/more-link-timegrid.ts
Expand Up @@ -70,7 +70,6 @@ describe('eventMaxStack', () => {
expect(moreLinkEls.length).toBe(2)
})

// TODO: test coords of more link
it('puts overlapping hidden events in same popover, respecting eventOrder', (done) => {
let calendar = initCalendar({
eventOrder: 'title',
Expand All @@ -85,6 +84,12 @@ describe('eventMaxStack', () => {
let moreLinkEls = timeGrid.getMoreEls()
expect(moreLinkEls.length).toBe(1)

const canvasCoords = timeGrid.el.getBoundingClientRect()
const moreLinkCoords = moreLinkEls[0].getBoundingClientRect()
const moreLinkTop = moreLinkCoords.top - canvasCoords.top
// TODO: more precise coord matching
expect(moreLinkTop).toBeGreaterThan(10)

timeGrid.openMorePopover()
setTimeout(() => {
let moreEventEls = timeGrid.getMorePopoverEventEls()
Expand Down

0 comments on commit a000d65

Please sign in to comment.