Add Playwright-based integration tests for Blazor Server UI and Docker build support#457
Conversation
Co-authored-by: StuartFerguson <[email protected]>
Co-authored-by: StuartFerguson <[email protected]>
Co-authored-by: StuartFerguson <[email protected]>
Co-authored-by: StuartFerguson <[email protected]>
Co-authored-by: StuartFerguson <[email protected]>
|
@copilot can you add a docker file to build the blazor app please |
Co-authored-by: StuartFerguson <[email protected]>
Added Dockerfile for the Blazor Server application in commit db02a75. The Dockerfile includes:
Also added:
The image will be built as |
|
@copilot that dockerfile is not recognised in visual studio as a docker file any ideas ? |
…nition Co-authored-by: StuartFerguson <[email protected]>
Fixed in commit e2d762d. Added Docker-related properties to the .csproj file:
Visual Studio uses these properties to recognize the Dockerfile and enable Docker tooling support. The Dockerfile should now appear in the project and be available for right-click context menu operations like "Build Docker Image" and "Run Container". |
|
@copilot still cant right click and build the docker image |
Co-authored-by: StuartFerguson <[email protected]>
Fixed in commit cefec86. Added the missing Also added explicit reference to After reloading the project in Visual Studio, you should now be able to:
If the context menu still doesn't appear, try closing and reopening Visual Studio to ensure the new package is fully loaded. |
|
@copilot get this error on the startup of the UI container fail: Microsoft.Extensions.Hosting.Internal.Host[11] |
Fixed in commit bed3647. Added Login buttons:
Navigation links (NavMenu):
Action buttons (Index pages):
Submit buttons (New/Create pages):
All test selectors like |
…/github.com/TransactionProcessing/EstateManagementUI into copilot/update-integration-tests-playwright
|
@copilot in my old UI i used these 2 config settings for use with integration tests String securityServiceLocalPort = can you factor these into the authentication setup in the Blazor UI |
…or integration testing Co-authored-by: StuartFerguson <[email protected]>
Added in commit e09577f. The Blazor UI now supports Changes made:
"AppSettings": {
"SecurityServiceLocalPort": null,
"SecurityServicePort": null
}
The implementation matches the legacy UI behavior, allowing integration tests to override the security service port dynamically. |
…/github.com/TransactionProcessing/EstateManagementUI into copilot/update-integration-tests-playwright
|
@copilot ok new error AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch, RemoteCertificateChainErrors In my old app tehre was a section to ignore cert errors that was used for CI/CD testing controlled by a config parameter HttpClientIgnoreCertificateErrors, can you look at the old app and migrate this code over to the blazor app as well please |
Co-authored-by: StuartFerguson <[email protected]>
Added in commit ffe8e2d. The Blazor UI now supports Changes made:
"AppSettings": {
"HttpClientIgnoreCertificateErrors": false
}
This resolves the |
…/github.com/TransactionProcessing/EstateManagementUI into copilot/update-integration-tests-playwright
|
@copilot in running the ViewEstateDetails test i get this error Call log:
I dont think the element for the estate name has a id to lookup this mght also be true of the Estate Reference |
…t tests Co-authored-by: StuartFerguson <[email protected]>
... Fixed in commit 31e5c6a. Added
The |
|
@copilot new error Microsoft.Playwright.PlaywrightException : Error: Node is not an , <textarea> or element Call log: waiting for Locator("#Estate_Name") I guess again this will apply to the reference |
…right compatibility Co-authored-by: StuartFerguson <[email protected]>
|
|
Estate Tests now passing |
EstateManagementUI.BlazorIntegrationTeststargeting Blazor UISummary
Successfully created integration tests for Blazor UI using Playwright and added complete Docker build infrastructure. Changed Estate Name and Reference from
<p>paragraph elements to readonly<input>elements to support Playwright'sGetValueById()method which requires form input elements. The readonly inputs maintain the display-only nature while allowing tests to retrieve values usingInputValueAsync().Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.