Search results show highlights
story.and() after a Then, written explicitly rather than left to auto-conversion.
The test
Section titled “The test”import { story } from 'executable-stories-vitest';import { it } from 'vitest';
it("Search results show highlights", ({ task }) => { story.init(task); story.given('the search index contains "hello world"'); story.when('the user searches for "hello"'); story.then('results should include "hello world"'); story.and("the matching text should be highlighted");});import { story } from 'executable-stories-jest';
it("Search results show highlights", () => { story.init(); story.given('the search index contains "hello world"'); story.when('the user searches for "hello"'); story.then('results should include "hello world"'); story.and("the matching text should be highlighted");});import { test } from '@playwright/test';import { story } from 'executable-stories-playwright';
test("Search results show highlights", async ({}, testInfo) => { story.init(testInfo); story.given('the search index contains "hello world"'); story.when('the user searches for "hello"'); story.then('results should include "hello world"'); story.and("the matching text should be highlighted");});import { story } from 'executable-stories-cypress';
it("Search results show highlights", () => { story.init(); story.given('the search index contains "hello world"'); story.when('the user searches for "hello"'); story.then('results should include "hello world"'); story.and("the matching text should be highlighted");});What the report renders
Section titled “What the report renders”### ✅ Search results show highlights
- **Given** the search index contains "hello world"- **When** the user searches for "hello"- **Then** results should include "hello world"- **And** the matching text should be highlighted