Closed
Bug 968741
Opened 10 years ago
Closed 9 years ago
Update test_create_new_alarm to wait for the alarm to trigger
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zcampbell, Assigned: viorela)
References
Details
Attachments
(1 file, 1 obsolete file)
This may be difficult or not worth it but let's try anyway.. To create parity with the manual smoke tests, update test_create_new_alarm.py to wait for the alarm to trigger. After creating the alarm, kill the Clock app and wait for the alarm alert. Update the test's name to suit. Be very wary of any race condition between the trigger time of the alarm and the current time passing (which might mean the alarm would not trigger for 23hr 59 minutes). If you run into problems that mean the test code is too difficult,fragile or causes the test to take too long to run then please push back on this task. This may be blocked by: https://bugzilla.mozilla.org/show_bug.cgi?id=946130 Similarly using actions might be slow or unreliable so investigate other ways to set the alarm's time if need be.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → viorela.ioia
Assignee | ||
Comment 1•10 years ago
|
||
I've been investigating this bug and I have an idea. As we can't change the alarm time, I thought that we might change the time on the device. After we set the alarm, we set the device time to be some seconds less than the current time. We can do that by using the set_time method from data_layer. Then we open Clock app, we disable the alarm and re-enable it. That way we will get the message that our alarm is set for less than a minute. The next step would be to close the Clock app and wait for the alarm to be triggered. I'm not sure if this is a good way of modifying the test, as we need to add some extra steps. What do you think, Zac?
Flags: needinfo?(zcampbell)
Reporter | ||
Comment 2•10 years ago
|
||
Good thinking Viorela. It sounds like you'll need to be very careful with the timing. Possibly turn off nitz (automatic time update) during the setUp and then some very thorough intermittent testing! Can you do a proof of concept and make sure it works on both desktopb2g and device? If it doesn't work on desktopb2g it might be a blocker.
Flags: needinfo?(zcampbell)
Reporter | ||
Updated•10 years ago
|
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8420953 -
Flags: review?(zcampbell)
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8420953 [details] [review] Github Pr: https://github.com/mozilla-b2g/gaia/pull/16826 r-, some changes to make
Attachment #8420953 -
Flags: review?(zcampbell) → review-
Reporter | ||
Comment 6•9 years ago
|
||
Viorela, can you try work on this again?
Flags: needinfo?(viorela.ioia)
Assignee | ||
Comment 7•9 years ago
|
||
I updated the test, but it will fail at the end, because we still blocked by Bug 947317
Attachment #8420953 -
Attachment is obsolete: true
Attachment #8475122 -
Flags: review?(zcampbell)
Attachment #8475122 -
Flags: review?(florin.strugariu)
Flags: needinfo?(viorela.ioia)
Comment 8•9 years ago
|
||
Comment on attachment 8475122 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036/files The code looks good but I have some concerns
Attachment #8475122 -
Flags: review?(florin.strugariu) → review-
Reporter | ||
Comment 9•9 years ago
|
||
Comment on attachment 8475122 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036/files I didn't run it so only f-, but I tihnk we should be sure we're setting the minutes reliably.
Attachment #8475122 -
Flags: review?(zcampbell) → feedback-
Assignee | ||
Comment 11•9 years ago
|
||
The PR is updated, but the test will fail at the end, because of Bug 947317. After closing the alarm frame, no code is executed.
Flags: needinfo?(viorela.ioia)
QA Whiteboard: [fxosqa-auto-backlog+]
Assignee | ||
Updated•9 years ago
|
QA Whiteboard: [fxosqa-auto-backlog+] → [fxosqa-auto-backlog+][fxosqa-auto-s4]
Assignee | ||
Updated•9 years ago
|
QA Whiteboard: [fxosqa-auto-backlog+][fxosqa-auto-s4] → [fxosqa-auto-s4]
Assignee | ||
Comment 12•9 years ago
|
||
Comment on attachment 8475122 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036/files I updated the PR. The test is working as expected on device, but it is skipped on desktopb2g, as we cannot set the time. I started an adhoc here: http://jenkins1.qa.scl3.mozilla.com/job/flame-kk.ui.adhoc/340/console Please take a look over the changes. Thanks!
Attachment #8475122 -
Attachment description: Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036 → Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036/files
Attachment #8475122 -
Flags: review?(zcampbell)
Attachment #8475122 -
Flags: review?(robert.chira)
Attachment #8475122 -
Flags: review?(florin.strugariu)
Attachment #8475122 -
Flags: review-
Reporter | ||
Comment 13•9 years ago
|
||
Comment on attachment 8475122 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036/files It runs well but just needs the wait updated ;) ;)
Attachment #8475122 -
Flags: review?(zcampbell) → review-
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8475122 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036/files waits are updated
Attachment #8475122 -
Flags: review- → review?(zcampbell)
Updated•9 years ago
|
Attachment #8475122 -
Flags: review?(robert.chira) → review+
Reporter | ||
Comment 15•9 years ago
|
||
Comment on attachment 8475122 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/23036/files New waits are good! R+
Attachment #8475122 -
Flags: review?(zcampbell) → review+
Assignee | ||
Comment 16•9 years ago
|
||
Merged in: https://github.com/mozilla-b2g/gaia/commit/6ee6cbb5f05cdc9563fecc106ed1d68994698b1e
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Attachment #8475122 -
Flags: review?(florin.strugariu) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•