Demo
GUIDE

Cases 48–58 · Collections, files, and media

3 MIN READ

Case 48 — Find and act on a table row

gherkin
When I find the row whose "Invoice Number" is [$.testdata.invoice.number]
And I click "View" in that row
Then the invoice page should show [$.testdata.invoice.number]

Do not identify a row only by position.

Case 49 — Edit a grid cell

gherkin
When I edit the "Quantity" cell to `3` in the row whose "Product Code" is "CAM-4K"
And I save the grid
Then the row for "CAM-4K" should show Quantity `3`
And the line total should update

Case 50 — Search a virtualized grid

gherkin
When I inspect unprocessed rows in the Accounts grid from top to bottom
And I continue loading rows until Account ID [$.testdata.account.id] is found or no new rows load
Then exactly one row should match that Account ID

The stop rule prevents endless scrolling.

Case 51 — Search paginated results

gherkin
When I search each results page in order for [$.testdata.record.id]
And I continue until the record is found or the last page is reached
Then the record should be present exactly once

Case 52 — Use a tree or tree grid

gherkin
When I expand the "North America" tree node
And I expand the "United States" child node
Then the "California" node should be visible

Case 53 — Act in one of several repeating cards

gherkin
When I click "Edit" in the card titled "Primary Address"
Then the "Edit Primary Address" form should open

Case 54 — Upload a file

gherkin
When I upload [$.testdata.documents.contract] using the "Upload Files" control in the "Files" section
And I click "Done" in the upload dialog
Then the uploaded filename should appear in the "Files" list
And its status should be "Uploaded"

Case 55 — Upload through a drag-and-drop area

gherkin
When I upload [$.testdata.import.csv] using the "Drag and drop files here" upload area
Then the selected filename should appear in the upload area

The file path remains externalised even when the UI describes drag and drop.

Case 56 — Download, inspect, or transfer a file

When filename and content are the testcase assertions:

gherkin
When I click the "Download Report" button
And I save this file as [$.output.report_file]
Then the downloaded filename should end with `.csv`
And the file should contain the columns "Name", "Status", and "Updated"

When the testcase only produces a file for another testcase, do not add a mechanical assertion:

gherkin
When I click the "Download Report" button
And I save this file as [$.output.report_file]

In the later testcase, consume the testsuite-mapped input and assert what that testcase owns:

gherkin
When I read data as CSV from [$.input.report_file]
Then the CSV should contain the columns "Name", "Status", and "Updated"

Case 57 — Set a slider

gherkin
When I set the "Confidence Threshold" slider to `75`
Then the slider should show `75`
And the threshold label should show `75%`

Case 58 — Drag an item between containers

gherkin
When I drag the card "Review Contract" from the "To Do" column to the "In Progress" column
Then the card should appear in "In Progress"
And it should no longer appear in "To Do"