Files
AppFlowy-Web/cypress/support/page/pages.ts
2025-08-18 14:40:08 +08:00

26 lines
598 B
TypeScript

/// <reference types="cypress" />
// ========== Page Management ==========
export function getPageNames() {
return cy.get('[data-testid="page-name"]');
}
export function getPageByName(name: string) {
return cy.get('[data-testid="page-name"]').contains(name);
}
export function clickPageByName(name: string) {
return getPageByName(name).click({ force: true });
}
export function getPageById(viewId: string) {
return cy.get(`[data-testid="page-${viewId}"]`);
}
export function getPageTitleInput() {
return cy.get('[data-testid="page-title-input"]', { timeout: 30000 });
}