Closed Bug 970915 Opened 8 years ago Closed 7 years ago

Music test - return elapsed time as a time object and assert appropriately


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

Gonk (Firefox OS)


(Not tracked)



(Reporter: zcampbell, Assigned: Bebe, Mentored)


(Whiteboard: [gaia-ui-test][lang=py])


(1 file)

The music app object returns the time the song has been playing for as a text string. This means is has to match exactly with 00:05 for the test to pass.

3 tasks:
- Return the elapsed time as a python time object
- In the play testss wait_for_condition to be >= to 00:03
- Code the minimum timeout into the wait to be at least the duration that we expect for the song to have started playing, eg 10 seconds.

We already do similar in the video app object - you can look to it for code samples.
Hey there,

Can I work on this bug?
You sure can Kevin!

Are you experienced with our test suite already? What do you need to know about getting started, any more questions?
Assignee: nobody → lau93kevin
I don't have any experience with the test suite. Is there a reference I could use to get setup?
this will help you get started with running the tests:

Take note of the pre-requisites.

It'd be a good idea just to get the tests running on your computer and get familiar with that before you start to modify them.

In this particular case you'll need to get a music file to be read by desktopb2g (I think it goes in ~/Music/ folder).

Any more questions you can find us all in #mozwebqa on irc.mozilla.

Stay in touch :)
Re-setting for community.
Assignee: lau93kevin → nobody
Priority: P4 → P3
Mentor: zcampbell
Whiteboard: [gaia-ui-test][mentor=zac][lang=py] → [gaia-ui-test][lang=py]
I will give this a try
Assignee: nobody → florin.strugariu
Comment on attachment 8449509 [details] [review]
Link to Github pull-request:

what about the `player_current_timestamp` property? These two could probably be merged.
Attachment #8449509 - Flags: review?(zcampbell) → review-
Comment on attachment 8449509 [details] [review]
Link to Github pull-request:

Zac the 2 elements can't be merged.

player_current_timestamp returns the 'currentTime' property of the <audio> element from the app (The actual element that is paling the song) 

  It indicates the position for the playback of the audio/video, in seconds (float) ex: u'9.482502'

player_elapsed_time returns the value of the html element that is visible on the screen and shows the current time 
  It indicates the position for the playback of the audio/video, in minutes and seconds (str) ex: 00:09
Attachment #8449509 - Flags: review- → review?(zcampbell)
Comment on attachment 8449509 [details] [review]
Link to Github pull-request:

Ok bebe, I understand now. let's keep it that way!

Attachment #8449509 - Flags: review?(zcampbell) → review+
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.