统一 Salon 全端薄荷绿主题
This commit is contained in:
@@ -24,20 +24,21 @@ describe('useShopTheme', () => {
|
||||
document.documentElement.removeAttribute('style')
|
||||
})
|
||||
|
||||
it('uses the first preset as the default visible theme', async () => {
|
||||
it('uses the mint theme as the default visible theme', async () => {
|
||||
const { resetShopTheme } = useShopTheme()
|
||||
|
||||
resetShopTheme()
|
||||
|
||||
expect(DEFAULT_SHOP_THEME.primaryColor).toBe('#E8B4B8')
|
||||
expect(DEFAULT_SHOP_THEME.secondaryColor).toBe('#C5A059')
|
||||
expect(DEFAULT_SHOP_THEME.accentColor).toBe('#4A443F')
|
||||
expect(DEFAULT_SHOP_THEME.pageBgColor).toBe('#FDFBF9')
|
||||
expect(DEFAULT_SHOP_THEME.primaryColor).toBe('#247B63')
|
||||
expect(DEFAULT_SHOP_THEME.secondaryColor).toBe('#B8E4D4')
|
||||
expect(DEFAULT_SHOP_THEME.accentColor).toBe('#17211F')
|
||||
expect(DEFAULT_SHOP_THEME.pageBgColor).toBe('#F3F7F4')
|
||||
expect(DEFAULT_SHOP_THEME.cardBgColor).toBe('#FFFFFF')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-primary')).toBe('#E8B4B8')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-secondary')).toBe('#C5A059')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-neutral')).toBe('#4A443F')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-tertiary')).toBe('#FDFBF9')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-primary')).toBe('#247B63')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-secondary')).toBe('#B8E4D4')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-neutral')).toBe('#17211F')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-tertiary')).toBe('#F3F7F4')
|
||||
expect(document.documentElement.style.getPropertyValue('--text-secondary')).toBe('#71807A')
|
||||
})
|
||||
|
||||
it('refreshes the admin theme from the cached admin shop context', async () => {
|
||||
@@ -66,6 +67,6 @@ describe('useShopTheme', () => {
|
||||
await refreshShopTheme({ mode: 'admin' })
|
||||
|
||||
expect(shopApi.getShopById).not.toHaveBeenCalled()
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-primary')).toBe('#E8B4B8')
|
||||
expect(document.documentElement.style.getPropertyValue('--theme-primary')).toBe('#247B63')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user