c77d0a8e89
Build & Push / Build & Push Docker Image (push) Failing after 10m39s
Replace storefront naming across source, tests, docs, config, and production scripts. Rename the legacy top-level app directory and Carplace component files, remove duplicate storefront startup scripts, and refresh the lockfile.
36 lines
1.8 KiB
TypeScript
36 lines
1.8 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { getFooterContent, localeOptions } from './CarplaceShell'
|
|
|
|
describe('CarplaceShell footer content registry', () => {
|
|
it('exposes exactly the supported carplace locales in selector order', () => {
|
|
expect(localeOptions.map((option) => option.value)).toEqual(['en', 'ar', 'fr'])
|
|
expect(localeOptions.every((option) => option.label.length > 0 && option.flag.length > 0)).toBe(true)
|
|
})
|
|
|
|
it('returns English footer links with app privacy pointing at the English mobile policy', () => {
|
|
const content = getFooterContent('en')
|
|
|
|
expect(content.localeLabel).toBe('Global (English)')
|
|
expect(content.rightsLabel).toBe('All rights reserved.')
|
|
expect(content.primary).toContainEqual({ label: 'Privacy Policy', href: '/app-privacy-en' })
|
|
expect(content.secondary).toContainEqual({ label: 'Contact Sales', href: '/footer/contact-sales' })
|
|
})
|
|
|
|
it('returns French labels while preserving canonical footer slugs', () => {
|
|
const content = getFooterContent('fr')
|
|
|
|
expect(content.localeLabel).toBe('Europe (French)')
|
|
expect(content.primary).toContainEqual({ label: "Conditions d'utilisation", href: '/footer/terms-of-service' })
|
|
expect(content.secondary).toContainEqual({ label: 'Conditions générales', href: '/footer/general-conditions' })
|
|
})
|
|
|
|
it('returns Arabic labels and app privacy href without falling back to English copy', () => {
|
|
const content = getFooterContent('ar')
|
|
|
|
expect(content.localeLabel).toBe('North Africa (Arabic)')
|
|
expect(content.rightsLabel).toBe('جميع الحقوق محفوظة.')
|
|
expect(content.primary).toContainEqual({ label: 'سياسة الخصوصية', href: '/app-privacy-ar' })
|
|
expect(content.primary.map((item) => item.label)).not.toContain('Privacy Policy')
|
|
})
|
|
})
|