Import AITURK IDE 1.0.0-beta.1 from Hermes 63279301; preserve MIT license

This commit is contained in:
yilsem committed 2026-09-05 13:26:46 +03:00
commit 03634b1ca3
11340 files changed
+3442369

No files matched your search

@@ -0,0 +1,78 @@
import { beforeEach, describe, expect, it } from 'vitest'
import {
$sidebarGrouping,
$sidebarOrdering,
$sidebarRowMeta,
$sidebarViewCustomized,
resetSidebarView,
setSidebarGrouping,
setSidebarOrdering,
toggleSidebarRowMeta,
toggleSidebarStatusFilter
} from './layout'
import { $showAllProfiles } from './profile'
beforeEach(() => {
$showAllProfiles.set(false)
resetSidebarView()
})
describe('the sidebar as it ships', () => {
it('groups by date, sorts by recency, and pins the timestamp and preview', () => {
expect($sidebarGrouping.get()).toBe('date')
expect($sidebarOrdering.get()).toBe('updated')
expect($sidebarRowMeta.get()).toEqual(['preview', 'updated'])
})
it('offers no reset until something actually moves off the defaults', () => {
expect($sidebarViewCustomized.get()).toBe(false)
toggleSidebarRowMeta('tokens')
expect($sidebarViewCustomized.get()).toBe(true)
})
it('is what reset puts back — every knob, not just the filters', () => {
setSidebarGrouping('project')
setSidebarOrdering('cost')
toggleSidebarRowMeta('updated')
toggleSidebarRowMeta('cost')
toggleSidebarStatusFilter('working')
resetSidebarView()
expect($sidebarGrouping.get()).toBe('date')
expect($sidebarOrdering.get()).toBe('updated')
expect($sidebarRowMeta.get()).toEqual(['preview', 'updated'])
expect($sidebarViewCustomized.get()).toBe(false)
})
it('ships by date in the all-profiles scope too, and resets back to it', () => {
$showAllProfiles.set(true)
setSidebarGrouping('profile')
resetSidebarView()
expect($sidebarGrouping.get()).toBe('date')
expect($sidebarViewCustomized.get()).toBe(false)
})
it('resets the scope the user is not looking at, so flipping the rail cannot restore it', () => {
setSidebarGrouping('status')
$showAllProfiles.set(true)
setSidebarGrouping('profile')
resetSidebarView()
$showAllProfiles.set(false)
expect($sidebarGrouping.get()).toBe('date')
})
it('turns all-profiles on when the user groups by profile, since that is the ask', () => {
setSidebarGrouping('profile')
expect($showAllProfiles.get()).toBe(true)
expect($sidebarGrouping.get()).toBe('profile')
})
})