Skip to content

User logs in successfully (Playwright)

This is what the reporter writes for this scenario:

### ✅ User logs in successfully
- **Given** the user account exists
- **And** the user is on the login page
- **And** the account is active
- **When** the user submits valid credentials
- **Then** the user should see the dashboard

(First given renders as “Given”; subsequent ones in the same story render as “And”.)

import { test } from '@playwright/test';
import { story } from 'executable-stories-playwright';
test.describe('Login', () => {
test('User logs in successfully', async ({}, testInfo) => {
story.init(testInfo);
story.given('the user account exists');
story.given('the user is on the login page');
story.given('the account is active');
story.when('the user submits valid credentials');
story.then('the user should see the dashboard');
});
});