mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-17 18:25:42 +02:00
[eric] notes: delete the sticky-note feature end to end
This commit is contained in:
@@ -55,18 +55,17 @@ test.describe('combinatorial user flows', () => {
|
||||
await el.click({ timeout: 8_000 });
|
||||
return el;
|
||||
};
|
||||
// The bottom dashboard toolbar (New Agent / Add note / Add App / Browser) only
|
||||
// mounts when a dashboard is active; a clean CI profile has none, so create one
|
||||
// via the sidebar "+". Idempotent: returns early if the toolbar is already up.
|
||||
// The bottom spawn pill only mounts when a dashboard is active; a clean CI profile has none, so create one via the sidebar "+". Idempotent: returns early if the pill is already up.
|
||||
const ensureDashboardActive = async () => {
|
||||
const spawnPill = page.getByText('Ask me anything...', { exact: true });
|
||||
const toggle = page.locator('[data-onboarding="sidebar-toggle"]');
|
||||
if ((await toggle.getAttribute('aria-expanded')) === 'false') await toggle.click({ timeout: 5_000 }).catch(() => {});
|
||||
await clickMust(page.locator('[data-onboarding="sidebar-dashboards"]'), 'sidebar dashboards');
|
||||
if (await page.getByRole('button', { name: 'Add note' }).isVisible().catch(() => false)) return;
|
||||
if (await spawnPill.isVisible().catch(() => false)) return;
|
||||
const createBtn = page.locator('[data-onboarding="sidebar-dashboards"] button').first();
|
||||
if (await createBtn.count()) await createBtn.click({ timeout: 5_000 }).catch(() => {});
|
||||
await expect.poll(() => page.url(), { timeout: 8_000 }).toMatch(/\/dashboard\//);
|
||||
await expect(page.getByRole('button', { name: 'Add note' }), 'dashboard toolbar never mounted').toBeVisible({ timeout: 10_000 });
|
||||
await expect(spawnPill, 'dashboard spawn pill never mounted').toBeVisible({ timeout: 10_000 });
|
||||
};
|
||||
const errorsSince = (mark: number) => errors.slice(mark).filter((e) => !CONSOLE_WHITELIST.some((rx) => rx.test(e.text)));
|
||||
const assertNoNew = (mark: number, label: string) => {
|
||||
@@ -301,12 +300,9 @@ test.describe('combinatorial user flows', () => {
|
||||
assertNoNew(mark, 'Browser card mount (webview)');
|
||||
});
|
||||
|
||||
test('dashboard toolbar: Add note + Add App + History each mount their surfaces', async () => {
|
||||
test('dashboard toolbar: Add App + History each mount their surfaces', async () => {
|
||||
const mark = errors.length;
|
||||
await ensureDashboardActive();
|
||||
await clickMust(page.getByRole('button', { name: 'Add note' }), 'toolbar Add note');
|
||||
assertNoNew(mark, 'Add note mount');
|
||||
|
||||
await clickMust(page.getByRole('button', { name: 'Add App' }), 'toolbar Add App');
|
||||
// Picker is a dialog; closing via Escape is enough.
|
||||
await page.keyboard.press('Escape').catch(() => {});
|
||||
|
||||
@@ -183,13 +183,6 @@ test.describe('deep interactive coverage', () => {
|
||||
await page.waitForTimeout(500);
|
||||
});
|
||||
|
||||
test('Add note mounts (sticky)', async ({}, info) => {
|
||||
await safeClick(page.getByRole('button', { name: 'Add note' }) as any, 'Add note');
|
||||
await page.waitForTimeout(1500);
|
||||
await page.screenshot({ path: info.outputPath('note.png') });
|
||||
noNewCrashes('Add note mount');
|
||||
});
|
||||
|
||||
test('Add App picker opens', async ({}, info) => {
|
||||
await safeClick(page.getByRole('button', { name: 'Add App' }) as any, 'Add App');
|
||||
await page.waitForTimeout(1500);
|
||||
|
||||
Reference in New Issue
Block a user