Create users from table input (Cypress)
Generated output
Section titled “Generated output”Example: Create users from table input: [email protected]
### ✅ Create users from table input: [email protected]
- **Given** the admin is on the create user page- **When** the admin submits the following user details **Details** | email | role | | --- | --- | | [email protected] | user |Cypress code
Section titled “Cypress code”import { story } from 'executable-stories-cypress';
const createUserExamples = [];for (const row of createUserExamples) { it(`Create users from table input: ${row.email}`, () => { story.init(); story.given("the admin is on the create user page"); story.when("the admin submits the following user details"); story.table({ label: "Details", columns: ["email", "role"], rows: [[row.email, row.role]], }); story.then(`the user "${row.email}" should exist with role "${row.role}"`); });}