mirror of
https://github.com/siop-spelev/siop2.git
synced 2026-08-08 12:41:54 +00:00
feat(r4.1): socle mobile Expo — connexion démo, Ma journée, lecture hors-ligne
apps/mobile (Expo SDK 57, TS strict, workspace pnpm) : connexion e-mail/mdp + sélecteur démo ADR-002 (uniquement si l'API l'expose), tabbar de la maquette validée (onglets futurs marqués R4.2/R4.3), « Ma journée » triée priorité puis échéance (fonction pure testée), urgence en tête, pastille de synchro. D1 en actes (lecture) : cache TanStack persisté dans AsyncStorage (7 jours), NetInfo → onlineManager + bandeau hors-ligne horodaté ; jeton en SecureStore ; tokens light/dark répliqués et testés ; client typé régénéré depuis docs/openapi.json (règle d'or). API : CORS_ORIGINS opt-in (vide par défaut) — Expo web/debug seulement, le web de prod reste derrière le proxy, les apps natives n'ont pas d'Origin. Vérifié 10/10 en Expo web piloté (connexion démo Ahmed → Ma journée scopée → hors-ligne servie du cache → retour) ; 6 tests jest-expo ; lint racine étendu (react-hooks) ; job CI mobile, deploy en dépend. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
20
apps/mobile/src/theme/tokens.test.ts
Normal file
20
apps/mobile/src/theme/tokens.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { CLAIR, SOMBRE } from './tokens';
|
||||
|
||||
describe('tokens SIOP portés en RN', () => {
|
||||
it('le sombre couvre exactement les clés du clair (pas de token orphelin)', () => {
|
||||
expect(Object.keys(SOMBRE).sort()).toEqual(Object.keys(CLAIR).sort());
|
||||
});
|
||||
|
||||
it('réplique les valeurs pivots de docs/02-design/tokens.css', () => {
|
||||
expect(CLAIR.primaire).toBe('#1f4fb8');
|
||||
expect(CLAIR.safran).toBe('#dd8a0b');
|
||||
expect(SOMBRE.fond).toBe('#0f1622');
|
||||
expect(SOMBRE.primaire).toBe('#6e92e8');
|
||||
});
|
||||
|
||||
it('chaque valeur est une couleur hex ou transparent', () => {
|
||||
for (const jeu of [CLAIR, SOMBRE]) {
|
||||
for (const v of Object.values(jeu)) expect(v).toMatch(/^#[0-9a-f]{6}$/);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user