fix bug#7
Build & Push / Build & Push Docker Image (push) Failing after 2m50s
Test / Type Check (all packages) (push) Failing after 55s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
Build & Push / Build & Push Docker Image (push) Failing after 2m50s
Test / Type Check (all packages) (push) Failing after 55s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
This commit is contained in:
@@ -27,9 +27,9 @@ describe('localization foundations', () => {
|
||||
});
|
||||
|
||||
it('generates and resolves localized stable route paths', () => {
|
||||
expect(localizedPath('home', 'ar')).toBe('/ar/system');
|
||||
expect(localizedPath('privacy', 'fr')).toBe('/fr/system/confidentialite');
|
||||
expect(localizedPath('sign-in', 'ar')).toBe('/ar/system/تسجيل-الدخول');
|
||||
expect(localizedPath('home', 'ar')).toBe('/ar/dark');
|
||||
expect(localizedPath('privacy', 'fr')).toBe('/fr/dark/confidentialite');
|
||||
expect(localizedPath('sign-in', 'ar')).toBe('/ar/dark/تسجيل-الدخول');
|
||||
expect(routeIdFromSlug('fr', 'confidentialite')).toBe('privacy');
|
||||
expect(routeIdFromSlug('fr', 'privacy')).toBeNull();
|
||||
expect(routeIdFromAnyLocaleSlug('privacy')).toBe('privacy');
|
||||
@@ -43,17 +43,17 @@ describe('localization foundations', () => {
|
||||
|
||||
it('generates reciprocal hreflang values', () => {
|
||||
const links = hreflangMap(new URL('https://approved.test'), 'home');
|
||||
expect(links.en).toBe('https://approved.test/en/system');
|
||||
expect(links.ar).toBe('https://approved.test/ar/system');
|
||||
expect(links['x-default']).toBe('https://approved.test/en/system');
|
||||
expect(links.en).toBe('https://approved.test/en/dark');
|
||||
expect(links.ar).toBe('https://approved.test/ar/dark');
|
||||
expect(links['x-default']).toBe('https://approved.test/en/dark');
|
||||
});
|
||||
|
||||
it('preserves only approved campaign query values and valid hashes', () => {
|
||||
const current = new URL(
|
||||
'https://approved.test/en/system?utm_source=campaign&email=private%40approved.test#gibberish',
|
||||
'https://approved.test/en/dark?utm_source=campaign&email=private%40approved.test#gibberish',
|
||||
);
|
||||
const switched = localeSwitchUrl(current, 'fr', 'home');
|
||||
expect(switched.pathname).toBe('/fr/system');
|
||||
expect(switched.pathname).toBe('/fr/dark');
|
||||
expect(switched.search).toBe('?utm_source=campaign');
|
||||
expect(switched.hash).toBe('');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user