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 Step
What 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 Step
What 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 Step
What 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 Step
What 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
Test Name:Download format extension matches selected format
Feature:Story Coverage download — filename and format (mocked)
Type:Scenario Outline
Traceability:@SHIFT-56
Journey:A user downloads a coverage result derived from an uploaded story file and verifies the downloaded file carries the correct extension for each supported format.
Examples
Format
Expected
MD
shiftdoc-tca-story_sample.md
HTML
shiftdoc-tca-story_sample.html
JSON
shiftdoc-tca-story_sample.json
Test Name:Download filename falls back to date-time when story is pasted
Feature:Story Coverage download — filename and format (mocked)
Traceability:@SHIFT-56
Journey:A user who pasted story content rather than uploading a file downloads a coverage result and verifies the filename falls back to a date-time-stamped pattern instead of a story-derived name.
Scenario
Given Context
When Action
Then Assertion
Gherkin Type
Download filename falls back to date-time when story is pasted
A coverage result is displayed with no uploaded story file (pasted input)
User clicks the Download MD button
Downloaded filename matches the regex pattern shiftdoc-tca-\d{8}-\d{6}\.md