Files
documenso/packages/app-tests/e2e/fixtures/generic.ts
ephraimduncan 138d663c25 chore: merge main, resolve biome formatting conflicts
Merge origin/main into feat/external-2fa-codes. Resolve formatting
conflicts caused by biome rollout; preserve both feature streams:
PR's external 2FA token + signing-session 2FA proof additions plus
main's RateLimit/RecipientExpired/signingReminders/date-auto-insert.

In complete-document-with-token.ts, drop the duplicate early
field-fetching block introduced when main moved that logic later
with date auto-insert support; keep the EXTERNAL_TWO_FACTOR_AUTH
check using derivedRecipientActionAuth.
2026-05-12 11:46:11 +00:00

30 lines
1.0 KiB
TypeScript

import type { Locator } from '@playwright/test';
import { expect, type Page } from '@playwright/test';
export const expectTextToBeVisible = async (page: Page, text: string) => {
await expect(page.getByText(text).first()).toBeVisible();
};
export const expectTextToNotBeVisible = async (page: Page, text: string) => {
await expect(page.getByText(text).first()).not.toBeVisible();
};
export const expectToastTextToBeVisible = async (page: Page, text: string) => {
await expect(page.locator('[role="status"]').getByText(text)).toBeVisible();
};
export const openDropdownMenu = async (page: Page, dropdownButton: Locator) => {
await page.waitForTimeout(500); // Initial timeout incase table remounts which will close the dropdown.
await dropdownButton.focus();
await page.keyboard.press('Enter');
await page.waitForTimeout(500);
await page.keyboard.press('Escape');
await page.waitForTimeout(500);
await dropdownButton.focus();
await page.keyboard.press('Enter');
await expect(page.getByRole('menuitem').first()).toBeVisible();
};