-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Today/Notification and Control Panel tests #1173
base: develop
Are you sure you want to change the base?
Conversation
Then(/^I can see Control Panel page elements$/) do | ||
if ipad? | ||
puts "Test is not stable on iPad; skipping" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not skip the iPad; it will continue the test.
You cannot return from the do
block, so you will have to wrap the whole step in if !ipad?
.
Did I make that mistake too in my step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I just copy/pasted it..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I look at it on other tests also and fix?
device.agent.touch({marked: 'Continue'}) | ||
wait_for_external_animations | ||
end | ||
wait_for(options_or_timeout=3) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you replace these with wait_for calls with:
// Will probably need to be longer in CI
timeout = 5
message = "Timed out waiting for XXXXX view after #{timeout} seconds"
bridge_wait_for(message, {timeout: timeout}) do
end
If you are waiting for views with Core#query
, use:
wait_for_view(< query >)
wait_for_no_views(< query >)
Then(/^I can open Notifications tab in Today and Notifications page$/) do | ||
if ipad? | ||
puts "Test is not stable on iPad; skipping" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment below about branching on !ipad?
fail("Expected to see 'No Notifications' element") | ||
end | ||
else | ||
wait_for(options_or_timeout=3) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fail with DeviceAgent, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
…tion_center_tests
Done |
Sweet! This is going make add the requested feature much easier. |
DeviceAgent should see Today/Notification and Control Panel elements. It is possible to run it on iOS9/iOS10 simulators, using DeviceAgent and instruments