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

add UI test for select tag in webview #179

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

starboi02
Copy link

@starboi02 starboi02 commented Apr 8, 2021

Fixes #209
Added UI test for select tag in webview

@odk-x-bot
Copy link

Can one of the admins verify this patch? Also need an authorization to run tests.

@starboi02
Copy link
Author

@linl33 can you please review this PR

@linl33
Copy link
Member

linl33 commented Apr 9, 2021

runtests

Copy link
Member

@wbrunette wbrunette left a comment

Choose a reason for hiding this comment

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

Please make sure the PR compile against the build variant snapshotUiTestDebug.

int numOfMsToSleep = 0;
for (int i = 0; i < numOfTimesToRun; i++) {
boolean found = false;
Atom<ElementReference> elementFound = findElement(DriverAtoms.findElement(Locator.SELECT, "select"));
Copy link
Member

Choose a reason for hiding this comment

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

The first findElement uses your static import the second one is missing an import statement so it won't compile

Copy link
Member

Choose a reason for hiding this comment

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

Also Locator.SELECT is not resolving

Copy link
Author

Choose a reason for hiding this comment

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

I have resolved the errors and compiled it against build variant snapshotUiTestDebug

@starboi02
Copy link
Author

Please make sure the PR compile against the build variant snapshotUiTestDebug.

@wbrunette can you please guide me on how to do it.

@wbrunette
Copy link
Member

Check out this PR odk-x/docs#77 that is in-progress to improve the instructions on how to change the build variant.

@starboi02
Copy link
Author

@wbrunette thanks, It cleared my doubt.

@starboi02
Copy link
Author

@wbrunette please review it I have made the requested changes

@wbrunette
Copy link
Member

Have you run it to verify you test does what you think it does? To run the UI tests you must have a development version (compiled by you and installed on the device or emulator) of Services and Survey. Then you need to do a "grunt adbpush" of app-designer to setup everything correctly. Also you need OI File manager installed.

@linl33
Copy link
Member

linl33 commented Apr 13, 2021

@starboi02 Your changes should also include an HTML component to test select, or navigate to an existing page that contains select. Please make sure your test crashes Tables when compiled with an androidcommon version prior to odk-x/androidcommon@4016020

@starboi02
Copy link
Author

@starboi02 Your changes should also include an HTML component to test select, or navigate to an existing page that contains select. Please make sure your test crashes Tables when compiled with an androidcommon version prior to odk-x/androidcommon@4016020

Ok @linl33 I will add that and component and recreate the crash with androidcommon version specified by you.

@starboi02
Copy link
Author

Have you run it to verify you test does what you think it does? To run the UI tests you must have a development version (compiled by you and installed on the device or emulator) of Services and Survey. Then you need to do a "grunt adbpush" of app-designer to setup everything correctly. Also you need OI File manager installed.

Ok @wbrunette I will run it with the correct androidcommon version.

@wbrunette
Copy link
Member

@starboi02 any update on this PR?

@starboi02
Copy link
Author

@wbrunette sorry for the delay I got infected with covid-19 so could not contribute for a time period. I will try to complete it in a day or two.

@wbrunette
Copy link
Member

@starboi02 no worries. I am was simply going through all the PRs to make sure that PRs were not waiting on review. Hope you recovery from COVID-19 is going well. No need to rush, you can take your time.

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.

4 participants