Story Coverage Results Download Mocked

Framework: BDD Generated: 2026-06-23 Model: claude-sonnet-4-6
Test Name: Download format extension matches selected format -- MD, shiftdoc-tca-story_sample.md
Feature: Story Coverage download — filename and format (mocked)
Traceability: @SHIFT-56
Description: Verifies that downloading coverage results in MD format produces a file with the correct name and extension based on the uploaded story file.
This Test Verifies:
Verification StepWhat It Checks
Given a coverage result is displayed from an uploaded story file Coverage results are available from a named uploaded story file
When I click the Download MD button User can trigger a download in Markdown format
Then the downloaded file is named "shiftdoc-tca-story_sample.md" Downloaded file name reflects the original story filename and uses the .md extension
Test Name: Download format extension matches selected format -- HTML, shiftdoc-tca-story_sample.html
Feature: Story Coverage download — filename and format (mocked)
Traceability: @SHIFT-56
Description: Verifies that downloading coverage results in HTML format produces a file with the correct name and extension based on the uploaded story file.
This Test Verifies:
Verification StepWhat It Checks
Given a coverage result is displayed from an uploaded story file Coverage results are available from a named uploaded story file
When I click the Download HTML button User can trigger a download in HTML format
Then the downloaded file is named "shiftdoc-tca-story_sample.html" Downloaded file name reflects the original story filename and uses the .html extension
Test Name: Download format extension matches selected format -- JSON, shiftdoc-tca-story_sample.json
Feature: Story Coverage download — filename and format (mocked)
Traceability: @SHIFT-56
Description: Verifies that downloading coverage results in JSON format produces a file with the correct name and extension based on the uploaded story file.
This Test Verifies:
Verification StepWhat It Checks
Given a coverage result is displayed from an uploaded story file Coverage results are available from a named uploaded story file
When I click the Download JSON button User can trigger a download in JSON format
Then the downloaded file is named "shiftdoc-tca-story_sample.json" Downloaded file name reflects the original story filename and uses the .json extension
Test Name: Download filename falls back to date-time when story is pasted
Feature: Story Coverage download — filename and format (mocked)
Traceability: @SHIFT-56
Description: Verifies that when coverage results come from pasted story text (no file name available), the downloaded file is automatically named using a date-time timestamp instead.
This Test Verifies:
Verification StepWhat It Checks
Given a coverage result is displayed Coverage results are available from pasted story text with no associated filename
When I click the Download MD button User triggers a download in Markdown format
Then the downloaded file matches "shiftdoc-tca-\d{8}-\d{6}\.md" Downloaded file is automatically named with a date-time stamp when no story filename exists