mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-29 19:08:33 +08:00
26 lines
598 B
TypeScript
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 });
|
|
}
|
|
|
|
|