-
Notifications
You must be signed in to change notification settings - Fork 7
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
Appium docs prio one #164
Appium docs prio one #164
Conversation
@jasonbyrne, @johnsickels, and/or @kbabcock1 please look at this documentation when you have time and let me know if it makes sense or if I should change anything. |
tests/src/appium/smoke.ts
Outdated
const response = context.response as AppiumResponse; | ||
const hello = await context.findAll("id/pager_signin_button"); | ||
context.assert(hello[0]).exists(); | ||
context.assert(hello).exists(); |
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 could produce a false positive. findAll
returns Promise<iValue[]>
which is truthy, even if the array is empty and returns no elements found.
A better assertion for findAll
would be
context.assert(hello.length).greaterThan(0);
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.
Fixed
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 fix this one as well
context.assert(hello).exists();
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.
Done
tests/src/appium/smoke.ts
Outdated
const response = context.response as AppiumResponse; | ||
const hello = await context.findAll("id/pager_signin_button"); | ||
context.assert(hello[0]).exists(); | ||
context.assert(hello).exists(); |
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 fix this one as well
context.assert(hello).exists();
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.
Awesome work! Well done
Added documentation about Appium scenarios, elements, responses, and assertion contexts. Also added tests for Appium.