sokko-g/tests
Shinuwa c3e494b8a6
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 24m57s
Validate and deploy Sokko G / deploy (push) Successful in 17s
Let players use Sokko TCG from a phone through a mobile fallback mode
#/mobile/cards shows the game without the site shell: a title, a footer
with the account and a discreet "Version complète" link, and a tab bar
fixed at the bottom. Phones opening #/cards are sent to the same section
in mobile mode unless the player chose the full version. Account,
History and Administration point to the computer.

The panels are the computer ones, adapted under .nebula-mobile (and
body.nebula-mobile-body for dialogs) for a 393×852 reference phone:
small cards with names under them when opening packs, a revealed card
shown large on tap, tap-to-pick team recruitment with a single Recruit
button and large stars, row lists for explorers and commons in the
expedition pickers, a race track and circuit that read at phone size,
and full-width actions throughout. Firefox no longer shows a mirrored
back on a flipped card.

Phone Playwright journeys check that every section fits the screen with
no button wrapping, then open a pack, run an expedition and recruit a
team by touch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:55:35 +01:00
..
fixtures Let a guide checklist update from its page filters without losing checks, and optionally limit the page to what the checklist contains 2026-12-01 17:39:00 +01:00
helpers Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
AGENTS.md Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
aniimo-elements.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
aniimo.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
auto-backup.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
data-validation.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
deferred-module-data.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
deployment-workflow.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
file-headers.test.mjs Check in the tests that central files keep their full headers and that every tool has a compactor 2026-12-01 11:22:50 +01:00
finish-availability.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
function-docs.test.mjs Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
guide-checklist.test.mjs Let a guide checklist update from its page filters without losing checks, and optionally limit the page to what the checklist contains 2026-12-01 17:39:00 +01:00
holo-flares.test.mjs Group Sokko TCG's interface files by Guild quest and card rendering 2026-12-01 11:35:18 +01:00
library-copy.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-api.test.mjs Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
nebula-cards-daily.test.mjs Group Sokko TCG's interface files by Guild quest and card rendering 2026-12-01 11:35:18 +01:00
nebula-cards-expedition-balance.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-expedition-service.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-expeditions.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-mirror.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-mobile.test.mjs Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
nebula-cards-team.test.mjs Group Sokko TCG's interface files by Guild quest and card rendering 2026-12-01 11:35:18 +01:00
nebula-cards.test.mjs Put trading and giving up front and suggest the players who need each card 2026-12-01 17:01:56 +01:00
persistence-queue.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
project-env.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
quota-refresh.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
react-lint.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
README.md Let players use Sokko TCG from a phone through a mobile fallback mode 2026-12-03 23:55:35 +01:00
server-cache.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
server-robustness.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
static-app.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
static-games.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
static-styles.test.mjs Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
static-toolboxes.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
table-evaluation.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
task-planner-quantities.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-alert-visibility.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-compactors.test.mjs Check in the tests that central files keep their full headers and that every tool has a compactor 2026-12-01 11:22:50 +01:00
toolbox-image-actions.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-import-validation.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-modules.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-share-crypto.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-share-quota.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-shares-api.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-shares-store.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-targets.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00

Tests Node

Tests lancés avec le lanceur intégré de Node (node --test), sans navigateur. Les parcours dans un vrai navigateur sont dans e2e/. Le choix entre les deux est expliqué dans docs/TEST_STRATEGY.md.

npm test                                  # tous les tests Node
node --test tests/nebula-cards.test.mjs   # un seul fichier
node --test --test-name-pattern="site content" tests/data-validation.test.mjs
npm run test:cards                        # seulement le TCG

Ce que couvrent les fichiers

Fichiers Sujet
data-validation.test.mjs + helpers/data-validation.mjs Contenu éditable : site.json, données de jeux, Librairie. Toute nouvelle clé de texte se déclare ici.
nebula-cards*.test.mjs Sokko TCG : règles pures, service avec une base SQLite en mémoire, API HTTP, Carte du jour, Expéditions et leur équilibrage, Équipe du jour, Miroir brisé, adresses et redirection du mode mobile (nebula-cards-mobile.test.mjs)
server-*.test.mjs, static-app.test.mjs, deployment-workflow.test.mjs, project-env.test.mjs Serveur Node (cache, robustesse), application construite, livraison, lecture du .env
toolbox-modules.test.mjs, static-toolboxes.test.mjs, persistence-queue.test.mjs, deferred-module-data.test.mjs, quota-refresh.test.mjs, auto-backup.test.mjs, library-copy.test.mjs Toolboxes : normalisation des outils, file d'écriture, médias différés, sauvegarde, copie depuis la Librairie
file-headers.test.mjs, function-docs.test.mjs, static-styles.test.mjs, react-lint.test.mjs, toolbox-compactors.test.mjs Règles d'architecture vérifiées sur les sources : en-têtes /** @file … */ du JS (rubriques des fichiers centraux et des gros fichiers), JSDoc des fonctions exportées (cliquet sur fixtures/undocumented-exports.json) et // Rôle : des feuilles Sass, blocs SassDoc /// des mixins et fonctions, compacteur de chaque outil, taille des feuilles Sass, chargement des styles du TCG, règles React
aniimo*.test.mjs, static-games.test.mjs, guide-checklist.test.mjs Guides de jeux
holo-flares.test.mjs, finish-availability.test.mjs Effets visuels des cartes

Les tests « statiques » lisent les fichiers sources pour protéger une règle d'architecture. Ils ne remplacent pas un parcours navigateur quand le risque porte sur une interaction ou un rendu.

Écrire un test

  • Commencer le fichier par un en-tête /** @file … */ (gabarit dans website/AGENTS.md).
  • Un test du TCG crée sa propre base en mémoire et passe now et random au service pour rester reproductible.
  • Un nouveau fichier de test du TCG s'ajoute aux listes lint:cards et test:cards de package.json.