Logout clears session
Three Then steps in a row. The first renders as Then, the rest as And.
The test
Section titled “The test”import { story } from 'executable-stories-vitest';import { it } from 'vitest';
it("Logout clears session", ({ task }) => { story.init(task); story.given("the user is logged in"); story.when("the user logs out"); story.then("the session cookie should be cleared"); story.then("the auth token should be revoked"); story.then("the user should be redirected to the login page");});import { story } from 'executable-stories-jest';
it("Logout clears session", () => { story.init(); story.given("the user is logged in"); story.when("the user logs out"); story.then("the session cookie should be cleared"); story.then("the auth token should be revoked"); story.then("the user should be redirected to the login page");});import { test } from '@playwright/test';import { story } from 'executable-stories-playwright';
test("Logout clears session", async ({}, testInfo) => { story.init(testInfo); story.given("the user is logged in"); story.when("the user logs out"); story.then("the session cookie should be cleared"); story.then("the auth token should be revoked"); story.then("the user should be redirected to the login page");});import { story } from 'executable-stories-cypress';
it("Logout clears session", () => { story.init(); story.given("the user is logged in"); story.when("the user logs out"); story.then("the session cookie should be cleared"); story.then("the auth token should be revoked"); story.then("the user should be redirected to the login page");});What the report renders
Section titled “What the report renders”### ✅ Logout clears session
- **Given** the user is logged in- **When** the user logs out- **Then** the session cookie should be cleared- **And** the auth token should be revoked- **And** the user should be redirected to the login page