Modern UI: the statistics screen reads the almanac
ModernSession::read_statistics_screen answers the statistics screen's filters with real data: eternal table, national tournaments (winners, scorers, history), series and records, winners by season and the own club per five minutes. Views the engine does not record yet (title chances, transfers, weekly curves, season finances) answer available false, reason not_recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e82ce1649f
commit
015fa65f56
6 files changed
+378
-1
No files matched your search
@@ -269,6 +269,14 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
check(s(at(session.read_almanac(O{{"kind", "match"}, {"id", "match:0-0"}}), "error")) == "almanac_match_not_found",
|
||||
"unknown match");
|
||||
// the statistics screen: real data (fictional false), unrecorded views say so
|
||||
const J minutes = session.read_statistics_screen(O{{"section", 8}});
|
||||
check(truth(at(minutes, "ok")) && !truth(at(minutes, "fictional")) && at(minutes, "rows").array() &&
|
||||
at(minutes, "rows").array()->size() == 4, "minute statistics");
|
||||
const J transfers = session.read_statistics_screen(O{{"section", 1}});
|
||||
check(truth(at(transfers, "ok")) && !truth(at(transfers, "available")) && s(at(transfers, "reason")) == "not_recorded",
|
||||
"transfer history not recorded");
|
||||
check(s(at(session.read_statistics_screen(O{{"section", 9}}), "error")) == "invalid_statistics_filter", "bad section");
|
||||
}
|
||||
} catch (const std::exception& ex) {
|
||||
std::fprintf(stderr, "FAIL: %s\n", ex.what());
|
||||
|
||||
Reference in new issue
Block a user