Closed
Bug 1219692
Opened 9 years ago
Closed 9 years ago
Implement *test_settings_passcode.py* as an integration test in JavaScript
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect)
Tracking
(feature-b2g:2.6+)
RESOLVED
FIXED
feature-b2g | 2.6+ |
People
(Reporter: whsu, Assigned: scottwu)
References
Details
(Whiteboard: [gip-to-gij])
Attachments
(1 file, 1 obsolete file)
Reporter | ||
Updated•9 years ago
|
Component: Gaia::UI Tests → Gaia::Settings
Updated•9 years ago
|
feature-b2g: --- → 2.6+
Updated•9 years ago
|
Assignee: nobody → scwwu
Status: NEW → ASSIGNED
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8687770 [details] [review]
[gaia] scottwu:1219692-gij-settings-passcode > mozilla-b2g:master
Moved a lock screen test from Gip to Gij. The test creates a passcode in settings, locks the device, and unlocks it using the slider.
Could you take a look and see if it looks fine Greg? Thanks!
Attachment #8687770 -
Flags: review?(gweng)
Comment 3•9 years ago
|
||
Unfortunately it looks completely conflicts with Bug 1219681 . However, I think your `slideToUnlock` is valuable to add in the test lib. So maybe you can change it as another test only test sliding and then unlock, without passcode? Or, we need to find out how to utilize the code in other ways.
Flags: needinfo?(scwwu)
Assignee | ||
Comment 4•9 years ago
|
||
Thanks Greg, I'll add test cases for slide to unlock without passcode then.
Johan, do you think the patch for Bug 1219681 sufficiently covers this test case? I see this test starts from the settings app, which is the only difference.
Flags: needinfo?(scwwu) → needinfo?(jlorenzo)
Comment 5•9 years ago
|
||
The test in bug 1219681 hard code the passcode in a gaia setting[1]. test_settings_passcode.py is not entirely covered by it, then.
If we were able to check that the passcode is correctly stored as a gaia setting, then we wouldn't need to unlock the lockscreen in this test. However, verifying these settings doesn't seem to be an easy task: You have to know the salt, the algorithm and the number of iterations[2].
Then, I think unlocking the screen in Settings is simple enough, and it helps to make sure the passcode panel in the Settings app works.
What do you think, Scott?
[1] https://github.com/mozilla-b2g/gaia/blob/01ffe82cf088ca8fda9fe6783dc5cad2c3dde01c/shared/js/passcode_helper.js#L49
[2] https://github.com/mozilla-b2g/gaia/blob/6e5e0cb1a95de119e93ad897f13b57eca039ce4e/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L1133
Flags: needinfo?(jlorenzo)
Assignee | ||
Comment 6•9 years ago
|
||
I agree. I'll add a test that starts from settings then. I just need to modify a few methods calls to use the new ones Greg wrote (for entering passcode).
Comment 7•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8687770 -
Attachment is obsolete: true
Attachment #8687770 -
Flags: review?(gweng)
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8689485 [details] [review]
[gaia] scottwu:1219692-gij-settings-passcode-3 > mozilla-b2g:master
The new test starts from creating a passcode in settings, lock the device, unlock by sliding, and lastly entering the passcode. This more accurately covers the Gip test case we are replacing.
Could you take a look Greg? Let me know if you see any issue, thanks!
Attachment #8689485 -
Flags: review?(gweng)
Comment 9•9 years ago
|
||
Comment on attachment 8689485 [details] [review]
[gaia] scottwu:1219692-gij-settings-passcode-3 > mozilla-b2g:master
Good. Especially the sliding function is the jewelry of the crown.
A side note: I encountered some NPM requiring Promise issue and I hope this wouldn't be an intermittent error in the future. So, before you land the code, please retry this test on the taskcluster 30 times, which is a previous recognized standard to prevent intermittent errors.
Attachment #8689485 -
Flags: review?(gweng) → review+
Assignee | ||
Comment 10•9 years ago
|
||
Added a line to require Promise have solved the intermittent problem (not sure why it's necessary). Thanks Greg!
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•