Skip to content

add UI test for select tag in webview#179

Open
starboi02 wants to merge 2 commits into
odk-x:developmentfrom
starboi02:add-test
Open

add UI test for select tag in webview#179
starboi02 wants to merge 2 commits into
odk-x:developmentfrom
starboi02:add-test

Conversation

@starboi02

@starboi02 starboi02 commented Apr 8, 2021

Copy link
Copy Markdown

Fixes #209
Added UI test for select tag in webview

@odk-x-bot

Copy link
Copy Markdown

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

@starboi02

Copy link
Copy Markdown
Author

@linl33 can you please review this PR

@linl33

linl33 commented Apr 9, 2021

Copy link
Copy Markdown
Member

runtests

@wbrunette wbrunette requested review from linl33 and wbrunette April 9, 2021 17:34

@wbrunette wbrunette left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Author

@wbrunette thanks, It cleared my doubt.

@starboi02

Copy link
Copy Markdown
Author

@wbrunette please review it I have made the requested changes

@wbrunette

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

linl33 commented Apr 13, 2021

Copy link
Copy Markdown
Member

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

@starboi02 any update on this PR?

@starboi02

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