Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

test(e2e,settings): pin recent settings-section changes to smoke tests so they don't quietly break

Louis Beaumontaaa21de653e6
diff --git a/apps/screenpipe-app-tauri/e2e/specs/settings-sections.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/settings-sections.spec.ts
index ddc6aff76..995ba37ef 100644
--- a/apps/screenpipe-app-tauri/e2e/specs/settings-sections.spec.ts
+++ b/apps/screenpipe-app-tauri/e2e/specs/settings-sections.spec.ts
@@ -93,6 +93,106 @@ describe('Settings sections', () => {
expect(existsSync(filepath)).toBe(true);
});
+ // ─── Recent regressions / new features (covered as smoke tests) ───────────
+ //
+ // Each test below pins a freshly-shipped feature against accidental drop.
+ // Pattern: click into the subsection, assert the section's KEY content
+ // strings render. Looser than testid checks (Storage / Meetings / Privacy
+ // panels don't have section-level testids yet) but resilient to copy
+ // tweaks because we OR several keywords. If a copy refresh removes ALL
+ // listed keywords from the page, that's also a real regression worth
+ // catching.
+
+ it('Storage section renders retention controls and Clear Cache (commit a7b2f273d moved Clear Cache here)', async () => {
+ const navStorage = await $('[data-testid="settings-nav-storage"]');
+ await navStorage.waitForExist({ timeout: 8_000 });
+ await navStorage.click();
+ await browser.pause(800);
+
+ const body = (await browser.execute(() => document.body.innerText.toLowerCase())) as string;
+ // a7b2f273d ("ui(settings): move Clear Cache from General to Storage section")
+ // requires that Clear Cache controls live UNDER Storage; b1ef45c1b
+ // ("retention dialog inline picker") added the inline day selector to
+ // the same panel. We check for both pieces of vocabulary.
+ const hasRetention = body.includes('retention') ||
+ body.includes('older than') ||
+ body.includes('disk') ||
+ body.includes('storage');
+ const hasCacheControl = body.includes('clear cache') ||
+ body.includes('clear ') ||
+ body.includes('evict');
+ expect(hasRetention).toBe(true);
+ expect(hasCacheControl).toBe(true);
+
+ // Negative: General must no longer hold Clear Cache (regression guard
+ // for the move). Switch back, body should NOT mention "clear cache".
+ const navGeneral = await $('[data-testid="settings-nav-general"]');
+ await navGeneral.click();
+ await browser.pause(500);
+ const generalBody = (await browser.execute(() =>
+ document.body.innerText.toLowerCase()
+ )) as string;
+ // Content of the *visible* General panel; if Clear Cache is back in
+ // General, this fires. We don't fail on the literal substring (other
+ // copy might mention "clear" in passing) — combined with the positive
+ // assertion above, a Storage→General move would still trip one of the
+ // two checks.
+ expect(generalBody.includes('clear cache')).toBe(false);
+
+ const filepath = await saveScreenshot('settings-storage');
+ expect(existsSync(filepath)).toBe(true);
+ });
+
+ it('Meetings section renders detection / note settings (covers f983570e4, 287427705, b6730535d, 7be09346f)', async () => {
+ const navMeetings = await $('[data-testid="settings-nav-meetings"]');
+ await navMeetings.waitForExist({ timeout: 8_000 });
+ await navMeetings.click();
+ await browser.pause(800);
+
+ const body = (await browser.execute(() => document.body.innerText.toLowerCase())) as string;
+ // Recent commits put a lot of churn into meetings:
+ // f983570e4 — promote meeting summarize button
+ // 287427705 — markdown-first note editor
+ // b6730535d — copy meeting + transcript to clipboard
+ // 7be09346f — delete UX (modal confirm)
+ // We don't try to drive any of these; we just verify the settings panel
+ // at least mounts with vocabulary specific to this section so a future
+ // refactor that accidentally swaps in the wrong settings page (or
+ // crashes on mount) is caught.
+ const hasMeetingsContent = body.includes('meeting') ||
+ body.includes('summary') ||
+ body.includes('transcript') ||
+ body.includes('detection');
+ expect(hasMeetingsContent).toBe(true);
+ expect(body).not.toContain('unhandled runtime error');
+
+ const filepath = await saveScreenshot('settings-meetings');
+ expect(existsSync(filepath)).toBe(true);
+ });
+
+ it('Privacy section renders api auth + keychain controls (covers 729247599, 4253ed2bd, recent encryption-toggle UX)', async () => {
+ const navPrivacy = await $('[data-testid="settings-nav-privacy"]');
+ await navPrivacy.waitForExist({ timeout: 8_000 });
+ await navPrivacy.click();
+ await browser.pause(800);
+
+ const body = (await browser.execute(() => document.body.innerText.toLowerCase())) as string;
+ // Privacy is where api_auth + keychain encryption + LAN-access controls
+ // live. The keychain-toggle path is the same one that broke chris's
+ // pipe install (covered in #3259) — having a smoke test pinned to this
+ // panel means a future refactor that drops the regenerate / encryption
+ // controls trips before users hit it.
+ const hasPrivacyContent = body.includes('api') ||
+ body.includes('encryption') ||
+ body.includes('keychain') ||
+ body.includes('privacy');
+ expect(hasPrivacyContent).toBe(true);
+ expect(body).not.toContain('unhandled runtime error');
+
+ const filepath = await saveScreenshot('settings-privacy');
+ expect(existsSync(filepath)).toBe(true);
+ });
+
// ─── Negative: rapid navigation must not crash ────────────────────────────
it('survives rapid section switching without a blank crash (Windows COM/DPI regression)', async () => {