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

Improvements to parameter passing #203

Merged
merged 21 commits into from
Sep 27, 2020
Merged

Improvements to parameter passing #203

merged 21 commits into from
Sep 27, 2020

Conversation

egil
Copy link
Member

@egil egil commented Sep 4, 2020

This fixes a bunch of bugs around passing parameters to components in c# based tests, and adds a few extra features.

PR meta checklist

  • Pull request is targeting at DEV branch.
  • Pull request is linked to all related issues, if any.
  • I have read the CONTRIBUTING.md document.

Content checklist

  • My code follows the code style of this project and AspNetCore coding guidelines.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have updated the appropriate sub section in the CHANGELOG.md.
  • I have added, updated or removed tests to according to my changes.
    • All tests passed.

Issues

@codecov
Copy link

codecov bot commented Sep 7, 2020

Codecov Report

Merging #203 into dev will increase coverage by 1.05%.
The diff coverage is 80.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #203      +/-   ##
==========================================
+ Coverage   78.08%   79.13%   +1.05%     
==========================================
  Files         102      102              
  Lines        2961     2929      -32     
  Branches      374      373       -1     
==========================================
+ Hits         2312     2318       +6     
+ Misses        523      486      -37     
+ Partials      126      125       -1     
Impacted Files Coverage Δ
src/bunit.core/Rendering/TestComponentRenderer.cs 83.72% <0.00%> (ø)
src/bunit.core/TestContextBase.cs 100.00% <ø> (ø)
....web/Asserting/ShouldBeAdditionAssertExtensions.cs 0.00% <0.00%> (ø)
...t.web/Asserting/ShouldBeRemovalAssertExtensions.cs 0.00% <0.00%> (ø)
src/bunit.web/RazorTesting/SnapshotTest.cs 73.91% <ø> (ø)
src/bunit.web/TestContext.cs 100.00% <ø> (ø)
src/bunit.xunit/Xunit.Sdk/RazorTestRunner.cs 45.83% <0.00%> (ø)
src/bunit.core/Extensions/BlazorExtensions.cs 66.66% <50.00%> (-33.34%) ⬇️
src/bunit.core/Rendering/TestRenderer.cs 97.65% <60.00%> (ø)
src/bunit.core/ComponentParameter.cs 95.00% <66.66%> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f35197...e5892fc. Read the comment docs.

@egil egil force-pushed the param-builder-fixes branch from 0ef62ae to ee39242 Compare September 22, 2020 12:46
@egil egil added bug Something isn't working enhancement New feature or request labels Sep 27, 2020
@sonarcloud
Copy link

sonarcloud bot commented Sep 27, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@egil egil marked this pull request as ready for review September 27, 2020 07:33
@egil egil merged commit b78098c into dev Sep 27, 2020
@egil egil deleted the param-builder-fixes branch September 27, 2020 07:34
egil added a commit that referenced this pull request Oct 1, 2020
* componentparametercollection

* Support for passing multiple template and render fragments

* Automated dotnet-format update

* cascading values

* Finished component parameter collection, closed #142, updated tests to component parameter factory

* Fixed null warnings

* Automated dotnet-format update

* Fixes for CodeQL warnings

* Added ChildContent and RenderFragment tests

* Added support for passing template fragments

* Removed ComponentParameterBuilder, added support for unmatched and cascading values

* Switched to C# 9 compile

* Automated dotnet-format update

* unnamed cascading value with add

* Removed .net move hack from workflows

* Fix for null errors

* Automated dotnet-format update

* Added extra factory method and moved ComponentParameter out into Bunit namespace

* Updated docs with new parameter passing logic

* Automated dotnet-format update

* Updated changelog

Co-authored-by: Github Actions <[email protected]>
egil added a commit that referenced this pull request Oct 2, 2020
…ith an html5 tag implemented (#220)

* reset changelog with unreleased section

* Cleanup using and resorted them

* Improvements to parameter passing in c# based tests (#203)

* componentparametercollection

* Support for passing multiple template and render fragments

* Automated dotnet-format update

* cascading values

* Finished component parameter collection, closed #142, updated tests to component parameter factory

* Fixed null warnings

* Automated dotnet-format update

* Fixes for CodeQL warnings

* Added ChildContent and RenderFragment tests

* Added support for passing template fragments

* Removed ComponentParameterBuilder, added support for unmatched and cascading values

* Switched to C# 9 compile

* Automated dotnet-format update

* unnamed cascading value with add

* Removed .net move hack from workflows

* Fix for null errors

* Automated dotnet-format update

* Added extra factory method and moved ComponentParameter out into Bunit namespace

* Updated docs with new parameter passing logic

* Automated dotnet-format update

* Updated changelog

Co-authored-by: Github Actions <[email protected]>

* Updated version to beta-11

* Context finder for strings that start with an html5 tag

* Fix for build error

* Added support for HTML, HEAD, and BODY, stopped reusing element contexts

* Cleanup usings

Co-authored-by: Github Actions <[email protected]>
@egil egil mentioned this pull request Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment