Closed Bug 977451 Opened 10 years ago Closed 10 years ago

[keyboard refactor] Unit test for autocorrect.js and dependencies (predictions.js/worker.js/suggestions.js)

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timdream, Assigned: timdream)

References

Details

(Whiteboard: [ucid:SystemPlatform47, 1.5, ft:system-platform])

Attachments

(1 file)

We need autocorrect.js and it's dependency (predictions.js/worker.js/suggestions.js) covered by tests.
Maybe the dependencies warrants it's own unit tests but let's write a test with a larger scope first?
Summary: [keyboard refactor] Unit test for autocorrect.js and friends → [keyboard refactor] Unit test for autocorrect.js and dependencies (predictions.js/worker.js/suggestions.js)
This has tests, they are in normal keyboard already. The code for this has not been changed.
Assignee: nobody → timdream
(In reply to Jan Jongboom [:janjongboom] from comment #2)
> This has tests, they are in normal keyboard already. The code for this has
> not been changed.

You are right on the predictions.js and worker.js, but not autocorrect.js and suggestions.js.
I wonder if we should copy the predictions.js and worker.js tests here too.
Pull request updated again.
Rudy, could you review this? I added the tests and removed two events since these events have no value outside of the two instances.


This needs to land before language switch support if your patch there includes changes to autocorrect.js.
Attachment #8397528 - Flags: review?(rlu)
Attachment #8397528 - Flags: feedback?(janjongboom)
Comment on attachment 8397528 [details] [review]
Github: https://github.com/mozilla-b2g/gaia/pull/17677

I'd like to see if Jan has bandwidth to look at this part of tests.
I believe he is a better reviewer for suggestion/auto correction and I have some blockers and tasks to handle, so will come to the review later.

Jan,

Could you help?
Thanks.
Attachment #8397528 - Flags: review?(rlu) → review?(janjongboom)
Comment on attachment 8397528 [details] [review]
Github: https://github.com/mozilla-b2g/gaia/pull/17677

See my comment on GH.
Attachment #8397528 - Flags: review?(janjongboom)
Attachment #8397528 - Flags: review-
Attachment #8397528 - Flags: feedback?(janjongboom)
Comment on attachment 8397528 [details] [review]
Github: https://github.com/mozilla-b2g/gaia/pull/17677

Pull request updated.
Attachment #8397528 - Flags: review- → review?(janjongboom)
Comment on attachment 8397528 [details] [review]
Github: https://github.com/mozilla-b2g/gaia/pull/17677

Almost there. See GH.
Attachment #8397528 - Flags: review?(janjongboom) → review-
Comment on attachment 8397528 [details] [review]
Github: https://github.com/mozilla-b2g/gaia/pull/17677

r=me, if the 'char' assertions are removed.
Attachment #8397528 - Flags: review?(janjongboom) → review+
Patch fixed and rebased, waiting for Travis before merging.
master: https://github.com/mozilla-b2g/gaia/commit/7b0e205c470c56e38c12cc29cfdd876a8456cf52
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: