Skip to content

Bulk user creation (Playwright)

### ✅ Bulk user creation
- **Given** the following users exist
**Users**
| email | role | status |
| ----------------- | ----- | ------ |
| [email protected] | admin | active |
| [email protected] | user | active |
| [email protected] | user | locked |
- **When** the admin opens the user list
- **Then** the user list should include
**Expected**
| email | role | status |
| ----------------- | ----- | ------ |
| [email protected] | admin | active |
| [email protected] | user | active |
| [email protected] | user | locked |
import { test } from '@playwright/test';
import { story } from 'executable-stories-playwright';
test.describe('Users', () => {
test('Bulk user creation', async ({}, testInfo) => {
story.init(testInfo);
story.given('the following users exist');
story.table({
label: 'Users',
columns: ['email', 'role', 'status'],
rows: [
['[email protected]', 'admin', 'active'],
['[email protected]', 'user', 'active'],
['[email protected]', 'user', 'locked'],
],
});
story.when('the admin opens the user list');
story.then('the user list should include');
story.table({
label: 'Expected',
columns: ['email', 'role', 'status'],
rows: [
['[email protected]', 'admin', 'active'],
['[email protected]', 'user', 'active'],
['[email protected]', 'user', 'locked'],
],
});
});
});