Implement *test_lockscreen_time_check.py* as an integration test in JavaScript

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
3 years ago
9 months ago

People

(Reporter: whsu, Unassigned)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(feature-b2g:2.6+)

Details

(Whiteboard: [gip-to-gij])

(Reporter)

Updated

3 years ago
Component: Gaia::UI Tests → Gaia::System::Lockscreen
feature-b2g: --- → 2.6+
Greg, could you fold this into your current working item? Is this already a duplicate? Thanks.
Flags: needinfo?(gweng)
I have checked this test, and found it requires to connect to data network by a function 'connect_to_local_area_network':

https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L1015-L1021

in which it will try to turn on WiFi on real devices, or just throw an error. It looks that there is no dummy network for testing, so to run or not to run this test depends on whether Gij can and need to execute on real devices (as far as I knew, the answer is no because of buggy environment), OR simulator is good enough to performance the same action with the same supporting function (although without it I can still turn it on via the corresponding Settings panel).

Moreover, I remember that automatic time-update only works with proper SIM card (without that the option won't show up in the panel), therefore I don't think device can automatically update time only with WiFi network. As a result, I set NI for QA's help to check the whole story is reliable.
Flags: needinfo?(gweng) → needinfo?(whsu)
(Reporter)

Comment 3

3 years ago
Hi, Johan,

May I have your help?
I was wondering if you can help to answer this question.

Thank you.
Flags: needinfo?(whsu) → needinfo?(jlorenzo)
(In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #2)
I agree, we can't port this test in Gij exactly the same way it's written in python. Moreover, the Date/Time UI in Settings is broken on Mulet, which makes the Python test nearly non-portable.

Hence, the best we can do would be to mock Date(), so it returns a different timezone. Then we fire a 'moztimechange' ans see how the lockscreen behaves from a UI point of view.

I saw a unit test exist for that[1], I'm not sure if an integration test will cover more code. What do you think Greg?


[1] test/unit/lockscreen/widgets/clock/lockscreen_clock_widget_tick_test.js
Flags: needinfo?(jlorenzo)
Well, I agree that if the Gij cannot simulate user behaviors as previous test, and works only on heavily mocked code like the unit test, it couldn't help us a lot. I'm not sure if we're supposed to "fix" such missing feature that Gij cannot provide yet, or we at least need to fire a bug to whom(?) are responsible for issues like this, so I forward NI to Tim to make the decision.
Flags: needinfo?(timdream)
I don't think it make sense to do any kind of heavy lifting with mocks. The cost of maintaining the tests out weights the benefit.

That said, please file a bug under Firefox OS:: General so we know Mulet/Simulator needs timezone/time change support.
Flags: needinfo?(timdream)

Comment 7

9 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.