mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-09 04:38:49 +00:00
- 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.
33 lines
825 B
TypeScript
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`);
|
|
}
|
|
}
|
|
}
|