show theme creator name in dropdown

This commit is contained in:
Boof2015
2026-04-21 19:57:09 -04:00
parent 7bacb25def
commit bf9eca3b5e
2 changed files with 30 additions and 2 deletions
+16 -1
View File
@@ -37,7 +37,7 @@ import {
useSettingsStore,
} from '../src/renderer/stores/settingsStore'
import { useThemeStore } from '../src/renderer/stores/themeStore'
import { resolveThemeCreditDetails } from '../src/renderer/components/BottomBar'
import { resolveThemeCreditDetails, resolveThemeOptionLabel } from '../src/renderer/components/BottomBar'
import { scopeSettingsToOptions } from '../src/renderer/components/ScopeModule'
import { scopeSummary } from '../src/renderer/components/ScopeSettingsSection'
import {
@@ -2189,6 +2189,21 @@ test('resolveThemeCreditDetails normalizes descriptions and enables links only f
)
})
test('resolveThemeOptionLabel appends creator credit when present', () => {
assert.equal(
resolveThemeOptionLabel({ name: 'Night Shift', credit: 'Astra' }),
'Night Shift - Astra',
)
assert.equal(
resolveThemeOptionLabel({ name: 'Night Shift' }),
'Night Shift',
)
assert.equal(
resolveThemeOptionLabel({ name: 'Night Shift', credit: ' ' }),
'Night Shift',
)
})
test('BottomBar theme section renders compact credit metadata and opens valid links through Electron', async () => {
const componentSource = await readFile(join(process.cwd(), 'src', 'renderer', 'components', 'BottomBar.tsx'), 'utf8')
const stylesSource = await readFile(join(process.cwd(), 'src', 'renderer', 'styles', 'globals.css'), 'utf8')