Merge LockScreen class into GaiaDevice class

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: zcampbell, Assigned: akruglov)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
*This is not a task yet*

We were just discussing merging the LockScreen class into the GaiaDevice class.

The GaiaDevice class now contains many high-level non UI actions against Gaia which is also what the LockScreen class does.

We can merge them for brevity. It would also resolve the naming clash between the Lock Screen and the app object.

This change would affect some dependencies so this bug is to solicit opinions from them; b2gperf, eideticker, mtbf, tef tests.

One option is to mark the LockScreen methods as deprecated for the next gaiatest version to give consumers time to move to the new methods, before removing them entirely.
(Assignee)

Comment 2

5 years ago
I can take that one.
It looks like it doesn't affect a lot of tests.

I found references to LockScreen only in following files:
gaiatest/tests/unit/test_cleanup_gaia.py
gaiatest/tests/unit/test_lock_screen.py
gaiatest/tests/endurance/test_endurance_lock_screen.py
gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera.py
gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera_with_passcode.py
gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_homescreen.py
gaiatest/tests/functional/lockscreen/test_lockscreen_wake_with_notification.py
gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_emergency_call_screen.py
gaiatest/tests/functional/lockscreen/test_lockscreen_notification.py
gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_homescreen_with_passcode.py
gaiatest/gaia_test.py

I can change them all at once, or I can change only functional tests. 

As for deprecation, I can add decorator for LockScreen class methods, so every time method is called, warning will be issued. Something like that: https://pastebin.mozilla.org/3790838
(Reporter)

Updated

5 years ago
Assignee: nobody → akruglov
(Reporter)

Comment 3

5 years ago
Sasha that looks perfect, the warning is good too!

If you can change the tests too that would be very helpful.
(Assignee)

Comment 4

5 years ago
Created attachment 8349534 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/14815

Removed LockScreen class and migrated all tests (functional, unit, endurance) to use GaiaDevice class instead. Also updated gcli.py.

Who else should I add to reviewers?
Attachment #8349534 - Flags: review?(zcampbell)
(Reporter)

Comment 5

5 years ago
Comment on attachment 8349534 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/14815

r-, We need to keep the original class for one or two versions of gaiatest.
Attachment #8349534 - Flags: review?(zcampbell) → review-
(Assignee)

Updated

5 years ago
Attachment #8349534 - Flags: review- → review?(zcampbell)
(Assignee)

Comment 6

5 years ago
Returned class back.
Added deprecation warning.
(Reporter)

Comment 7

5 years ago
Comment on attachment 8349534 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/14815

r+ from me!
Attachment #8349534 - Flags: review?(zcampbell) → review+
(Reporter)

Comment 8

5 years ago
Merged:
https://github.com/mozilla-b2g/gaia/commit/f5f563ff820df4ae9439ac0f0d1458e47f34baa3
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.