-
Notifications
You must be signed in to change notification settings - Fork 735
Fixes #4391. Weird situation where ForceDriver with args doesn't persists on open scenario #4395
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
Merged
+177
−58
Merged
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c8e2d5c
Fixes #4391. Weird situation where ForceDriver with args doesn't pers…
BDisp 1555a5e
Prevents change ForceDriver if app it's already initialized and allow…
BDisp 7cd3cc7
Add dispose into FakeDriverBase and reset ForceDriver
BDisp af7f7ad
Moving test to Application folder
BDisp 047d259
Fix unit test
BDisp 271c454
Remove unnecessary GlobalTestSetup
BDisp 2bd7cd7
Add GC.SuppressFinalize
BDisp 63a04ff
Revert "Add GC.SuppressFinalize"
BDisp 4f3b25f
Reset MouseGrabView
BDisp 71c570b
Avoid CI warnings
BDisp 06b6c20
Add GlobalTestSetup in all test that use Application
BDisp b600cd7
Trying to fix unit test
BDisp efad54d
Reverting scope changes
BDisp 5b143c0
Remove UICatalog testing Run
BDisp 430d419
Force re-run CI test
BDisp 347ca7f
Merge branch 'v2_develop' into v2_4391_forcedriver-fix
tig 4b6a1aa
Fix merge errors
BDisp 6bb7fcf
Fix ansi for the red background color code
BDisp 54f05bd
Fix more ANSI color code unit tests
BDisp 8a1e688
Merge branch 'v2_develop' into v2_4391_forcedriver-fix
tig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Tests/UnitTestsParallelizable/Application/ApplicationForceDriverTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| using UnitTests; | ||
|
|
||
| namespace UnitTests_Parallelizable.ApplicationTests; | ||
|
|
||
| public class ApplicationForceDriverTests : FakeDriverBase | ||
| { | ||
| [Fact] | ||
| public void ForceDriver_Does_Not_Changes_If_It_Has_Valid_Value () | ||
| { | ||
| Assert.False (Application.Initialized); | ||
| Assert.Null (Application.Driver); | ||
| Assert.Equal (string.Empty, Application.ForceDriver); | ||
|
|
||
| Application.ForceDriver = "fake"; | ||
| Assert.Equal ("fake", Application.ForceDriver); | ||
|
|
||
| Application.ForceDriver = "dotnet"; | ||
| Assert.Equal ("fake", Application.ForceDriver); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ForceDriver_Throws_If_Initialized_Changed_To_Another_Value () | ||
| { | ||
| IDriver driver = CreateFakeDriver (); | ||
|
|
||
| Assert.False (Application.Initialized); | ||
| Assert.Null (Application.Driver); | ||
| Assert.Equal (string.Empty, Application.ForceDriver); | ||
|
|
||
| Application.Init (driver); | ||
| Assert.True (Application.Initialized); | ||
| Assert.NotNull (Application.Driver); | ||
| Assert.Equal ("fake", Application.Driver.GetName ()); | ||
| Assert.Equal (string.Empty, Application.ForceDriver); | ||
|
|
||
| Assert.Throws<InvalidOperationException> (() => Application.ForceDriver = "dotnet"); | ||
|
|
||
| Application.ForceDriver = "fake"; | ||
| Assert.Equal ("fake", Application.ForceDriver); | ||
| } | ||
| } |
3 changes: 2 additions & 1 deletion
3
Tests/UnitTestsParallelizable/Application/ApplicationPopoverTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.