mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-04 19:11:57 +08:00
refactor: remove unused code (#2484)
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
import type { Page } from '@playwright/test';
|
||||
|
||||
import { getMetas } from './utils';
|
||||
|
||||
export const webUrl = 'http://localhost:8080';
|
||||
|
||||
export async function openHomePage(page: Page) {
|
||||
await page.goto(webUrl);
|
||||
}
|
||||
|
||||
export async function initHomePageWithPinboard(page: Page) {
|
||||
await openHomePage(page);
|
||||
await page.waitForSelector('[data-testid="sidebar-pinboard-container"]');
|
||||
return (await getMetas(page)).find(m => m.isRootPinboard);
|
||||
}
|
||||
|
||||
@@ -47,24 +47,3 @@ export async function clickPageMoreActions(page: Page) {
|
||||
.getByTestId('editor-option-menu')
|
||||
.click();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export async function createPinboardPage(
|
||||
page: Page,
|
||||
parentId: string,
|
||||
title: string
|
||||
) {
|
||||
await newPage(page);
|
||||
await page.focus('.affine-default-page-block-title');
|
||||
await page.type('.affine-default-page-block-title', title, {
|
||||
delay: 100,
|
||||
});
|
||||
await clickPageMoreActions(page);
|
||||
await page.getByTestId('move-to-menu-item').click();
|
||||
await page
|
||||
.getByTestId('pinboard-menu')
|
||||
.getByTestId(`pinboard-${parentId}`)
|
||||
.click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user