Skip to content

Many login attempts (Playwright)

Example: Many login attempts: [email protected] -> success

### ✅ Many login attempts: [email protected] -> success
- **Given** the user is on the login page
- **When** the user logs in with "[email protected]" and "secret"
- **Then** the login result should be "success"
import { test } from '@playwright/test';
import { story } from 'executable-stories-playwright';
const manyLoginExamples = [
{ email: "[email protected]", password: "secret", result: "success" },
{ email: "[email protected]", password: "wrong", result: "fail" },
// ...
];
for (const row of manyLoginExamples) {
test(`Many login attempts: ${row.email} -> ${row.result}`, async ({}, testInfo) => {
story.init(testInfo);
story.given("the user is on the login page");
story.when(`the user logs in with "${row.email}" and "${row.password}"`);
story.then(`the login result should be "${row.result}"`);
});
}