Test Name: Filename reflects role and source file (no add-ons) -- Product Owner, auth.feature, , Documentation, shiftdoc-po-auth.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-5
Description: When a Product Owner uploads a file and runs analysis without any add-ons, the downloaded results file is named using the role abbreviation and source filename.
This Test Verifies:
| Verification Step | What It Checks |
| Role and source reflected in filename |
The downloaded Markdown file is named 'shiftdoc-po-auth.md', correctly encoding the Product Owner role and the uploaded file name |
| Panel heading shown |
The output panel displays the 'Documentation' heading after analysis completes |
Test Name: Filename reflects role and source file (no add-ons) -- QA Manager, auth.feature, , Documentation, shiftdoc-qam-auth.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-5
Description: When a QA Manager uploads a file and runs analysis without any add-ons, the downloaded results file is named using the QA Manager role abbreviation and source filename.
This Test Verifies:
| Verification Step | What It Checks |
| Role and source reflected in filename |
The downloaded Markdown file is named 'shiftdoc-qam-auth.md', correctly encoding the QA Manager role and the uploaded file name |
| Panel heading shown |
The output panel displays the 'Documentation' heading after analysis completes |
Test Name: Filename reflects role and source file (no add-ons) -- Product Owner, checkout_flow.feature, , Documentation, shiftdoc-po-checkout_flow.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-5
Description: When a Product Owner uploads a differently named file and runs analysis without add-ons, the downloaded file name correctly reflects that source filename.
This Test Verifies:
| Verification Step | What It Checks |
| Source filename preserved in download name |
The downloaded Markdown file is named 'shiftdoc-po-checkout_flow.md', confirming the filename segment changes with the uploaded source file |
| Panel heading shown |
The output panel displays the 'Documentation' heading after analysis completes |
Test Name: Filename reflects role and source file (no add-ons) -- Product Owner, login.spec.ts, , Documentation, shiftdoc-po-login.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-5
Description: When a non-.feature file (TypeScript spec) is uploaded, the downloaded results file name uses only the base name without the original extension.
This Test Verifies:
| Verification Step | What It Checks |
| Non-feature file extension stripped from download name |
The downloaded Markdown file is named 'shiftdoc-po-login.md', confirming the .spec.ts extension is dropped and only the base name is used |
| Panel heading shown |
The output panel displays the 'Documentation' heading after analysis completes |
Test Name: Filename appends add-on short codes -- Product Owner, auth.feature, Technical Review, Documentation and Analysis, shiftdoc-po-auth+tr.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-6
Description: When a single add-on is selected alongside the analysis, the downloaded filename includes the add-on's short code appended after the source name.
This Test Verifies:
| Verification Step | What It Checks |
| Single add-on short code appended to filename |
The downloaded file is named 'shiftdoc-po-auth+tr.md', confirming the Technical Review add-on is encoded as '+tr' |
| Panel heading reflects add-ons |
The output panel heading changes to 'Documentation and Analysis' when add-ons are included |
Test Name: Filename appends add-on short codes -- QA Manager, auth.feature, Technical Review, Gap Analysis, Risk Assessment, Documentation and Analysis, shiftdoc-qam-auth+tr+gap+risk.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-6
Description: When three add-ons are selected, the downloaded filename includes all three add-on short codes in order after the source name.
This Test Verifies:
| Verification Step | What It Checks |
| Multiple add-on short codes appended to filename |
The downloaded file is named 'shiftdoc-qam-auth+tr+gap+risk.md', confirming all three add-ons are encoded in sequence |
| Panel heading reflects add-ons |
The output panel heading shows 'Documentation and Analysis' when multiple add-ons are selected |
Test Name: Filename appends add-on short codes -- QA Manager, auth.feature, Technical Review, Gap Analysis, Annotation Summary, Risk Assessment, Recommendations, Documentation and Analysis, shiftdoc-qam-auth+tr+gap+ann+risk+rec.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-6
Description: When the maximum set of five add-ons is selected, all five short codes are appended to the downloaded filename in the correct order.
This Test Verifies:
| Verification Step | What It Checks |
| All five add-on short codes appended to filename |
The downloaded file is named 'shiftdoc-qam-auth+tr+gap+ann+risk+rec.md', confirming all five add-ons are encoded correctly in sequence |
| Panel heading reflects add-ons |
The output panel heading shows 'Documentation and Analysis' with the full add-on set selected |
Test Name: Pasted text with no filename falls back to date-time
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-7
Description: When a user pastes test content directly instead of uploading a file, the downloaded filename uses a date-time stamp in place of a source filename.
This Test Verifies:
| Verification Step | What It Checks |
| Date-time fallback in filename |
The downloaded file name follows the pattern 'shiftdoc-po-YYYYMMDD-HHMMSS.md', confirming a timestamp is used when no source file is available |
| Documentation visible in output panel |
The output panel shows the generated documentation after pasted content is analysed |
Test Name: Pasted text with add-ons falls back to date-time with add-on suffix
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-7
Description: When a user pastes test content and selects add-ons, the downloaded filename combines a date-time stamp with the add-on short codes.
This Test Verifies:
| Verification Step | What It Checks |
| Date-time fallback with add-on short codes in filename |
The downloaded file name follows the pattern 'shiftdoc-po-YYYYMMDD-HHMMSS+tr+gap.md', confirming both the timestamp fallback and add-on encoding work together |
| Documentation and analysis visible in output panel |
The output panel shows documentation and analysis content after pasted content with add-ons is analysed |
Test Name: Download format extension -- Markdown, shiftdoc-po-auth.md
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-8
Description: When the user downloads results as Markdown, the file is saved with a .md extension.
This Test Verifies:
| Verification Step | What It Checks |
| Markdown download extension |
The downloaded file is named 'shiftdoc-po-auth.md', confirming the correct .md extension is applied for Markdown downloads |
Test Name: Download format extension -- HTML, shiftdoc-po-auth.html
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-8
Description: When the user downloads results as HTML, the file is saved with a .html extension.
This Test Verifies:
| Verification Step | What It Checks |
| HTML download extension |
The downloaded file is named 'shiftdoc-po-auth.html', confirming the correct .html extension is applied for HTML downloads |
Test Name: Download format extension -- JSON, shiftdoc-po-auth.json
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-8
Description: When the user downloads results as JSON, the file is saved with a .json extension.
This Test Verifies:
| Verification Step | What It Checks |
| JSON download extension |
The downloaded file is named 'shiftdoc-po-auth.json', confirming the correct .json extension is applied for JSON downloads |
Test Name: Filename reflects role and source file (no add-ons)
Feature: Download Analysis Results - Filename and Format (Mocked)
Type: Scenario Outline
Traceability:
@SHIFT-5
Journey: A user selects a role and uploads a source file with no add-ons, submits analysis, and verifies that the downloaded Markdown filename encodes both role and source filename correctly.
Examples
| Role |
Source |
Add Ons |
Panel Heading |
Expected |
| Product Owner |
auth.feature |
|
Documentation |
shiftdoc-po-auth.md |
| QA Manager |
auth.feature |
|
Documentation |
shiftdoc-qam-auth.md |
| Product Owner |
checkout_flow.feature |
|
Documentation |
shiftdoc-po-checkout_flow.md |
| Product Owner |
login.spec.ts |
|
Documentation |
shiftdoc-po-login.md |
Test Name: Filename appends add-on short codes
Feature: Download Analysis Results - Filename and Format (Mocked)
Type: Scenario Outline
Traceability:
@SHIFT-6
Journey: A user selects a role, uploads a source file, and enables one or more add-ons, then verifies that each selected add-on contributes its short code to the downloaded Markdown filename in the correct order.
Examples
| Role |
Source |
Add Ons |
Panel Heading |
Expected |
| Product Owner |
auth.feature |
Technical Review |
Documentation and Analysis |
shiftdoc-po-auth+tr.md |
| QA Manager |
auth.feature |
Technical Review, Gap Analysis, Risk Assessment |
Documentation and Analysis |
shiftdoc-qam-auth+tr+gap+risk.md |
| QA Manager |
auth.feature |
Technical Review, Gap Analysis, Annotation Summary, Risk Assessment, Recommendations |
Documentation and Analysis |
shiftdoc-qam-auth+tr+gap+ann+risk+rec.md |
Test Name: Pasted text with no filename falls back to date-time
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-7
Journey: A user pastes BDD content directly (providing no source filename) and verifies that the downloaded Markdown filename falls back to a date-time-stamped pattern instead of a source-derived name.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Pasted text with no filename falls back to date-time
|
User is on the Analyze page with API mocked
|
Selects format 'bdd', role 'Product Owner', pastes BDD content, submits analysis, clicks Download Markdown
|
Downloaded filename matches the regex shiftdoc-po-\d{8}-\d{6}\.md
|
Edge Case
|
Test Name: Pasted text with add-ons falls back to date-time with add-on suffix
Feature: Download Analysis Results - Filename and Format (Mocked)
Traceability:
@SHIFT-7
Journey: A user pastes BDD content with add-ons selected and no source file, then verifies that the downloaded filename combines the date-time fallback with the appropriate add-on short codes.
| Scenario |
Given Context |
When Action |
Then Assertion |
Gherkin Type |
|
Pasted text with add-ons falls back to date-time with add-on suffix
|
User is on the Analyze page with API mocked
|
Selects format 'bdd', role 'Product Owner', add-ons 'Technical Review, Gap Analysis', pastes BDD content, submits analysis, clicks Download Markdown
|
Downloaded filename matches the regex shiftdoc-po-\d{8}-\d{6}\+tr\+gap\.md
|
Edge Case
|
Test Name: Download format extension
Feature: Download Analysis Results - Filename and Format (Mocked)
Type: Scenario Outline
Traceability:
@SHIFT-8
Journey: A user downloads analysis results in each supported format and verifies that the file extension in the downloaded filename matches the chosen format.
Examples
| Format |
Expected |
| Markdown |
shiftdoc-po-auth.md |
| HTML |
shiftdoc-po-auth.html |
| JSON |
shiftdoc-po-auth.json |