Files
orca/src/shared/browser-cookie-import-sources.test.ts
T
Jinjing e9f1d644f8 Add browser import hint button to the browser toolbar (#4866)
* Add browser import hint button to the browser toolbar

- Adds a dismissible "Import" button in the browser address bar that opens a popover with browser detection and one-click cookie import
- Persists the hint's dismissed state via `browserImportHintHidden` in `PersistedUIState` so the hint stays hidden after the user clicks "Hide Hint"
- Extracts platform-aware import source labels into `browser-cookie-import-sources.ts` and hint visibility logic into `browser-import-hint-visibility.ts` for isolated testing

* fix the onblur for the import popover
2026-06-07 23:02:43 -07:00

36 lines
872 B
TypeScript

import { describe, expect, it } from 'vitest'
import { getBrowserCookieImportSourceLabels } from './browser-cookie-import-sources'
describe('getBrowserCookieImportSourceLabels', () => {
it('includes mac-only sources on darwin', () => {
expect(getBrowserCookieImportSourceLabels('darwin')).toEqual([
'Google Chrome',
'Microsoft Edge',
'Arc',
'Brave',
'Comet',
'Firefox',
'Safari'
])
})
it('omits mac-only sources on Windows', () => {
expect(getBrowserCookieImportSourceLabels('win32')).toEqual([
'Google Chrome',
'Microsoft Edge',
'Brave',
'Comet',
'Firefox'
])
})
it('omits mac-only and Comet on Linux', () => {
expect(getBrowserCookieImportSourceLabels('linux')).toEqual([
'Google Chrome',
'Microsoft Edge',
'Brave',
'Firefox'
])
})
})