Test Name: Analyze button is disabled when no input is provided
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that users cannot trigger an analysis without first providing any test case content.
This Test Verifies:
| Verification Step | What It Checks |
| Analyze button is disabled |
The Analyze button remains inactive when the input area is empty |
Test Name: Analyze button is enabled when test case content is provided
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that uploading a test case file enables the Analyze button so users can proceed.
This Test Verifies:
| Verification Step | What It Checks |
| Analyze button is enabled after file upload |
The Analyze button becomes active once a test case file has been provided |
Test Name: Analysis renders the output panel
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that submitting an analysis displays generated documentation in the output panel.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel shows documentation after submission |
Analysis results are presented to the user in the output panel following a successful request |
Test Name: Clear button resets input and output
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that clearing the analysis results removes both the output documentation and the test case input, returning the page to a blank state.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared |
Previously generated analysis output is removed from the panel |
| Test case box is empty |
The input area no longer contains the previously uploaded test case content |
Test Name: API error shows an error message
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that when the analysis service fails, users see a meaningful error message instead of a blank or broken result.
This Test Verifies:
| Verification Step | What It Checks |
| Error message is shown on API failure |
A user-facing error message is displayed when the analysis request returns a server error |
Test Name: Format selection is forwarded in the analysis payload
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that the format and role options chosen by the user are correctly included when the analysis request is sent.
This Test Verifies:
| Verification Step | What It Checks |
| Analysis request includes selected format |
The chosen format (e.g. 'playwright') is passed through to the analysis API rather than being ignored |
Test Name: Testing layer selection is forwarded in the analysis payload
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that the testing layer chosen by the user is correctly included when the analysis request is sent.
This Test Verifies:
| Verification Step | What It Checks |
| Analysis request includes selected testing layer |
The chosen testing layer (e.g. 'unit') is passed through to the analysis API rather than being ignored |
Test Name: Output panel clears when new content is pasted
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that pasting new test case content automatically clears any previously generated analysis output, preventing stale results from being displayed.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared after pasting new content |
Existing analysis results are removed when the user pastes new input, ensuring the output matches the current input |
Test Name: Output panel clears when a new test case file is uploaded
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that uploading a new test case file automatically clears any previously generated analysis output, preventing stale results from being displayed.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared after new file upload |
Existing analysis results are removed when the user uploads a different file, ensuring the output matches the current input |
Test Name: Changing format clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that changing the output format option clears any existing analysis results so users are not shown output generated under a different format.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared after format change |
Previously generated results are discarded when the user selects a different format |
Test Name: Changing role clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that changing the role option clears any existing analysis results so users are not shown output generated for a different role.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared after role change |
Previously generated results are discarded when the user selects a different role |
Test Name: Changing add-ons selection clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that enabling or changing an add-on option clears any existing analysis results so the output stays consistent with the current configuration.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared after add-on selection changes |
Previously generated results are discarded when the user selects a different add-on (e.g. 'Technical Review') |
Test Name: Changing data dictionary clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that changing the data dictionary selection clears any existing analysis results so the output stays consistent with the current configuration.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared after dictionary change |
Previously generated results are discarded when the user selects a different data dictionary |
Test Name: Changing testing layers clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that changing the testing layer selection clears any existing analysis results so the output stays consistent with the current configuration.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel is cleared after testing layer change |
Previously generated results are discarded when the user selects a different testing layer |
Test Name: Test case input persists after navigating away and back
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that a user's uploaded test case content is preserved when they leave and return to the Analyze page, so they do not lose their work.
This Test Verifies:
| Verification Step | What It Checks |
| Test case box is still populated after navigation |
The input area retains the previously uploaded file content when the user navigates away and returns |
Test Name: Analysis result persists after navigating away and back
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that previously generated analysis output is still visible when a user leaves and returns to the Analyze page, so they do not lose their results.
This Test Verifies:
| Verification Step | What It Checks |
| Output panel still shows documentation after navigation |
Analysis results are retained in the output panel when the user navigates away and returns |
Test Name: State resets on logout
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Description: Verifies that logging out clears all input and analysis output so that a subsequent user session starts with a clean slate.
This Test Verifies:
| Verification Step | What It Checks |
| Test case box is empty after logout |
The input area contains no content when the user returns to the Analyze page after logging out |
| Output panel is cleared after logout |
Any previously generated analysis results are no longer visible after the user logs out |
Test Name: Analyze button is disabled when no input is provided
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user who has not yet provided any input sees the Analyze button in a disabled state, preventing premature submission.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Analyze button is disabled when no input is provided
|
User is on the Analyze page with no input provided
|
No action taken
|
The Analyze button is disabled
|
Negative
|
Test Name: Analyze button is enabled when test case content is provided
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user uploads a test case fixture file and the Analyze button becomes enabled, signalling readiness to submit.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Analyze button is enabled when test case content is provided
|
User is on the Analyze page
|
User uploads the test case fixture 'bdd_sample.feature'
|
The Analyze button is enabled
|
Positive
|
Test Name: Analysis renders the output panel
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user uploads a fixture, submits the analysis against a mocked API, and sees documentation rendered in the output panel.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Analysis renders the output panel
|
Analyze page is open and the analysis API is mocked
|
User uploads 'bdd_sample.feature' and submits the analysis
|
Documentation is displayed in the output panel
|
Positive
|
Test Name: Clear button resets input and output
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user who has existing output clears the analysis results, leaving both the test case input box and the output panel empty.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Clear button resets input and output
|
API is mocked and existing output is present in the panel
|
User clears the analysis results
|
The output panel is cleared and the test case input box is empty
|
Positive
|
Test Name: API error shows an error message
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user submits an analysis when the API is mocked to return a 500 error and sees an appropriate error message instead of output.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
API error shows an error message
|
Analyze page is open and the analysis API is mocked to return HTTP 500
|
User uploads 'bdd_sample.feature' and submits the analysis
|
An analysis error message is displayed
|
Negative
|
Test Name: Format selection is forwarded in the analysis payload
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user selects a specific format and role, uploads a fixture, and submits; the analysis request payload correctly includes the chosen format.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Format selection is forwarded in the analysis payload
|
API is mocked and the Analyze page is open
|
User selects format 'playwright' and role 'Product Owner', uploads 'bdd_sample.feature', and submits the analysis
|
The analysis request payload includes format 'playwright'
|
Positive
|
Test Name: Testing layer selection is forwarded in the analysis payload
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user selects a testing layer, uploads a fixture, and submits; the analysis request payload correctly includes the chosen testing layer.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Testing layer selection is forwarded in the analysis payload
|
API is mocked and the Analyze page is open
|
User selects testing layer 'unit', uploads 'bdd_sample.feature', and submits the analysis
|
The analysis request payload includes testing layer 'unit'
|
Positive
|
Test Name: Output panel clears when new content is pasted
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing output in the panel pastes new content into the text box, automatically clearing stale results.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Output panel clears when new content is pasted
|
API is mocked and existing output is present in the panel
|
User pastes new content into the text box
|
The output panel is cleared
|
Edge Case
|
Test Name: Output panel clears when a new test case file is uploaded
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing output uploads a new test case file, automatically clearing the stale output panel.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Output panel clears when a new test case file is uploaded
|
API is mocked and existing output is present in the panel
|
User uploads a new test case file
|
The output panel is cleared
|
Edge Case
|
Test Name: Changing format clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing output changes the selected format, automatically clearing the output panel to prevent stale results.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing format clears analysis result
|
API is mocked and existing output is present in the panel
|
User changes the format selection
|
The output panel is cleared
|
Edge Case
|
Test Name: Changing role clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing output changes the selected role, automatically clearing the output panel to prevent stale results.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing role clears analysis result
|
API is mocked and existing output is present in the panel
|
User changes the role selection
|
The output panel is cleared
|
Edge Case
|
Test Name: Changing add-ons selection clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing output selects an add-on ('Technical Review'), automatically clearing the output panel to prevent stale results.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing add-ons selection clears analysis result
|
API is mocked and existing output is present in the panel
|
User selects add-on 'Technical Review'
|
The output panel is cleared
|
Edge Case
|
Test Name: Changing data dictionary clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing output changes the data dictionary selection, automatically clearing the output panel to prevent stale results.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing data dictionary clears analysis result
|
API is mocked and existing output is present in the panel
|
User changes the analysis dictionary selection
|
The output panel is cleared
|
Edge Case
|
Test Name: Changing testing layers clears analysis result
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing output selects a testing layer ('unit'), automatically clearing the output panel to prevent stale results.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Changing testing layers clears analysis result
|
API is mocked and existing output is present in the panel
|
User selects testing layer 'unit'
|
The output panel is cleared
|
Edge Case
|
Test Name: Test case input persists after navigating away and back
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user uploads a test case fixture, navigates away from the Analyze page, and returns to find their input still populated.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Test case input persists after navigating away and back
|
User is on the Analyze page
|
User uploads 'bdd_sample.feature' then navigates away and returns to the Analyze page
|
The test case input box is still populated
|
Edge Case
|
Test Name: Analysis result persists after navigating away and back
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A user with existing analysis output navigates away and returns to the Analyze page, finding their results still visible in the output panel.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Analysis result persists after navigating away and back
|
API is mocked and existing output is present in the panel
|
User navigates away from and then returns to the Analyze page
|
Documentation is still visible in the output panel
|
Edge Case
|
Test Name: State resets on logout
Feature: Analyze page — UI behaviour (mocked API)
Traceability:
@SHIFT-16
Journey: A logged-in user with existing analysis output logs out and returns to the Analyze page, finding both the input box and output panel fully cleared.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
State resets on logout
|
User is logged in, API is mocked, and existing output is present in the panel
|
User logs out and returns to the Analyze page
|
The test case input box is empty and the output panel is cleared
|
Edge Case
|