Closed Bug 1196456 Opened 9 years ago Closed 9 years ago

Dogfood test - [Storage] SD card memory settings

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

References

()

Details

Attachments

(1 file)

General assignments at: https://docs.google.com/spreadsheets/d/1RNVZbWiqc4n4h0ftlzzdYJ-a7Iu0YZEQZUfMEOJj3Co/edit#gid=0
Dogfood suite at: https://moztrap.mozilla.org/manage/cases/?filter-suite=846&pagesize=100&sortfield=created_ofn&filter-productversion=230&sortdirection=desc&pagenumber=1

https://moztrap.mozilla.org/manage/case/15949/


#15949 Created by DerekH on 2015-03-02

Ensure the files on the SD card can be viewed, and that new files can be stored on the SD card

Prerequisites: Have an SD card with pictures on it, but not in the device

    Launch Gallery app and observe pictures

    Gallery app launches and pictures are displayed

    Insert SD card into device and restart device by long tapping the power button and tapping restart

    Device restarts and lands the user on the lockscreen

    Launch Gallery app and observe pictures

    Pictures that were found on the SD card are now properly displayed in the Gallery app

    Launch Settings app

    Settings app launches

    Open Media Storage, and change the Default Media Location to SD card

    Value selector is changed to reflect the SD card selection

    Launch Camera app and take a few pictures

    Pictures are saved

    Launch Gallery app and observe pictures

    Pictures taken in step 6 appear in the Gallery app

    Remove SD card and restart the device

    Device restarts and lands the user on the lockscreen

    Open gallery app

    All pictures found on the SD card do not appear in the Gallery app
Comment on attachment 8652280 [details] [review]
[gaia] mwargers:1196456 > mozilla-b2g:master

I did a lot of work to stabilize this test. 
See the comment before the kill_all method. That part is really necessary, otherwise I keep getting intermittent failures in wait_for_thumbnail_visible().
With this setup, I was able to run this test 20 times, with only one failure in gallery.launch() in self.wait_for_element_not_displayed(*self._progress_bar_locator) , which I think is not really specific to this test.
Attachment #8652280 - Flags: review?(npark)
Attachment #8652280 - Flags: review?(jlorenzo)
Comment on attachment 8652280 [details] [review]
[gaia] mwargers:1196456 > mozilla-b2g:master

Thanks for making media_storage.py look more polished.  the script looks good to me.
Attachment #8652280 - Flags: review?(npark) → review+
I had to make one change to get the test working on the Aries device (Aries doesn't support formatting the internal sd card)
     def confirm_eject_SD(self):
         self.marionette.find_element(*self._eject_dialog_confirm_locator).tap()
-        Wait(self.marionette).until(expected.element_displayed(*self._internal_format_selector_locator))
+        Wait(self.marionette).until(expected.element_not_displayed(*self._eject_dialog_confirm_locator))

I'm using element_not_displayed here (which I normally prefer not to use), because checking for element.is_displayed() is always returning true for the underlying settings page, even though they are completely overlayed by this dialog. Not sure if that's a recent regression.
Comment on attachment 8652280 [details] [review]
[gaia] mwargers:1196456 > mozilla-b2g:master

The test itself looks good to me. However, the page classes contains too much duplication. If one day, devs change the HTML page that makes:
> [data-id="internal"]
> [data-id="external"]
invalid. We'd have to change 8 different locators. This is too error-prone. I'd prefer to factorize these locators into 2 small locators. More details in the PR.
Attachment #8652280 - Flags: review?(jlorenzo)
Ok, I was perhaps afraid the locators I used wouldn't be liked. They are quite complicated. The old ones are simpler, but they are making use of very generic things.
Comment on attachment 8652280 [details] [review]
[gaia] mwargers:1196456 > mozilla-b2g:master

Ok, like this?
Attachment #8652280 - Flags: review?(jlorenzo)
Comment on attachment 8652280 [details] [review]
[gaia] mwargers:1196456 > mozilla-b2g:master

R+ modulo the class StorageRegion that has been duplicated.
Attachment #8652280 - Flags: review?(jlorenzo) → review+
I had to fix one small merge conflict.
I retested 5 times on Flame and Aries device and those passed.
Merged: https://github.com/mozilla-b2g/gaia/commit/6a43fae6688011483d8b28da56c42db68b945683
Status: NEW → RESOLVED
Closed: 9 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: