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

Appium docs prio one #164

Merged
merged 5 commits into from
Nov 12, 2021
Merged

Appium docs prio one #164

merged 5 commits into from
Nov 12, 2021

Conversation

ncalaway
Copy link
Collaborator

Added documentation about Appium scenarios, elements, responses, and assertion contexts. Also added tests for Appium.

@ncalaway
Copy link
Collaborator Author

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

docs/_sidebar.md Show resolved Hide resolved
docs/appiumresponse.md Outdated Show resolved Hide resolved
docs/assertion-context.md Outdated Show resolved Hide resolved
docs/assertion-context.md Show resolved Hide resolved
const response = context.response as AppiumResponse;
const hello = await context.findAll("id/pager_signin_button");
context.assert(hello[0]).exists();
context.assert(hello).exists();
Copy link
Collaborator

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);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Collaborator

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();

Copy link
Collaborator Author

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 Show resolved Hide resolved
flagpole.json Outdated Show resolved Hide resolved
tests/src/appium/smoke.ts Show resolved Hide resolved
tests/src/appium/smoke.ts Show resolved Hide resolved
docs/appiumresponse.md Show resolved Hide resolved
const response = context.response as AppiumResponse;
const hello = await context.findAll("id/pager_signin_button");
context.assert(hello[0]).exists();
context.assert(hello).exists();
Copy link
Collaborator

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();

Copy link
Collaborator

@johnsickels johnsickels left a 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

@ncalaway ncalaway merged commit f4c6fc1 into appium Nov 12, 2021
@ncalaway ncalaway deleted the appiumDocsPrioOne branch November 12, 2021 14:19
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.

2 participants