Create real careers from the native wizard and preserve manager presentation (by Codex)

This commit is contained in:
Codex committed 2026-10-29 01:11:41 +01:00
1 parent 738ecc7a09
commit ce1535fe2d
38 files changed
+466 -75

No files matched your search

+7
View File
@@ -399,6 +399,13 @@ int main() {
bad_rank=rr;bad_rank["meta"]["stateRevision"]="42";rejects([&]{engine_rankings_projection(rankings_bundle,ri,bad_rank,"league:live",0);});
const auto fr=rw({{"kind","fairplay"},{"leagueId","league:live"},{"season","2026/27"},{"weights",{{"yellow",1},{"red",4}}},{"recordedMatches",1},{"rows",{{{"rank",1},{"team",{{"id","club:6"},{"name","Live A"}}},{"yellow",1},{"red",0},{"points",1}},{{"rank",2},{"team",{{"id","club:7"},{"name","Live B"}}},{"yellow",0},{"red",1},{"points",4}}}}});
require(engine_fairplay_projection(rankings_bundle,ri,fr).at("rows").size()==2,"fairplay rows lost");auto bad_fair=fr;bad_fair["data"]["rows"][1]["points"]=1;rejects([&]{engine_fairplay_projection(rankings_bundle,ri,bad_fair);});
auto opening_bundle=fixture();opening_bundle["desktop"]["meta"]["date"]="2026-07-01";opening_bundle["session"]["data"]["managers"]={{{"teamId","club:6"}}};
const auto ow=[&](const Json &d){return Json{{"messageType","snapshot"},{"meta",opening_bundle.at("desktop").at("meta")},{"data",d}};};
Json opening_data={{"kind","opening"},{"enabled",true},{"showEntrants",true}};
opening_data["entrants"]={{"uefa",Json::array({Json{{"id","club:7"},{"name","Live B"}}})},{"champions",Json::array()},{"winners",Json::array()}};
opening_data["order"]=Json::array({Json{{"id","club:6"},{"name","Live A"}},Json{{"id","club:7"},{"name","Live B"}}});
opening_data["fixtureIds"]={"fixture:cup-0-1-0"};const auto oi=ow(opening_data);
require(engine_opening_projection(opening_bundle,oi).at("opening_flow").at("order")[0]=="club:6","opening ignored authoritative pair order");auto bad_opening=oi;bad_opening["data"]["order"][1]["id"]="club:6";rejects([&]{engine_opening_projection(opening_bundle,bad_opening);});bad_opening=oi;bad_opening["meta"]["stateRevision"]="42";rejects([&]{engine_opening_projection(opening_bundle,bad_opening);});
std::cout << "engine DTO, exact money, scope and booking tests passed\n";
return 0;
} catch (const std::exception &e) { std::cerr << e.what() << '\n'; return 1; }