Files
twenty/packages/twenty-e2e-testing/lib/utils/enterEditMode.ts
2026-04-16 18:14:14 +02:00

18 lines
624 B
TypeScript

import { type Page } from '@playwright/test';
export const enterEditMode = async (page: Page) => {
// Open command menu with Ctrl+K
await page.getByTestId('page-header-side-panel-button').click();
// Type to search for Edit Layout command
const searchInput = page.getByTestId('side-panel-focus');
await searchInput.fill('Edit Layout');
// Click the Edit Layout command
const editLayoutItem = page.getByText('Edit Layout', { exact: true });
await editLayoutItem.click();
// Wait for the layout customization bar to appear
await page.getByText('Layout customization').waitFor({ state: 'visible' });
};