Closed Bug 1052243 Opened 7 years ago Closed 7 years ago

jshangul.js need unit tests

Categories

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

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timdream, Assigned: sangpire)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
timdream
: review+
Details | Review
+++ This bug was initially created as a clone of Bug #994495 +++

The Korean IME script does not comes with unit tests -- we should spend time to create one so that new features (in both the keyboard app and the IME) will not break it and stop people from typing Korean.
I've never written an unit test before and neither do i know Korean. Is this bug going to be hard to pick and give a shot ?
Hi :ShellHacker,

The said code can be found here:
https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/js/imes/jshangul/jshangul.js

I think it's possible to write unit tests without knowing Korean. 

The information about writing and running Unit Tests can be found here:

https://github.com/mozilla-b2g/gaia#unit-tests

We use Mocha and Sinon in our test running environment.


Please take the bug and set to ASSIGNED if you want to work on it!
Sangpire has made some of unit test codes for his jshangule. 
Please add unit test code as a patch.
(In reply to Channy Yun [:channy] from comment #3)
> Sangpire has made some of unit test codes for his jshangule. 
> Please add unit test code as a patch.

You mean https://github.com/sangpire/jangmiIME/blob/master/test/test.coffee ?

In this case, do you think we should migrate these test cases to Gaia code base?
I, for example, did not migrate JSZhuyin test cases from https://github.com/timdream/jszhuyin/tree/master/test to Gaia.
Sorry for my late reply.

I had made test codes for korean keyboard.
https://github.com/sangpire/gaia/blob/Bug994495/apps/keyboard/test/unit/jshangul_test.js

But, It needs a check.

I guess I could finish it by next weekends.
Assign to you then.
Assignee: nobody → sangpire
Status: NEW → ASSIGNED
I write unit tests for 'jshangul.js'.

Sorry, this patch include a bug fix.
Which is can't type JUNG SUNG and CHO SUNG without First CHO SUNG.
For example, when I type 'ㅏ' and 'ㄱ' then text should be like  'ㅏㄱ'.
The only input 'ㅏ', now.

This is found when I made unit tests.
Attachment #8475976 - Flags: review?(timdream)
Comment on attachment 8475976 [details] [review]
GitHub Pull Request URI.

Thank you very much for the tests!

Please address the Github comment, amend the comment, force push and I will merge it for you.
Attachment #8475976 - Flags: review?(timdream) → review+
Hi :timdream.

I changed it. :)
master: https://github.com/mozilla-b2g/gaia/commit/d9efe6251b8dcbb90c02ee8f6b21e54a24745624

Thanks for the contribution!
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Mentor: timdream
Duplicate of this bug: 935864
Tim, Would you estimate when Korean IME can push to flame phone?
(In reply to Channy Yun [:channy] from comment #13)
> Tim, Would you estimate when Korean IME can push to flame phone?

We only ship a few layouts out of disk space concern. Given the fact there isn't a dictionary in the build for Korean IME, I think we could ship it by default in Nightly builds. Let's me file a bug to turn that on.

For the rest of the layouts it's being tracked in bug 1050574.
Filed bug 1058374 and patch submitted.
You need to log in before you can comment on or make changes to this bug.