Skip to content

Add Dashboard integration tests with Reqnroll, Playwright, and Shouldly#582

Merged
StuartFerguson merged 8 commits intomainfrom
copilot/add-dashboard-integration-tests
Jan 12, 2026
Merged

Add Dashboard integration tests with Reqnroll, Playwright, and Shouldly#582
StuartFerguson merged 8 commits intomainfrom
copilot/add-dashboard-integration-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 12, 2026

Implements BDD integration tests for Dashboard functionality covering role-based access (Administrator, Estate, Viewer) with assertions against hardcoded test data.

New Test Project: EstateManagementUI.IntegrationTests

Feature File (Features/Dashboard.feature)

  • 9 scenarios testing role-based dashboard visibility and data display
  • Administrator: dashboard view only, no KPIs/data
  • Estate/Viewer: full access to KPIs, sales data, comparison selectors

Test Infrastructure

  • Hooks/BrowserHooks.cs: Playwright lifecycle (browser setup, screenshot capture on failure)
  • Steps/DashboardSteps.cs: Gherkin step bindings to page interactions
  • Common/DashboardPageHelper.cs: Page object pattern with Playwright locators and Shouldly assertions

Test Data Assertions

Values from TestMediatorService.cs:

And the Merchants with Sales in Last Hour shows "45"
And the Merchants with No Sales Today shows "12"
And the Merchants with No Sales in Last 7 Days shows "5"
And the Today's Sales card shows "523" transactions
And the Failed Sales card shows "15" transactions

Notes

Application startup logic intentionally excluded per requirements - to be implemented separately. Tests ready to run once app configured for test mode.

Original prompt

This section details on the original issue you should resolve

<issue_title>Dashboard Integration Testing</issue_title>
<issue_description>I want a suite of integration tests built for the Blazor Server Application.

The first set of tests will be for the Dashboard.

Can you build the tests based on the functionality available in terms of user roles (Admin/Estate/Viewer), I want these tests to have assertions based on the hard coded test data that's in the application (this can be swapped out at a later date)

Any assertions will be done with the Shouldly framework.

I must stress that the only code I am expecting from this is:

A reqnroll feature file
A hooks file to allow control of the browser application (based on playwright)
A file with steps to control the browser application
A file that links the feature file to the application steps code

I will deal with how the application actually gets started up for the testing at a later point

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI and others added 2 commits January 12, 2026 10:01
…d Shouldly

Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
…es count: 15)

Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copilot AI changed the title [WIP] Add integration tests for dashboard functionality Add Dashboard integration tests with Reqnroll, Playwright, and Shouldly Jan 12, 2026
Copilot AI requested a review from StuartFerguson January 12, 2026 10:12
@StuartFerguson
Copy link
Copy Markdown
Member

@copilot looks pretty good, one tweak though can u rename the project EstateManagementUI.IntegrationTests

…mentUI.IntegrationTests

Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot looks pretty good, one tweak though can u rename the project EstateManagementUI.IntegrationTests

Done! Project renamed to EstateManagementUI.IntegrationTests including all namespaces and references. Commit: 3af8226

Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
@StuartFerguson StuartFerguson marked this pull request as ready for review January 12, 2026 11:05
@StuartFerguson StuartFerguson merged commit 1ac9cdf into main Jan 12, 2026
10 checks passed
@github-actions github-actions Bot deleted the copilot/add-dashboard-integration-tests branch March 14, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard Integration Testing

2 participants