Files
prowler/ui/tests/profile/profile-page.ts
T
StylusFrost 9d44070486 test(ui): enhance invitations management in E2E tests
- Added support for invitations management in the UI E2E tests, including a new InvitationsPage class for handling invitation-related actions.
- Updated the Playwright configuration to include a new project for invitations tests.
- Created comprehensive end-to-end tests for inviting new users, verifying the sign-up process, and ensuring proper organization association.
- Introduced new environment variable 'E2E_ORGANIZATION_ID' for managing organization-specific tests.
- Documented the new test cases and flow for invitations management in the corresponding markdown files.
2025-10-28 11:49:01 +01:00

33 lines
825 B
TypeScript

import { Page, Locator, expect } from "@playwright/test";
import { BasePage } from "../base-page";
export class UserProfilePage extends BasePage {
// Page heading
readonly pageHeadingUserProfile: Locator;
constructor(page: Page) {
super(page);
// Page heading
this.pageHeadingUserProfile = page.getByRole("heading", { name: "User Profile" });
}
async goto(): Promise<void> {
// Navigate to the user profile page
await super.goto("/profile");
}
async verifyOrganizationId(organizationId: string): Promise<void> {
// Verify the organization ID is visible
await expect(this.page.getByText(organizationId)).toBeVisible();
if (await this.page.getByText(organizationId).count() === 0) {
throw new Error(`Organization ID ${organizationId} not found`);
}
}
}