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

UITest : make DPI depdendent test work on different DPIs #4172

Closed
wants to merge 2 commits into from
Closed

UITest : make DPI depdendent test work on different DPIs #4172

wants to merge 2 commits into from

Conversation

Rosuavio
Copy link
Contributor

@Rosuavio Rosuavio commented Aug 10, 2021

Fixes #4143

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

Added communication facilities so that the test harness can request the
dpi from the test host.
@ghost
Copy link

ghost commented Aug 10, 2021

Thanks RosarioPulella for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker and azchohfi August 10, 2021 20:06
@ghost ghost added the bug 🐛 An unexpected issue that highlights incorrect behavior label Aug 10, 2021
@Rosuavio
Copy link
Contributor Author

Rosuavio commented Aug 10, 2021

Trying to figure out the necessary math for making the test work on other DPIs, the communication is working. I think though there might be no need for the test methods to know the DPI for the grid splitter tests. We could move the mouse to a target rather than a certain amount of pixels. I think that would be a cleaner solution and how I am trying to build the RangeSelector tests. @michael-hawker if there is a reason to use DragDistance rather than DragToTarget, let me know as I would much rather use DragToTarget and add a target item to the test env.

@michael-hawker
Copy link
Member

@RosarioPulella the GridSplitter sites between two columns or rows of a Grid so there isn't much else to interact with. We could try and have another element positioned in the Grid, but part of the tests are also trying to drag beyond the confines of the definitions to check bounds.

I'd worry that trying to add another element and dragging towards it (even if for the same behavior) may make it harder to connect what the test is doing with what it's trying to test? Thoughts?

@Rosuavio
Copy link
Contributor Author

You bring up some good points @michael-hawker. While I do think movement targets in the test env for the mouse to move towards could be just as clear as moving a certain distance in a direction, I think that since all the test share the same UI environment, keeping as much that is only relative to one test in that one test method rather then the ui env would let the test scale better.

@Rosuavio Rosuavio closed this Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI Tests only run at 100% DPI
3 participants