Files
misskey/packages-private/diagnostics-frontend/src/browser/scenario.ts
T
syuilo b51d5ba0a0 frontend bundle diagnostics と frontend browser diagnostics を統合 (#17757)
* refactor(gh): unify frontend diagnostics

* refactor(gh): unify frontend diagnostics markdown rendering

* docs(gh): restore frontend diagnostics comments

* wip

* fix

* refactor: 呼称をbase/headに統一

* tweak

* Update types.ts

* fix
2026-07-21 11:26:53 +09:00

32 lines
1.2 KiB
TypeScript

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { closeUserSetupDialog, postNote, registerUser, resetState, signupThroughUi, visitHome } from '../../../../packages/frontend/test/e2e/shared';
import { sleep } from './server';
import type { HeadlessChromeController } from './controller';
export const scenarioDescription = 'fresh browser signup, first timeline note, after the note becomes visible';
/**
* 各ラウンドを同じ初期状態から始めるため、DBを消して管理者だけ作り直す。
*/
export async function prepareInstance(baseUrl: string) {
await resetState(baseUrl);
await registerUser(baseUrl, 'admin', 'admin1234', true);
}
export async function runSignupAndPostScenario(chrome: HeadlessChromeController, baseUrl: string) {
const page = chrome.page;
const noteText = `Frontend browser metrics ${Date.now()}`;
await visitHome(page, baseUrl);
await signupThroughUi(page, { username: 'alice', password: 'password' });
await closeUserSetupDialog(page);
await postNote(page, noteText, 10_000);
// 投稿直後の非同期処理が落ち着いてから計測したいので少し待つ
await sleep(1000);
}