Skip to content

Add Reporting integration tests with Playwright and Reqnroll#592

Merged
StuartFerguson merged 5 commits intomainfrom
copilot/add-integration-tests-reporting
Jan 12, 2026
Merged

Add Reporting integration tests with Playwright and Reqnroll#592
StuartFerguson merged 5 commits intomainfrom
copilot/add-integration-tests-reporting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 12, 2026

Implements comprehensive integration test suite for the Reporting module covering all report types, filtering options, and user roles (Admin/Estate/Viewer).

Implementation

  • Reporting.feature - 47+ BDD scenarios covering:

    • Reporting dashboard access by role
    • Transaction Detail: filtering (date, merchant, operator, product), sorting, pagination
    • Transaction Summary (Merchant/Operator): filtering, drill-down navigation
    • Product Performance: filtering, grid/chart view toggle
    • Settlement Summary/Reconciliation/History: filtering by date, merchant, status
    • Analytical Charts: filtering, chart type selection
  • ReportingPageHelper.cs - Playwright-based page interactions:

    • Navigation methods for all reporting pages
    • Filter interactions (date pickers, dropdowns)
    • Data verification with Shouldly assertions
    • Consolidated canvas wait logic with configurable timeout constant
  • ReportingSteps.cs - Step definitions linking scenarios to page helper

    • Unified authentication step using regex alternation: @"(?:an|a) ""(.*)"" user"
    • Maps all feature steps to helper methods

Design Decisions

  • Uses Playwright's built-in wait mechanisms (WaitForAsync, WaitForLoadStateAsync) instead of fixed delays
  • Extracts chart timeout to constant (DefaultChartWaitTimeoutMs = 5000)
  • Leverages existing BrowserHooks.cs for browser lifecycle
  • Placeholder verification methods note where actual data validation would occur with live test data

Example Usage

Scenario: Estate user can filter Transaction Detail Report by merchant
    Given the user is authenticated as an "Estate" user
    When the user navigates to the Transaction Detail Report
    And the user selects a merchant from the filter dropdown
    And the user clicks Apply Filters
    Then the transaction details grid displays filtered results
    And all displayed transactions match the selected merchant

Application startup and authentication configuration handled separately as noted in requirements.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • f.feedz.io
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.23.8/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp /opt/hostedtoolcache/CodeQL/2.23.8/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

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

This set of tests will be for the Reporting.

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)

In terms of reports can tests be built to cover all the filtering options.

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)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add integration tests for reporting features Add Reporting integration tests with Playwright and Reqnroll Jan 12, 2026
Copilot AI requested a review from StuartFerguson January 12, 2026 14:38
@StuartFerguson StuartFerguson marked this pull request as ready for review January 12, 2026 14:39
@StuartFerguson StuartFerguson merged commit 45dd949 into main Jan 12, 2026
10 checks passed
@github-actions github-actions Bot deleted the copilot/add-integration-tests-reporting 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.

Reporting Integration Tests

2 participants