Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

2.1 KB
Raw Blame
import { readFileSync } from 'node:fs'
import { expect, it } from 'vitest'

const css = readFileSync(new URL('../src/renderer/src/workspace.css', import.meta.url), 'utf8')

it('reserves the search button height in the Meetings header when the sidebar is pinned', () => {
  expect(css).toMatch(/\.native-home \.library-page-heading \{[^}]*height:var\(--button-height\);/)
  expect(css).toContain('.workspace:not(.sidebar-collapsed) .home-search { display:none; }')
})

it('scrolls the agenda header and events together within the narrow grid row', () => {
  const narrow = css.slice(css.indexOf('@container (max-width:520px)')).split(/^}/m)[0]
  expect(narrow).toMatch(/\.native-agenda\s*\{[^}]*overflow-y:\s*auto/)
  expect(narrow).toMatch(/\.agenda-scroll\s*\{[^}]*overflow:\s*visible/)
})

it('gives the hidden track back to the meeting list on either side of the stacking breakpoint', () => {
  expect(css).toContain('grid-template-columns:minmax(0,1fr) var(--agenda-track)')
  expect(css).toMatch(/@container \(max-width:520px\) \{ \.native-home \{[^}]*grid-template-rows:minmax\(0,1fr\) var\(--agenda-track\)/)
  expect(css).toContain('.native-home[data-agenda-open=false] { --agenda-track:0px; }')
})

it('fills a normal pane with both sidebars open and caps the rows when the pane grows', () => {
  const maxWidth = Number(css.match(/--meeting-list-max-width:(\d+)px/)?.[1])
  const sidebar = Number(css.match(/\.workspace-sidebar,\.workspace-sidebar-gap \{ width:(\d+)px/)?.[1])
  const collapsed = Number(css.match(/\.sidebar-collapsed \.workspace-sidebar-gap \{ width:(\d+)px/)?.[1])
  const agenda = Number(css.match(/\.native-home \{ --agenda-size:(\d+)px/)?.[1])
  expect([sidebar, collapsed, agenda, maxWidth]).toEqual([208, 0, 270, 1080])
  expect(1440 - sidebar - agenda).toBeLessThan(maxWidth)
  expect(1440 - collapsed).toBeGreaterThan(maxWidth)
  // The row's hover background extends 8px past the heading at each edge.
  expect(css).toMatch(/\.native-meeting-row \{[^}]*margin-inline:-8px/)
  expect(css).toMatch(/:is\(\.native-home,\.native-folder\)>\.native-library>\* \{[^}]*inline-size:min\(100%,calc\(var\(--meeting-list-max-width\) - 16px\)\);margin-inline:auto;/)
})