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

Fix disabled WebView Cookie Tests #24978

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Fix disabled WebView Cookie Tests #24978

merged 4 commits into from
Dec 2, 2024

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Sep 28, 2024

Issues Fixed

Fixes #24913

Screenshot 2024-09-28 at 01 05 47

@kubaflo kubaflo requested a review from a team as a code owner September 28, 2024 00:12
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Sep 28, 2024
Copy link
Contributor

Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jfversluis
Copy link
Member

jfversluis commented Sep 30, 2024

/azp run

This comment was marked as outdated.

Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Looks like there are some related, relevant test failures

@kubaflo
Copy link
Contributor Author

kubaflo commented Sep 30, 2024

@jfversluis can we try again please?

This comment was marked as outdated.

@kubaflo
Copy link
Contributor Author

kubaflo commented Sep 30, 2024

@jfversluis some android tests started to pass, all of them passed on iOS. I have a suspicion that LoadingPageWithoutCookiesSpecifiedDoesntCrash test might be a problem 🤔

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo
Copy link
Contributor Author

kubaflo commented Sep 30, 2024

Screenshot 2024-09-30 at 13 30 43 Screenshot 2024-09-30 at 15 03 27

Some progress. I'm not sure why LoadingPageWithoutCookiesSpecifiedDoesntCrash doesn't work though. And why Windows don't cooperate

@kubaflo
Copy link
Contributor Author

kubaflo commented Oct 1, 2024

Let's try with the /azp again :)

@Redth
Copy link
Member

Redth commented Oct 1, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

@kubaflo Could you rebase and fix the conflicts? Thanks in advance.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -13,19 +13,16 @@ public class Issue3262 : TestContentPage // or TestFlyoutPage, etc ...

protected override void Init()
Copy link
Contributor

Choose a reason for hiding this comment

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

The build is failing:

/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,16): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-maccatalyst]
/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-maccatalyst]
/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,16): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-tizen]
/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-tizen]
/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,16): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-ios]
/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-ios]
/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,16): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-android]
/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Issues/Issue3262.cs(47,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [/Users/builder/azdo/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-android]
    0 Warning(s)
    8 Error(s)

Could you review it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should work now

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Nov 20, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Build error

D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,16): error CS0118: 'Windows' is a namespace but is used like a type [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.19041.0]
D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.19041.0]
D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,16): error CS0118: 'Windows' is a namespace but is used like a type [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.20348.0]
D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.20348.0]

@kubaflo
Copy link
Contributor Author

kubaflo commented Nov 26, 2024

Build error

D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,16): error CS0118: 'Windows' is a namespace but is used like a type [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.19041.0]
D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.19041.0]
D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,16): error CS0118: 'Windows' is a namespace but is used like a type [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.20348.0]
D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue3262.cs(48,5): error CS1929: 'IPlatformElementConfiguration<Windows, WebView>' does not contain a definition for 'SetIsJavaScriptAlertEnabled' and the best extension method overload 'WebView.SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows, WebView>, bool)' requires a receiver of type 'Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>' [D:\a_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.20348.0]

Hmm not sure what the problem is. I added a commit that may fix it

@@ -1,7 +1,5 @@
using System.Net;
using System.Text.RegularExpressions;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
Copy link
Contributor

@MartyIX MartyIX Nov 26, 2024

Choose a reason for hiding this comment

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

Regarding #24978 (comment), if I return back this line, I can compile on Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks

@MartyIX
Copy link
Contributor

MartyIX commented Nov 26, 2024

Perhaps it's better to rebase this PR because #24846 was merged today. Just to be on the safe side.

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis merged commit 0d2c8f3 into dotnet:main Dec 2, 2024
104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix disabled WebView Cookie Tests
6 participants