-
-
Notifications
You must be signed in to change notification settings - Fork 999
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
test(module: drawer): Test, refactor and document Drawer #2833
test(module: drawer): Test, refactor and document Drawer #2833
Conversation
… be null or empty the drawer closes with or without this code in place.
|
||
base.OnInitialized(); | ||
} | ||
|
||
protected override void OnParametersSet() | ||
{ | ||
this.SetClass(); | ||
if (string.IsNullOrEmpty(Placement) && Placement != _originalPlacement) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block and line 448 block that was removed didn't do anything when Placement was null or empty string. I tested with a without it and it behaved the same both ways.
I checked when it was added to the repo and it was from the start and also moved in a refactor to fix a bug. I double checked that bug and it is still fixed with this removed. It was related to multiple drawers open.
@@ -502,37 +482,16 @@ private async Task HandleClose(bool isChangeByParamater = false) | |||
} | |||
} | |||
|
|||
private void CalcAnimation() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this to be inline with where it was called to make it obvious only the width or height transition could exist at once due to it being dependent on Placement's value. It is moved to line 490 below
@@ -22,6 +22,7 @@ public AntDesignTestBase(bool useMoq = false) | |||
//Needed for Tests using Overlay | |||
Services.AddScoped<AntDesign.JsInterop.DomEventService>(sp => new TestDomEventService(Context.JSInterop.JSRuntime, MockedDomEventListener)); | |||
JSInterop.SetupVoid(JSInteropConstants.OverlayComponentHelper.DeleteOverlayFromContainer, _ => true); | |||
JSInterop.Mode = JSRuntimeMode.Strict; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this so even if a test changes it, all other tests still have it set to the default Strict. Not 100% sure the lifetime of this service but figured it was a good precaution.
Codecov ReportBase: 43.08% // Head: 43.76% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2833 +/- ##
==========================================
+ Coverage 43.08% 43.76% +0.67%
==========================================
Files 544 544
Lines 25768 25743 -25
Branches 260 260
==========================================
+ Hits 11103 11267 +164
+ Misses 14625 14436 -189
Partials 40 40
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
How did coverage go down? 😢 |
Yes, that's a weird statistic. It feels different than the statistics of the master branch |
private string _zIndexStyle = ""; | ||
|
||
private void TriggerPlacementChangeCycleOnce() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zxyao145 Please check if this method is useless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this method will only be triggered when the Placement changes (line 394).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zxyao145 , please help to confirm whether there is any problem after deletion.
Bug fix:
Refactors:
this.
Documentation site update to match available parameters
🤔 This is a ...
🔗 Related issue link
#2644
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge