From e9d0ae5fcaf83a745bd2a19a2a9ec7b63b9a8f36 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Fri, 2 Sep 2022 10:52:51 +0400 Subject: [PATCH] update to allow for reporting test fails --- package.json | 2 +- src/games/GameCore.tsx | 12 ++++++++++++ src/games/sub-cores/VerbGame.tsx | 1 - yarn.lock | 22 +++++----------------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index de58cab..01cc7d1 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dependencies": { "@formkit/auto-animate": "^1.0.0-beta.1", "@fortawesome/fontawesome-free": "^5.15.4", - "@lingdocs/lingdocs-main": "^0.3.1", + "@lingdocs/lingdocs-main": "^0.3.3", "@lingdocs/pashto-inflector": "^3.8.7", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", diff --git a/src/games/GameCore.tsx b/src/games/GameCore.tsx index c854396..0e0828e 100644 --- a/src/games/GameCore.tsx +++ b/src/games/GameCore.tsx @@ -71,6 +71,12 @@ function GameCore({ questions, Display, timeLimit, Instructions, studyLink, i logGameEvent("fail on game"); setJustStruck(false); setFinish({ msg: "fail", answer: correct }); + const result: AT.TestResult = { + done: false, + time: getTimestamp(), + id, + }; + handleResult(result); } } function handleAdvance() { @@ -131,6 +137,12 @@ function GameCore({ questions, Display, timeLimit, Instructions, studyLink, i setJustStruck(false); setFinish("time out"); navigator.vibrate(errorVibration); + const result: AT.TestResult = { + done: false, + time: getTimestamp(), + id, + }; + handleResult(result); } function getProgressWidth(): string { const num = !current diff --git a/src/games/sub-cores/VerbGame.tsx b/src/games/sub-cores/VerbGame.tsx index c56f5c9..d2e1b43 100644 --- a/src/games/sub-cores/VerbGame.tsx +++ b/src/games/sub-cores/VerbGame.tsx @@ -380,7 +380,6 @@ function makeVPS({ verb, subject, object, tense }: { const transitivity = (vps.verb.transitivity === "transitive" && vps.verb.canChangeTransitivity) ? "grammatically transitive" : vps.verb.transitivity; - console.log({ transitivity }); return { ...vps, verb: { diff --git a/yarn.lock b/yarn.lock index 4745212..a4b1558 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1752,12 +1752,12 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@lingdocs/lingdocs-main@^0.3.1": - version "0.3.1" - resolved "https://npm.lingdocs.com/@lingdocs%2flingdocs-main/-/lingdocs-main-0.3.1.tgz#b09b2d5e1881ee09db136618e28b7777471b66f6" - integrity sha512-TN8sAACCIjnGMFFYvkIp/tVis9z+LevasZrdG9VUrZlaNJ4U8GjbmgLeaY8VthwtivL+pFR1Gtp8BUb5ceeccw== +"@lingdocs/lingdocs-main@^0.3.3": + version "0.3.3" + resolved "https://npm.lingdocs.com/@lingdocs%2flingdocs-main/-/lingdocs-main-0.3.3.tgz#31904ffd7a39a18afa93a14c52b97d904538ac52" + integrity sha512-npMJ/Zixlv2ZZ3EBPDNkVK074TCp6MLsi5xLtNeL3Lqa5BYCfS4wezaR8DueiUDcsFi2z4jah8/H61LAtzO3vg== dependencies: - "@lingdocs/pashto-inflector" "^2.5.5" + "@lingdocs/pashto-inflector" "^3.8.7" lokijs "^1.5.12" nano "^9.0.5" passport-github2 "^0.1.12" @@ -1791,18 +1791,6 @@ typographic-en-dashes "^1.0.1" typographic-quotes "^1.2.1" -"@lingdocs/pashto-inflector@^2.5.5": - version "2.5.5" - resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-2.5.5.tgz#1d42acb3d7bc98400973d75d5a190f8b07ffa5e3" - integrity sha512-yIr1VpHGHkp+hEzMcaZProAYDrAJ+go/60Mky36piGLcFeuS4Kzg/LcrEW8aM+O55Qpgws4do6xEHJT2Hp/++Q== - dependencies: - classnames "^2.2.6" - jsurl2 "^2.1.0" - lz-string "^1.4.4" - pbf "^3.2.1" - rambda "^6.7.0" - react-select "^5.2.2" - "@lingdocs/pashto-inflector@^3.8.7": version "3.8.7" resolved "https://npm.lingdocs.com/@lingdocs%2fpashto-inflector/-/pashto-inflector-3.8.7.tgz#9f9a28718f82620a74c4d7732232bd716cf0fd85"