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 WinUI 2.6 Dependency to UnitTests.UWP App #4156

Merged
4 commits merged into from
Aug 4, 2021

Conversation

michael-hawker
Copy link
Member

Related to #3650

Splitting out the upgrade to WinUI 2.6 in the Unit Tests project to help try and isolate what might be going on.

Noticed some our other NuGet dependencies have updates as well, so if this works as-is, will try and update those as well.

Then we can check this in, and rebase #3650 to try and determine what else might be going on or pull in others to help investigate.

FYI @huynhsontung @azchohfi

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

What is the current behavior?

WinUI 2.6 not included when we run unit tests

What is the new behavior?

WinUI 2.6 is now included when we run unit tests.

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

@ghost
Copy link

ghost commented Aug 3, 2021

Thanks michael-hawker 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 azchohfi and Rosuavio August 3, 2021 04:45
@michael-hawker
Copy link
Member Author

michael-hawker commented Aug 3, 2021

Worked with just having WinUI 2.6 present. Upgrading Unit Test SDKs now.

If this works, I think we merge these updates in and then rebase #3650 and see what happens? @azchohfi thoughts?

@huynhsontung
Copy link
Contributor

@michael-hawker Please verify WinUI is properly imported by adding a WinUI resource lookup in the OnLaunched handler, e.g. DefaultRichEditBoxStyle. I suspect the pipeline may not respect the App.xaml file 🤔

@michael-hawker
Copy link
Member Author

@huynhsontung I've added a check for that before the Window content is set, I've validated that it works fine locally. I'd be surprised if the app was having trouble with App.xaml in the CI as it does have to use that to not optimize the types we use (that was a problem we have had in the past).

We'll see if this new commit succeeds in the pipeline. Otherwise, I'm wondering if it's the DataRow attribute or something else causing problems, as I don't think we have any other examples using the VisualUITestBase class with that yet... 🤷‍♂️

@michael-hawker
Copy link
Member Author

@azchohfi not sure where the Logger outputs too as it's not the CI, maybe have to do the diagnostics file for that, though not sure if we want to do that every build?

Anyway, it passed, so it's definitely finding the required resource for that component @huynhsontung.

Probably not a bad idea to leave the check in the app startup so we know WinUI is initialized properly?? Thoughts?

Think we can merge this PR then, and then rebase #3650 and see what happens?

@michael-hawker michael-hawker marked this pull request as ready for review August 4, 2021 02:02
@michael-hawker michael-hawker changed the title 🚧 Add WinUI 2.6 to UnitTests.UWP Add WinUI 2.6 Dependency to UnitTests.UWP App Aug 4, 2021
@ghost
Copy link

ghost commented Aug 4, 2021

Hello @RosarioPulella!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 794b295 into CommunityToolkit:main Aug 4, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants