Closed Bug 1204859 Opened 5 years ago Closed 5 years ago
Screen > Pass code validation > "before each" hook - this ._unlocker ._stop is not a function
https://treeherder.mozilla.org/logviewer.html#?job_id=169065&repo=mozilla-b2g37_v2_2 11:43:14 INFO - TEST-UNEXPECTED-FAIL | system/test/unit/lockscreen_test.js | system/LockScreen > Pass code validation > "before each" hook - this._unlocker._stop is not a function 11:43:14 INFO - TypeError: this._unlocker._stop is not a function 11:43:14 INFO - at ls_init (app://system.gaiamobile.org/lockscreen/js/lockscreen.js:368:5) 11:43:14 INFO - at (anonymous) (app://system.gaiamobile.org/test/unit/lockscreen_test.js:245:7) 11:43:14 INFO - at wrapper (app://system.gaiamobile.org/common/test/mocha_generators.js:62:19) 11:43:14 INFO - at run (app://system.gaiamobile.org/common/vendor/mocha/mocha.js:3709:7) 11:43:14 INFO - at next (app://system.gaiamobile.org/common/vendor/mocha/mocha.js:3973:5) 11:43:14 INFO - at (anonymous) (app://system.gaiamobile.org/common/vendor/mocha/mocha.js:3984:5) 11:43:14 INFO - at (anonymous) (app://system.gaiamobile.org/common/vendor/mocha/mocha.js:4932:28)
Christiane: is this a regression of Bug 1181571 ?
Assignee: nobody → cr
I know this test ran fine when it was still hot, but now it fails in some very essential way during subject.init(). Perhaps some rebase carnage? Fix attached.
Sorry to jump in. I'm tracking the same issue and found this bug. I guess this bug is caused by bug 1190079 because it added the line "this._unlocker._stop"  without adding a corresponding mock "_stop" function to "mock_lockscreen_slide.js".  https://github.com/mozilla-b2g/gaia/pull/31248/files#diff-aa38453bb76aabcfec055ec11d292da6R368
(In reply to Luke Chang [:lchang] from comment #4) > Sorry to jump in. I'm tracking the same issue and found this bug. > > I guess this bug is caused by bug 1190079 because it added the line > "this._unlocker._stop"  without adding a corresponding mock "_stop" > function to "mock_lockscreen_slide.js". > > >  > https://github.com/mozilla-b2g/gaia/pull/31248/files#diff- > aa38453bb76aabcfec055ec11d292da6R368 Please jump in any time with helpful information. So glad you found this. Makes sense to me.
:lchang's analysis is correct: bug 1181571's test went stale when bug 1190079 landed. I revised the pull request above such that it fixes mock_lockscreen_slide.js by adding the missing stub. Looks like my unit test is the only one ever to actually initiale the LockScreen subject, so the breakage was not triggered within bug 1190079 where it should have been. Note that this patch also addresses the whitespace linter issue in bug 1204860.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S7 (18Sep)
You need to log in before you can comment on or make changes to this bug.