Skip to content

Login blocked for suspended user

story.but() never auto-converts to And, so the contrast stays visible in the report.

import { story } from 'executable-stories-vitest';
import { describe, it } from 'vitest';
describe('Login', () => {
it('Login blocked for suspended user', ({ task }) => {
story.init(task);
story.given('the user account exists');
story.given('the account is suspended');
story.when('the user submits valid credentials');
story.then('the user should see an error message');
story.but('the user should not be logged in');
});
});
### ✅ Login blocked for suspended user
- **Given** the user account exists
- **And** the account is suspended
- **When** the user submits valid credentials
- **Then** the user should see an error message
- **But** the user should not be logged in