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

Create a shared project for Unit Tests heads to leverage #126

Merged
merged 7 commits into from
May 24, 2022

Conversation

michael-hawker
Copy link
Member

Initial step for #124 to share App.xaml/App.xaml.cs

This covers the majority of the sub-steps of the 2nd bullet (at least in terms of the all-up solution, need to apply to experiments)

WinUI 3 working in All solution

However UWP is not with this error:

1>  C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(584,5): error MSB3030: Could not copy the file "obj\x64\Debug\H:\code\Labs-UWP\common\CommunityToolkit.Labs.UnitTests.Shared\App.xbf" because it was not found.

It's trying to use the full path as a relative path for some bizarre reason. I've triple-checked that this is the exact same layout/setup we're using for the Sample app heads (which seem to work). So not sure why the XAML Compiler is going wrong here.

Wanted to check if the CI did the same thing.

@michael-hawker
Copy link
Member Author

Talked to @jeromelaban after digging into binlogs, he thinks it may be this issue I'm hitting: unoplatform/uno#5007 (comment)

Going to try the suggested property first, then was going to try and add a dummy page to the shared project, as that's the only other difference I could see in the binlog between the working sample app project and the not working test project.

…p is share App.xaml/App.xaml.cs

WinUI 3 working in All solution, UWP builds but is not connecting?
@michael-hawker michael-hawker force-pushed the llama/unittest-sharedproject branch from 83cd2cf to ff0eccf Compare May 18, 2022 00:25
@michael-hawker
Copy link
Member Author

With the workaround from the Uno issue, the UWP Unit Test app in the all solution is building now. But the test harness in VS seems to be timing out or having issues communicating with it now...? It doesn't seem to want to let me debug the app either, so not sure how to get more info just yet.

…TestBase, add simple automation GridSplitter test
@michael-hawker
Copy link
Member Author

Things coming together and looking good so far in the CI!

image

Might call this good for this PR then for now, and the first half of #124. Don't think we'll need more than this at the moment and the rest can be done via the new shared project?

@michael-hawker michael-hawker changed the title 🚧 Create a shared project for Unit Tests heads to leverage Create a shared project for Unit Tests heads to leverage May 20, 2022
@michael-hawker michael-hawker marked this pull request as ready for review May 20, 2022 03:39
mrlacey added a commit that referenced this pull request May 20, 2022
Copy link
Contributor

@mrlacey mrlacey left a comment

Choose a reason for hiding this comment

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

LGTM

@michael-hawker michael-hawker merged commit bf202eb into main May 24, 2022
@delete-merged-branch delete-merged-branch bot deleted the llama/unittest-sharedproject branch May 24, 2022 16:15
michael-hawker added a commit that referenced this pull request Jun 7, 2022
* Test projects to reference the project with the experiment code

Duplicated change with #126

* Update the displayed template name

* Increase the namespaces referenced in the example test file

This list is based on what's most commonly used in existing toolkit tests.

* Make internal classes visible to all test projects

For #127

* set type to "solution"

as per dotnet/templating#4771

* Add more info about a created solution for a new experiment

For #127

* Don't include the labexp template in VS

it doesn't work there

* Update template/README.md

Co-authored-by: Arlo <arlo.godfrey@outlook.com>

* Update template/README.md

Co-authored-by: Arlo <arlo.godfrey@outlook.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Update template/README.md

Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

* Revert "Test projects to reference the project with the experiment code"

This reverts commit 5dccf8a.

* Update example test

to reference the code being developed
& to use a naming convention better matched to the wider toolkit convention

* increase the number of namespaces included by default in the generated code

This is to reduce the effort required to begin work on an experiment.

* add placeholders and TODO notes for including links to relevant discussion & issue

* update new experiment doc to reflect changes in solution structure

Co-authored-by: Arlo <arlo.godfrey@outlook.com>
Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
Martin1994 pushed a commit to Martin1994/Labs-Windows that referenced this pull request Sep 2, 2023
…olkit#126)

* Create a shared project for Unit Tests heads to leverage, initial step is share App.xaml/App.xaml.cs

WinUI 3 working in All solution, UWP builds but is not connecting?

* Test adding Newtonsoft Reference for UWP Test Fix?

* Move workarounds for UWP Unit Tests to props file vs. csproj

* Test if reshuffle of propsfiles works or not

* Apply shared unit test project to ProjectTemplate

* Apply shared Unit Test project to Experiment Projects

* Add Library Projects to Unit Test Projects, Bring in initial VisualUITestBase, add simple automation GridSplitter test
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