mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-18 11:44:42 +02:00
feat(update): cache fetched release notes and strict-match patch notes version
This commit is contained in:
@@ -68,6 +68,12 @@ do
|
||||
"stashed notes name a release version")
|
||||
end
|
||||
|
||||
do
|
||||
local notes, ver = PatchNotes.fromRepo("999.999.999")
|
||||
eq(notes, nil, "fromRepo returns nil when a specific engine version is missing")
|
||||
eq(ver, nil, "fromRepo version is nil when missing")
|
||||
end
|
||||
|
||||
do
|
||||
local f = assert(io.open("mobile/ios/app-repo.json", "rb"))
|
||||
local list = PatchNotes.parseRepo(f:read("*a"))
|
||||
@@ -78,6 +84,15 @@ do
|
||||
eq(notes, list[2].notes, "fromRepo returns that version's notes")
|
||||
end
|
||||
|
||||
do
|
||||
local oldVersion = package.loaded["src.core.Version"]
|
||||
package.loaded["src.core.Version"] = { engine = "999.999.999" }
|
||||
local body, ver = PatchNotes.body(nil)
|
||||
eq(body, "Unable to fetch patch notes.", "returns Unable to fetch patch notes when version is uncached and unlisted")
|
||||
eq(ver, "999.999.999", "returns the requested engine version")
|
||||
package.loaded["src.core.Version"] = oldVersion
|
||||
end
|
||||
|
||||
imp._appPatchNotes = true
|
||||
local modal = drawAndCapture(imp)
|
||||
check(modal:find("Patch notes", 1, true) ~= nil, "the modal titles itself")
|
||||
|
||||
Reference in New Issue
Block a user