Story Coverage Results Download Mocked

Framework: BDD Generated: 2026-06-24 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 file that was uploaded by the user
When I click the Download MD button The user can trigger a download in Markdown format
Then the downloaded file is named "shiftdoc-tca-story_sample.md" The downloaded file is named after the original uploaded story file with a .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 file that was uploaded by the user
When I click the Download HTML button The user can trigger a download in HTML format
Then the downloaded file is named "shiftdoc-tca-story_sample.html" The downloaded file is named after the original uploaded story file with a .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 file that was uploaded by the user
When I click the Download JSON button The user can trigger a download in JSON format
Then the downloaded file is named "shiftdoc-tca-story_sample.json" The downloaded file is named after the original uploaded story file with a .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 a user pastes story content directly instead of uploading a file, the downloaded results file is automatically named using a date-time stamp.
This Test Verifies:
Verification StepWhat It Checks
Given a coverage result is displayed Coverage results are available from pasted story content, with no uploaded filename to reference
When I click the Download MD button The user triggers a download in Markdown format
Then the downloaded file matches "shiftdoc-tca-\d{8}-\d{6}\.md" The downloaded file is automatically assigned a name containing a date and time stamp when no source filename is available