-
Notifications
You must be signed in to change notification settings - Fork 998
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
Fix issue #9807 Review AFTER PR ##11655 #9867
Conversation
...tem.Windows.Forms/tests/IntegrationTests/ScratchProjectVB/My Project/Application.Designer.vb
Show resolved
Hide resolved
@elachlan I have removed the Scratch Project and move all the tests into a new Network tests file to unit/Microsoft.VisualBasic.Forms.Tests/VisualBasic.Tests. under Forms it turns out there were no tests for upload or download just a comment. I commented out all the test code because Test Projects don't have access to My.Computer.Network. All the tests would pass except for the one using the UI and the errors returned are the same as the current functions. The UI tests fail in a real VB project. I also made DownloadFileAsync Private, so this adds no new API services. There is nothing else I can do without help at this time. To make DownloadFileAsync Public the ProgressBar would need to be addressed. |
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/Forms/NetworkTexts.vb
Outdated
Show resolved
Hide resolved
Why is that? |
@KlausLoeffelmann Sorry that is not enough information for me to know how to fix this issue. |
That sounds to me that the tests don't reflect the settings for the Application Framework enabled.
Have you guys read this (especially the paragraphed I tagged:)? It's quite probable that it'll help in the context. |
@KlausLoeffelmann Figured something out, adding the 3 lines below make the tests compile.
All Tests pass in local computer and all pass on CI with 1 skipped. |
Nice! It'll take a bit, until I am able to dig deeper into it, but I have it on my radar. And since we're introducing async versions, we need a list of the new APIs and a rationale. The rationale needs to point out, that the primary motivation is not to introduce async overloads, but replacing an obsolete usage of an internal API - because this needs to go through the API Review Board. And please don't rush it, it's taking some time to get this in, anyway! |
@KlausLoeffelmann The Async Overloads are private. I added no new public functions (there is 1 new SR message because I didn't know how to access the existing one). Making them public would require more work as ProgressDialog is also not Public. The implementation of the existing API's is Async they call the private DownloadFileAsync functions, there is just an Await at the end. I also don't see a way to sign the license. |
Paul, The license thing is a CI bug I think. |
Some tests are failing. Very close though. |
@elachlan It seems to be failing on .Net 9 which I don't have. This really should wait until VB-Code-Cleanup PR to avoid duplicate work. |
@elachlan I have changed nothing except merging with main and now the tests passed. |
Probably a transient test issue. It happens. |
Assert.Throws() Failure: No exception was thrown\r\nExpected: typeof(System.Net.WebException) Stack trace |
.editorconfig
Outdated
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion | ||
dotnet_style_coalesce_expression = false:suggestion | ||
dotnet_style_prefer_conditional_expression_over_assignment = false:silent | ||
dotnet_style_prefer_conditional_expression_over_return = false:silent |
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.
Why did you repeat 4 rules that are already listed under C#+VB section?
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.
Because C# and VB need different options, so I deleted them from common section and preserved C# values and changed VB values. To do this you need to duplicate the sections under C# and #VB so these 4 times appear twice with different options. Lines 204-207 are the VB Versions
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.
Out of interest more than anything else (since I am pretty sure you know what you're doing here! 😸):
What exact effects do these changes have? I remember you talked about auto-adding empty lines on save/through the pretty lister at one point, if I remember correctly?
src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/Forms/NetworkTexts.vb
Outdated
Show resolved
Hide resolved
Ping, is there an ETA when someone might review this? |
No, not immediately. I just finalized a big VB change for CodeGen in the Designer, so VB won't get another higher prio tasks this or next week. @paul1956: What exactly do you mean by this? |
@KlausLoeffelmann old comment. I wrote tests for all the non interactive code, there are no tests specific to the interactive code though I have tested the interactive code, in a separate project on my machine. To test the interactive code inside this solution I would need a VB scratch project like exists for the C# code and creating one is not obvious. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/10.0 #9867 +/- ##
======================================================
+ Coverage 74.29395% 75.07239% +0.77844%
======================================================
Files 3026 3067 +41
Lines 627152 633021 +5869
Branches 46758 46853 +95
======================================================
+ Hits 465936 475224 +9288
+ Misses 157863 154437 -3426
- Partials 3353 3360 +7
Flags with carried forward coverage won't be shown. Click here to find out more. |
@KlausLoeffelmann an update on testing, functions that require passwords were not tested by me or any of the tests I added. I would need a server that supports username and password that I could download the test files from and a way to do it without exposing the server to attack. Also, interactive functions were tested using separate project. I don't know how to write interactive tests. None of this if different than what was here before the file Network Tests is new. I have not exposed any new API's, DownloadFileAsync is private and could be made public but that requires API review and exposing ProgressDialog and a decision on how many of the options to make public. |
@Olina-Zhang and team might be able to help test those. I'd say we should land it as private and do an API Review afterwards to move it to public. |
Cleanup CliboardProxyTests
[main] Update dependencies from dotnet/arcade
[main] Update dependencies from dotnet/runtime
Re-add condition to check drag image
[main] Update dependencies from dotnet/runtime
Correct logic in DriveProxyTest and FileNormalizePathTest_Success
[main] Update dependencies from dotnet/runtime
* Implement Control.Async. * Introduce Form.ShowAsync. * Introduce Form.ShowDialogAsync. * Introduce TaskDialog.ShowDialogAsync. * Fix setting correct TaskCompletionSource on Closing/Disposing. * Address review feedback.
Pulled from https://github.com/dotnet/winforms/pull/10985/files. Styling features and non-critical changes were stripped out to make this the smallest change possible.
- Move Experimental URL to DiagnosticIds - Move special dark mode logic from CreateBrushScope to GetSysColorBrush - Remove unnecessary logic in FindNearestColor - Update brushes and pens by poking SystemEvents static directly
Dark mode experimental feature
…dotnet#11785) * Add a manual test case for clones ListViewItem to WinformsControlsApp * Settle comments --------- Co-authored-by: Simon Zhao (BEYONDSOFT CONSULTING INC) <[email protected]>
Replaces #11867, all PR Feedback is addressed and now targets feature/10.0 |
Fixes #9807
Proposed changes
Customer Impact
Regression?
Risk
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow