// Fixtures pour les tests - échantillons de contenu export const sampleJSONContent = { name: "Test Content JSON", description: "Contenu de test au format JSON", difficulty: "medium", language: "english", icon: "🧪", vocabulary: { "hello": "salut", "world": "monde", "test": "test", "school": "école", "book": "livre" }, sentences: [ { english: "Hello world", chinese: "你好世界", prononciation: "nǐ hǎo shì jiè" }, { english: "I go to school", chinese: "我去学校", prononciation: "wǒ qù xuéxiào" } ], grammar: { "present_tense": { title: "Present Tense", explanation: "Used for current actions", examples: [ { chinese: "我学习", english: "I study", prononciation: "wǒ xuéxí" } ] } } }; export const sampleJSContent = { vocabulary: { central: "中心的;中央的", avenue: "大街;林荫道", refrigerator: "冰箱", closet: "衣柜;壁橱", elevator: "电梯" }, sentences: [ { english: "The building is in the center", chinese: "大楼在中心", prononciation: "dà lóu zài zhōngxīn" } ] }; export const gameCompatibilityTestData = [ { content: { vocabulary: { "test": "test" } }, expectedGames: ["whack-a-mole", "memory-match", "quiz-game"] }, { content: { vocabulary: { "test": "test" }, sentences: [{ english: "test", chinese: "test" }] }, expectedGames: ["whack-a-mole", "memory-match", "quiz-game", "fill-the-blank"] }, { content: { vocabulary: { "test": "test" }, texts: [{ title: "Test", content: "Test content" }] }, expectedGames: ["whack-a-mole", "memory-match", "quiz-game", "story-reader"] } ]; export const invalidContentSamples = [ {}, null, undefined, { name: "Invalid" }, // pas de vocabulary { vocabulary: {} }, // vocabulary vide { vocabulary: null }, { vocabulary: "not an object" } ]; export const networkTestResponses = { "http://localhost:8083/do-proxy/sbs-level-7-8-new.json": { ok: true, data: sampleJSONContent }, "http://localhost:8083/do-proxy/english-class-demo.json": { ok: true, data: { name: "English Class Demo", vocabulary: { "demo": "démonstration" } } }, "http://localhost:8083/do-proxy/nonexistent.json": { ok: false, status: 404 } }; export const proxyTestCases = [ { name: "Valid JSON file", url: "/do-proxy/sbs-level-7-8-new.json", expectedStatus: 200, expectedContent: sampleJSONContent }, { name: "Non-existent file", url: "/do-proxy/nonexistent.json", expectedStatus: 404 }, { name: "Invalid path", url: "/invalid-path", expectedStatus: 404 } ]; export const moduleNameMappingTests = [ { filename: "sbs-level-7-8-new.json", expected: "SBSLevel78New" }, { filename: "english-class-demo.json", expected: "EnglishClassDemo" }, { filename: "test-content.json", expected: "TestContent" }, { filename: "simple.json", expected: "Simple" } ]; export const contentScannerTestData = { localFiles: ["sbs-level-7-8-new.js"], remoteFiles: ["sbs-level-7-8-new.json", "english-class-demo.json"], expectedModules: ["SBSLevel78New", "EnglishClassDemo"] }; export const gameTestData = { whackAMole: { vocabulary: { "cat": "chat", "dog": "chien", "bird": "oiseau" }, minWords: 3 }, memoryMatch: { vocabulary: { "red": "rouge", "blue": "bleu", "green": "vert", "yellow": "jaune" }, minPairs: 4 }, fillTheBlank: { sentences: [ { english: "I _____ to school", correct: "go", options: ["go", "goes", "going", "went"] } ] } };