Skip to content
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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

JoeSSS
Copy link
Contributor

@JoeSSS JoeSSS commented Sep 20, 2016

DeviceAgent should see Today/Notification and Control Panel elements. It is possible to run it on iOS9/iOS10 simulators, using DeviceAgent and instruments

Then(/^I can see Control Panel page elements$/) do
if ipad?
puts "Test is not stable on iPad; skipping"
end
Copy link
Contributor

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?

Copy link
Contributor Author

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..

Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@jmoody
Copy link
Contributor

jmoody commented Sep 22, 2016

@JoeSSS Can you rebase this against develop now that your other #1174 has been merged?

@JoeSSS
Copy link
Contributor Author

JoeSSS commented Sep 22, 2016

Done

jmoody
jmoody previously approved these changes Sep 30, 2016
@jmoody
Copy link
Contributor

jmoody commented Sep 30, 2016

Sweet! This is going make add the requested feature much easier.

@msftclas
Copy link

msftclas commented Jul 5, 2018

CLA assistant check
All CLA requirements met.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants