Test Name: Testing layer selector renders on the Analyze page
Feature: Testing Layer Selection
Traceability:
@SHIFT-9
Description: Verifies that the testing layer selector is visible to users when they arrive on the Analyze page.
This Test Verifies:
| Verification Step | What It Checks |
| Then the testing layer selector is visible |
The testing layer selector is present and visible on the Analyze page |
Test Name: Selecting a layer shows it in the dropdown summary
Feature: Testing Layer Selection
Traceability:
@SHIFT-9
Description: Verifies that when a user selects a testing layer, the selection is reflected in the dropdown summary display.
This Test Verifies:
| Verification Step | What It Checks |
| When I select testing layer "Unit" |
User can select a predefined testing layer |
| Then the testing layer selector shows "Unit" |
The selected layer name appears in the dropdown summary |
Test Name: Selected testing layers appear in the analysis metadata
Feature: Testing Layer Selection
Traceability:
@SHIFT-9@SHIFT-10
Description: Verifies that a testing layer selected by the user is recorded in the JSON output metadata produced by the analysis.
This Test Verifies:
| Verification Step | What It Checks |
| When I select testing layer "Unit" |
User selects a testing layer before running analysis |
| And the JSON output has no unresolved values |
The downloaded JSON output is complete with no missing or placeholder values |
| And the JSON shiftdoc metadata includes testing layer "unit" |
The selected testing layer is correctly captured in the analysis output metadata |
Test Name: Entering a custom layer via Other shows it in the dropdown summary
Feature: Testing Layer Selection
Traceability:
@SHIFT-9@SHIFT-11
Description: Verifies that a custom testing layer name typed by the user appears in the dropdown summary.
This Test Verifies:
| Verification Step | What It Checks |
| When I enter custom testing layer "smoke-only" |
User can type a custom testing layer name using the Other option |
| Then the testing layer selector shows "smoke-only" |
The custom layer name is displayed in the dropdown summary |
Test Name: Typing more than 50 characters in Other shows an error
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Description: Verifies that the application shows an error when a user types a custom testing layer name exceeding the 50-character limit.
This Test Verifies:
| Verification Step | What It Checks |
| When I type a 51-character string into the Other layer input |
User enters a custom layer name that exceeds the allowed character limit |
| Then the testing layer shows an over-limit error |
An error message is displayed indicating the input is too long |
Test Name: Selecting 4 or more layers falls back silently and analysis still runs
Feature: Testing Layer Selection
Traceability:
@SHIFT-12
Description: Verifies that selecting four or more testing layers does not break the analysis and output is still produced without disrupting the user experience.
This Test Verifies:
| Verification Step | What It Checks |
| When I select testing layers Unit, Integration, API / Contract, and UI / Component |
User selects four or more testing layers simultaneously |
| Then I see documentation in the output panel |
Analysis completes successfully and results are shown despite the high number of layers selected |
Test Name: A custom layer entered via Other appears in the analysis metadata
Feature: Testing Layer Selection
Traceability:
@SHIFT-10@SHIFT-11
Description: Verifies that a custom testing layer name entered by the user is correctly included in the JSON analysis output metadata.
This Test Verifies:
| Verification Step | What It Checks |
| And I enter custom testing layer "smoke-layer" |
User provides a custom testing layer name before running analysis |
| And the JSON output has no unresolved values |
The downloaded JSON output is complete with no missing or placeholder values |
| And the JSON shiftdoc metadata includes testing layer "smoke-layer" |
The custom testing layer name is correctly saved in the analysis output metadata |
Test Name: Error below trigger persists after dropdown is closed with 51+ char Other text
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Description: Verifies that the character-limit error for a custom testing layer remains visible even after the user closes the dropdown.
This Test Verifies:
| Verification Step | What It Checks |
| When I type a 51-character string into the Other layer input |
User enters a custom layer name exceeding the character limit |
| And I close the testing layer dropdown |
User closes the dropdown after triggering the error |
| Then the collapsed layer error is visible below the trigger |
The error message persists and remains visible in the collapsed state |
Test Name: Analyze button is disabled while Other text exceeds 50 characters
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Description: Verifies that users cannot run analysis when a custom testing layer name exceeds the 50-character limit, preventing invalid submissions.
This Test Verifies:
| Verification Step | What It Checks |
| And I type a 51-character string into the Other layer input |
User enters an over-limit custom layer name with a file already uploaded |
| Then the Analyze button is disabled |
The Analyze button is blocked from submission while the input error exists |
Test Name: Analyze button re-enables once the Other text error is fixed
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Description: Verifies that the Analyze button becomes available again once the user corrects a custom testing layer name that was over the character limit.
This Test Verifies:
| Verification Step | What It Checks |
| And I type a 51-character string into the Other layer input |
User enters an over-limit custom layer name, disabling the Analyze button |
| And I delete one character from the Other layer input |
User corrects the input by reducing it to within the allowed limit |
| Then the Analyze button is enabled |
The Analyze button becomes active again once the error is resolved |
Test Name: Testing layer selector renders on the Analyze page
Feature: Testing Layer Selection
Traceability:
@SHIFT-9
Journey: Verify that the testing layer selector component is visible when a user lands on the Analyze page.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Testing layer selector renders on the Analyze page
|
User is on the Analyze page
|
No action — presence check only
|
The testing layer selector is visible
|
Positive
|
Test Name: Selecting a layer shows it in the dropdown summary
Feature: Testing Layer Selection
Traceability:
@SHIFT-9
Journey: Verify that selecting a predefined testing layer updates the dropdown summary label to reflect the chosen layer.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Selecting a layer shows it in the dropdown summary
|
User is on the Analyze page
|
User selects testing layer 'Unit'
|
The testing layer selector displays 'Unit'
|
Positive
|
Test Name: Selected testing layers appear in the analysis metadata
Feature: Testing Layer Selection
Traceability:
@SHIFT-9@SHIFT-10
Journey: Verify that a predefined testing layer selected before running analysis is correctly captured and serialised into the downloaded JSON shiftdoc metadata.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Selected testing layers appear in the analysis metadata
|
User is on the Analyze page with format 'bdd', role 'Product Owner', layer 'Unit', and fixture 'bdd_sample.feature' uploaded
|
User clicks 'Document test cases' and downloads the JSON output
|
JSON output has no unresolved values and shiftdoc metadata includes testing layer 'unit'
|
Positive
|
Test Name: Entering a custom layer via Other shows it in the dropdown summary
Feature: Testing Layer Selection
Traceability:
@SHIFT-9@SHIFT-11
Journey: Verify that typing a custom value into the Other layer input updates the dropdown summary to reflect the custom layer name.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Entering a custom layer via Other shows it in the dropdown summary
|
User is on the Analyze page
|
User enters custom testing layer 'smoke-only'
|
The testing layer selector displays 'smoke-only'
|
Positive
|
Test Name: Typing more than 50 characters in Other shows an error
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Journey: Verify that exceeding the 50-character limit in the Other layer input triggers an inline validation error message.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Typing more than 50 characters in Other shows an error
|
User is on the Analyze page
|
User types a 51-character string into the Other layer input
|
An over-limit error is shown on the testing layer input
|
Boundary
|
Test Name: Selecting 4 or more layers falls back silently and analysis still runs
Feature: Testing Layer Selection
Traceability:
@SHIFT-12
Journey: Verify that selecting four or more testing layers does not block the analysis workflow and documentation output is still produced without a hard error.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Selecting 4 or more layers falls back silently and analysis still runs
|
User is on the Analyze page with format 'bdd', role 'Product Owner', four layers selected, and fixture 'bdd_sample.feature' uploaded
|
User clicks 'Document test cases'
|
Documentation appears in the output panel
|
Edge Case
|
Test Name: A custom layer entered via Other appears in the analysis metadata
Feature: Testing Layer Selection
Traceability:
@SHIFT-10@SHIFT-11
Journey: Verify that a custom layer name entered via the Other input is correctly propagated into the downloaded JSON shiftdoc metadata after analysis.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
A custom layer entered via Other appears in the analysis metadata
|
User is on the Analyze page with format 'bdd', role 'Product Owner', custom layer 'smoke-layer', and fixture 'bdd_sample.feature' uploaded
|
User clicks 'Document test cases' and downloads the JSON output
|
JSON output has no unresolved values and shiftdoc metadata includes testing layer 'smoke-layer'
|
Positive
|
Test Name: Error below trigger persists after dropdown is closed with 51+ char Other text
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Journey: Verify that the over-limit validation error remains visible below the dropdown trigger after the user closes the testing layer dropdown without correcting the input.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Error below trigger persists after dropdown is closed with 51+ char Other text
|
User is on the Analyze page and has typed a 51-character string into the Other layer input
|
User closes the testing layer dropdown
|
The collapsed layer error is visible below the trigger
|
Negative
|
Test Name: Analyze button is disabled while Other text exceeds 50 characters
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Journey: Verify that the Analyze button is disabled and cannot be activated while the Other layer input contains more than 50 characters, preventing invalid submissions.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Analyze button is disabled while Other text exceeds 50 characters
|
User is on the Analyze page with format 'bdd', role 'Product Owner', fixture uploaded, and a 51-character string in the Other layer input
|
User views the Analyze button state
|
The Analyze button is disabled
|
Negative
|
Test Name: Analyze button re-enables once the Other text error is fixed
Feature: Testing Layer Selection
Traceability:
@SHIFT-13
Journey: Verify that deleting a character from an over-limit Other layer input to bring it within the 50-character boundary re-enables the Analyze button.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Analyze button re-enables once the Other text error is fixed
|
User is on the Analyze page with format 'bdd', role 'Product Owner', fixture uploaded, and a 51-character string in the Other layer input
|
User deletes one character from the Other layer input
|
The Analyze button is enabled
|
Boundary
|