Test Name: Both inputs required before Check Coverage button is enabled
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-55
Description: The Check Coverage button only becomes active once the user has provided both a user story and test cases, preventing incomplete submissions.
This Test Verifies:
| Verification Step | What It Checks |
| Button disabled with no input |
Check Coverage button is inactive when the page is first opened |
| Button disabled after story only |
Check Coverage button remains inactive after entering only a user story |
| Button enabled after both inputs |
Check Coverage button becomes active once test cases are also entered |
Test Name: Coverage renders results panel
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-56
Description: After submitting both inputs, the user sees a results panel and download options with the coverage analysis.
This Test Verifies:
| Verification Step | What It Checks |
| Results panel is visible |
Coverage results are displayed to the user after a successful analysis |
| Download buttons are shown |
Users can download the coverage results once they are available |
Test Name: Clear button resets all inputs and results
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-56
Description: The Clear button returns the page to its initial state, wiping both input fields and hiding the results panel.
This Test Verifies:
| Verification Step | What It Checks |
| Story input is empty |
User story field is cleared after clicking Clear |
| Test input is empty |
Test cases field is cleared after clicking Clear |
| Results panel is hidden |
Previously displayed coverage results are removed from view after clicking Clear |
Test Name: API error shows error state
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-56
Description: When the coverage service fails, the user sees a meaningful error message instead of a blank or broken page.
This Test Verifies:
| Verification Step | What It Checks |
| Error message is displayed |
User is informed of the failure when the coverage analysis cannot be completed |
Test Name: Format selector is present and forwarded in payload
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-54
Description: The test format selector is visible on the page and the user's chosen format is included when the coverage analysis is requested.
This Test Verifies:
| Verification Step | What It Checks |
| Format selector is visible |
Users can see and interact with the test format selector |
| Compare request includes test_format 'playwright' |
The selected format is correctly sent to the analysis service when coverage is checked |
Test Name: Testing layers selection is forwarded in payload
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-54
Description: The testing layer chosen by the user is included in the coverage analysis request.
This Test Verifies:
| Verification Step | What It Checks |
| Compare request includes the selected testing layer |
The chosen testing layer is correctly passed to the analysis service when coverage is checked |
Test Name: Changing test format clears test case content and filename
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Description: When the user switches the test format, any previously entered test case content and uploaded filename are automatically cleared to avoid mismatched data.
This Test Verifies:
| Verification Step | What It Checks |
| Test case content is cleared |
The test cases field is emptied when the format is changed |
| Test case filename is cleared |
Any uploaded filename is removed when the format is changed |
Test Name: Changing test format does not clear story input
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Description: Switching the test format leaves the user story input untouched so the user does not need to re-enter it.
This Test Verifies:
| Verification Step | What It Checks |
| Story input is unchanged |
The user story field retains its content when the test format is changed |
Test Name: Changing test format clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Description: When the user changes the test format, any existing coverage results are hidden to prevent showing stale analysis.
This Test Verifies:
| Verification Step | What It Checks |
| Results panel is hidden |
Previously displayed coverage results are removed when the test format is changed |
Test Name: Changing testing layers clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Description: When the user changes the testing layer selection, any existing coverage results are hidden to prevent showing stale analysis.
This Test Verifies:
| Verification Step | What It Checks |
| Results panel is hidden |
Previously displayed coverage results are removed when the testing layer is changed |
Test Name: Changing data dictionary clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Description: When the user changes the data dictionary selection, any existing coverage results are hidden to prevent showing stale analysis.
This Test Verifies:
| Verification Step | What It Checks |
| Results panel is hidden |
Previously displayed coverage results are removed when the data dictionary is changed |
Test Name: Editing story input clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Description: When the user edits the user story after a coverage analysis has been run, the results are hidden to reflect that the analysis is no longer current.
This Test Verifies:
| Verification Step | What It Checks |
| Results panel is hidden |
Coverage results are cleared when the user story is modified |
Test Name: Editing test input clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Description: When the user edits the test cases after a coverage analysis has been run, the results are hidden to reflect that the analysis is no longer current.
This Test Verifies:
| Verification Step | What It Checks |
| Results panel is hidden |
Coverage results are cleared when the test cases are modified |
Test Name: Story input persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Description: A user's story input is preserved when they navigate away from the page and return, so they do not lose their work.
This Test Verifies:
| Verification Step | What It Checks |
| Story input still contains my text |
The user story field retains its content after the user leaves and returns to the page |
Test Name: Test input persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Description: A user's test case input is preserved when they navigate away from the page and return, so they do not lose their work.
This Test Verifies:
| Verification Step | What It Checks |
| Test input still contains my text |
The test cases field retains its content after the user leaves and returns to the page |
Test Name: Selector state persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Description: The user's chosen test format and testing layer selections are remembered when they navigate away and return to the page.
This Test Verifies:
| Verification Step | What It Checks |
| Format selection is unchanged |
The test format selector reflects the user's previous choice after returning to the page |
| Testing layer selection is unchanged |
The testing layer selector reflects the user's previous choice after returning to the page |
Test Name: Coverage result persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Description: A completed coverage analysis result remains visible when the user navigates away and returns, so they can review it without re-running the analysis.
This Test Verifies:
| Verification Step | What It Checks |
| Results panel is still visible |
Coverage results are retained and displayed after the user leaves and returns to the page |
Test Name: State resets on logout
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Description: All user inputs are cleared when the user logs out, ensuring no data is left accessible to the next person who logs in.
This Test Verifies:
| Verification Step | What It Checks |
| Story input is empty |
The user story field is blank after logging out and returning to the page |
| Test input is empty |
The test cases field is blank after logging out and returning to the page |
Test Name: Both inputs required before Check Coverage button is enabled
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-55
Journey: Verify that the Check Coverage button remains disabled until both the user story and test case inputs are populated.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Both inputs required before Check Coverage button is enabled
|
Story Coverage page is loaded with no inputs entered
|
User enters a user story only, then also enters test cases
|
Button is disabled with only one input; button becomes enabled when both inputs are filled
|
Boundary
|
Test Name: Coverage renders results panel
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-56
Journey: Verify that submitting valid inputs against a mocked successful API renders the results panel and download buttons.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Coverage renders results panel
|
Coverage API is mocked with a valid result
|
User fills both inputs and clicks Check Coverage
|
Results panel is visible and download buttons are shown
|
Positive
|
Test Name: Clear button resets all inputs and results
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-56
Journey: Verify that clicking the Clear button empties both text inputs and hides the results panel.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Clear button resets all inputs and results
|
A coverage result is already displayed
|
User clicks the Clear button
|
Story input is empty, test input is empty, and results panel is hidden
|
Positive
|
Test Name: API error shows error state
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-56
Journey: Verify that a 500 error response from the coverage API surfaces an error message to the user.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
API error shows error state
|
Coverage API is mocked to return HTTP 500
|
User fills both inputs and clicks Check Coverage
|
An error message is displayed
|
Negative
|
Test Name: Format selector is present and forwarded in payload
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-54
Journey: Verify that the format selector is visible and that the selected format value is included in the API request payload.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Format selector is present and forwarded in payload
|
Coverage API is mocked with a valid result
|
User selects format 'playwright', fills both inputs, and clicks Check Coverage
|
Format selector is visible and the compare request includes test_format 'playwright'
|
Positive
|
Test Name: Testing layers selection is forwarded in payload
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-54
Journey: Verify that the selected testing layer is included in the API request payload when Check Coverage is triggered.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Testing layers selection is forwarded in payload
|
Coverage API is mocked with a valid result
|
User selects a testing layer, fills both inputs, and clicks Check Coverage
|
The compare request includes the selected testing layer
|
Positive
|
Test Name: Changing test format clears test case content and filename
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Journey: Verify that switching the test format clears any previously entered test case content and the associated filename.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing test format clears test case content and filename
|
Test input is populated with content
|
User changes the test format
|
Test case content is cleared and test case filename is cleared
|
Edge Case
|
Test Name: Changing test format does not clear story input
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Journey: Verify that switching the test format leaves the story input field unchanged.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing test format does not clear story input
|
Story input is populated with content
|
User changes the test format
|
Story input remains unchanged
|
Edge Case
|
Test Name: Changing test format clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Journey: Verify that switching the test format hides a previously displayed coverage results panel.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing test format clears coverage result
|
A coverage result is displayed
|
User changes the test format
|
Results panel is hidden
|
Edge Case
|
Test Name: Changing testing layers clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Journey: Verify that changing the testing layer selection hides a previously displayed coverage results panel.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing testing layers clears coverage result
|
A coverage result is displayed
|
User changes the testing layer selection
|
Results panel is hidden
|
Edge Case
|
Test Name: Changing data dictionary clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Journey: Verify that changing the data dictionary selection hides a previously displayed coverage results panel.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing data dictionary clears coverage result
|
A coverage result is displayed
|
User changes the data dictionary selection
|
Results panel is hidden
|
Edge Case
|
Test Name: Editing story input clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Journey: Verify that editing the story input after a coverage result is displayed causes the results panel to be hidden.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Editing story input clears coverage result
|
A coverage result is displayed
|
User edits the story input
|
Results panel is hidden
|
Edge Case
|
Test Name: Editing test input clears coverage result
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-60
Journey: Verify that editing the test input after a coverage result is displayed causes the results panel to be hidden.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Editing test input clears coverage result
|
A coverage result is displayed
|
User edits the test input
|
Results panel is hidden
|
Edge Case
|
Test Name: Story input persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Journey: Verify that the story input text is preserved when a user navigates away from and returns to the Story Coverage page.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Story input persists after navigating away and back
|
User has entered a user story
|
User navigates to another page and returns to Story Coverage
|
Story input still contains the previously entered text
|
Edge Case
|
Test Name: Test input persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Journey: Verify that the test case input text is preserved when a user navigates away from and returns to the Story Coverage page.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Test input persists after navigating away and back
|
User has entered test cases
|
User navigates to another page and returns to Story Coverage
|
Test input still contains the previously entered text
|
Edge Case
|
Test Name: Selector state persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Journey: Verify that the selected test format and testing layer are preserved when a user navigates away from and returns to the Story Coverage page.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Selector state persists after navigating away and back
|
User has selected a test format and a testing layer
|
User navigates to another page and returns to Story Coverage
|
Format selection and testing layer selection are unchanged
|
Edge Case
|
Test Name: Coverage result persists after navigating away and back
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Journey: Verify that a previously generated coverage result remains visible when a user navigates away from and returns to the Story Coverage page.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Coverage result persists after navigating away and back
|
A coverage result is displayed
|
User navigates to another page and returns to Story Coverage
|
Results panel is still visible
|
Edge Case
|
Test Name: State resets on logout
Feature: Story vs. Test Coverage — UI behaviour (mocked API)
Traceability:
@SHIFT-61
Journey: Verify that logging out clears all story and test case input state so that a returning user sees an empty page.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
State resets on logout
|
User is logged in, on the Story Coverage page, with a user story and test cases entered
|
User logs out and returns to the Story Coverage page
|
Story input is empty and test input is empty
|
Edge Case
|