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 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 Step
What 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 Step
What 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 Step
What 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
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 in each supported format and verifies the downloaded file carries the correct extension matching the selected 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 named file downloads the coverage result and verifies the filename falls back to a date-time stamp 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 file name available
User clicks the Download MD button
Downloaded filename matches the pattern shiftdoc-tca-\d{8}-\d{6}\.md