Skip to content

[Testing] Feature matrix UITest Cases for WebView Control#30517

Merged
PureWeen merged 4 commits into
inflight/currentfrom
unknown repository
Sep 11, 2025
Merged

[Testing] Feature matrix UITest Cases for WebView Control#30517
PureWeen merged 4 commits into
inflight/currentfrom
unknown repository

Conversation

@NafeelaNazhir

@NafeelaNazhir NafeelaNazhir commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

This PR includes a comprehensive set of UI test cases for the WebView control. The tests validate the WebView control, including properties such as Source, CanGoBack, CanGoForward, events such as Navigating and Navigated Events, methods like GoBack, GoForward, EvaluateJavaScriptAsync and Reload.

WebView Feature Matrix :

  • WebView Control Testing:

    • Added bindings for properties like Source, Cookies, and IsVisible, along with event handlers for Navigating, Navigated, and ProcessTerminated events. [1] [2]
  • Navigation and Content Testing:

    • Implemented buttons and JavaScript to test navigation between pages, dynamic content updates, and JavaScript evaluation.
  • Cookie Management:

    • Added functionality to add and clear cookies to test WebView's cookie handling capabilities.

Issues Identified

Screen.Recording.2025-07-10.at.9.47.32.AM.mov

@dotnet-policy-service dotnet-policy-service Bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Jul 9, 2025
@NafeelaNazhir NafeelaNazhir added area-testing Unit tests, device tests area-controls-webview WebView labels Jul 9, 2025
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@NafeelaNazhir NafeelaNazhir marked this pull request as ready for review July 10, 2025 11:32
Copilot AI review requested due to automatic review settings July 10, 2025 11:32
@NafeelaNazhir NafeelaNazhir requested a review from a team as a code owner July 10, 2025 11:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a comprehensive suite of UI tests and supporting pages for the WebView control’s feature matrix, covering properties, navigation, events, JavaScript evaluation, cookie management, visibility, shadow, and reload functionality.

  • Adds extensive NUnit/Appium tests in WebViewFeatureTests.cs to validate WebView APIs and events.
  • Implements WebViewViewModel, control page, and options page in the HostApp to drive and display WebView scenarios.
  • Registers the new WebView gallery page in the core gallery view.

Reviewed Changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/WebViewFeatureTests.cs New UI tests for WebView properties, navigation, events, JS, cookies, reload, visibility, and shadow.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/WebView/WebViewViewModel.cs ViewModel that manages WebView state, commands, events, and cookie logic for tests.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/WebView/WebViewOptionsPage.xaml(.cs) Options page UX for selecting sources, cookie ops, visibility, and shadow settings.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/WebView/WebViewControlPage.xaml(.cs) Main control page displaying WebView and status labels with data bindings and event hooks.
src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs Added registration of “WebView Feature Matrix” in the gallery.
Comments suppressed due to low confidence (2)

src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/WebViewFeatureTests.cs:14

  • The constant name and AutomationId use "Github"; the correct brand casing is "GitHub" for consistency.
	public const string GithubUrlButton = "GithubUrlButton";

src/Controls/tests/TestCases.HostApp/FeatureMatrix/WebView/WebViewControlPage.xaml:129

  • A UI element is exposed for the ProcessTerminated event, but there’s no corresponding UITest in WebViewFeatureTests.cs to verify process termination behavior.
               AutomationId="ProcessTerminatedStatusLabel"

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/rebase

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current September 11, 2025 15:12
@PureWeen PureWeen merged commit 129f9d0 into dotnet:inflight/current Sep 11, 2025
1 check passed
PureWeen added a commit that referenced this pull request Sep 18, 2025
* Added WebView Feature Tests

* Added base image

* Updated the test case

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
PureWeen added a commit that referenced this pull request Sep 18, 2025
* Added WebView Feature Tests

* Added base image

* Updated the test case

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
github-actions Bot pushed a commit that referenced this pull request Sep 18, 2025
* Added WebView Feature Tests

* Added base image

* Updated the test case

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
github-actions Bot pushed a commit that referenced this pull request Sep 23, 2025
* Added WebView Feature Tests

* Added base image

* Updated the test case

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
github-actions Bot pushed a commit that referenced this pull request Sep 23, 2025
* Added WebView Feature Tests

* Added base image

* Updated the test case

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-webview WebView area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants