Story Coverage Mocked

Framework: BDD Generated: 2026-06-23 Model: claude-sonnet-4-6
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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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 StepWhat 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