Skip to content

Add Operator Management integration tests with Reqnroll and Playwright#591

Merged
StuartFerguson merged 5 commits intomainfrom
copilot/add-operator-management-tests
Jan 12, 2026
Merged

Add Operator Management integration tests with Reqnroll and Playwright#591
StuartFerguson merged 5 commits intomainfrom
copilot/add-operator-management-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 12, 2026

Implements comprehensive integration test suite for Operator Management functionality covering role-based access control (Administrator/Estate/Viewer) and CRUD operations using hardcoded test data.

Changes

  • Features/OperatorManagement.feature - 22 Gherkin scenarios testing:

    • Administrator role menu visibility restrictions
    • Estate role full CRUD access (list, view, create, edit)
    • Viewer role read-only access with edit restrictions
    • Form validation and permission-based UI element visibility
    • Assertions against hardcoded operators (Safaricom, Voucher)
  • Common/OperatorManagementPageHelper.cs - Playwright automation layer with:

    • Label-scoped selectors for checkboxes to avoid DOM order fragility
    • Navigation, verification, and interaction methods
    • Shouldly assertions for all validations
  • Steps/OperatorManagementSteps.cs - Step definitions mapping Gherkin to page helper methods

  • README.md - Documentation updates with operator test data and filtering examples

Test Data

// Safaricom: 33333333-3333-3333-3333-333333333333
// RequireCustomMerchantNumber: true, RequireCustomTerminalNumber: false

// Voucher: 33333333-3333-3333-3333-333333333334  
// RequireCustomMerchantNumber: false, RequireCustomTerminalNumber: false

Run with: dotnet test --filter "Category=OperatorManagementTests"

Note: Application startup and authentication configuration handled separately per requirements.

Original prompt

This section details on the original issue you should resolve

<issue_title>Operator Management 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 Operator Management.

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)

I would like tests to cover all the functionality areas including any screens that add/edit/remove.

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 4 commits January 12, 2026 13:55
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copilot AI changed the title [WIP] Add integration tests for operator management Add Operator Management integration tests with Reqnroll and Playwright Jan 12, 2026
Copilot AI requested a review from StuartFerguson January 12, 2026 14:02
@StuartFerguson StuartFerguson marked this pull request as ready for review January 12, 2026 14:10
@StuartFerguson StuartFerguson merged commit 70a5bb1 into main Jan 12, 2026
10 checks passed
@github-actions github-actions Bot deleted the copilot/add-operator-management-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.

Operator Management Integration Tests

2 participants