Implements the Email Attendees feature which allows trainers to: - Email event attendees directly from the Event Summary page - Filter attendees by ticket type - Use a rich text editor to compose messages - Include CC recipients - Send personalized emails to selected attendees Includes unit tests, integration tests, and E2E tests to verify functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
No EOL
1 KiB
TypeScript
34 lines
No EOL
1 KiB
TypeScript
import { Page } from '@playwright/test';
|
|
import { LoginPage } from '../pages/LoginPage';
|
|
|
|
/**
|
|
* Helper function to login as a trainer
|
|
* @param page Playwright Page object
|
|
*/
|
|
export async function loginAsTrainer(page: Page): Promise<void> {
|
|
const loginPage = new LoginPage(page);
|
|
await loginPage.navigate();
|
|
await loginPage.login('trainer');
|
|
}
|
|
|
|
/**
|
|
* Helper function to login as an admin trainer
|
|
* @param page Playwright Page object
|
|
*/
|
|
export async function loginAsAdminTrainer(page: Page): Promise<void> {
|
|
const loginPage = new LoginPage(page);
|
|
await loginPage.navigate();
|
|
await loginPage.login('adminTrainer');
|
|
}
|
|
|
|
/**
|
|
* Helper function to login with custom credentials
|
|
* @param page Playwright Page object
|
|
* @param username Username to login with
|
|
* @param password Password to login with
|
|
*/
|
|
export async function loginWithCredentials(page: Page, username: string, password: string): Promise<void> {
|
|
const loginPage = new LoginPage(page);
|
|
await loginPage.navigate();
|
|
await loginPage.loginWithCredentials(username, password);
|
|
} |