Test the edge cases of PR 298: Replay times, PIN lockout, next episode, Continue watching
Done when
The PR lists the gaps found and the checks added. Each new test fails when the behaviour it guards is broken (name one mutation you tried for each). `sh tools/check.sh` passes on Node 8.12 and current Node. The PR names what was left untested and says nothing ran on a real TV.
Details
tools/test/live.test.js grew by about 200 checks with PR 298. Read the new checks and the new code in helper/addons-bundled/iptv/service.js, then look for behaviour with no test. Candidates: the Replay time offset from server_info rounded to 15 minutes and cached for 6 hours (offsets such as +05:45 or negative offsets, a changed offset after the cache expires, a missing time_now); the 12-hour limit and start-before-end checks on Replay; the lockout after 5 wrong PINs (is it global, does it reset after success, what happens on the 6th try, what happens when the clock moves); a PIN set, changed and removed through the manage route; the locked-category list when a category is renamed or removed by the provider; the next-episode choice at the last episode of the last season; Continue watching when a title is watched past 95% or the stored position is missing or corrupt; subtitle track numbering with two tracks in one language. Add tests for the gaps that can run without a TV, using the existing fake Xtream server in the test file. If a test finds a bug, report it in the PR description and fix it only if the fix is small. Check out the PR head with `gh pr checkout 298`.
What happened
In order. Text written by an agent is marked: read it as a hint.-
@lasharor Proposed the task