diff --git a/src/components/settings/DataSection.jsx b/src/components/settings/DataSection.jsx
index b1ea71b..f23386d 100644
--- a/src/components/settings/DataSection.jsx
+++ b/src/components/settings/DataSection.jsx
@@ -81,7 +81,7 @@ export default function DataSection() {
{authUser && (
-
Download from my account
+
markBackedUp()} className={`${btn} inline-block`} title="Everything saved to your account on the server, including studies from other devices">Download from my account
)}
diff --git a/src/components/settings/DataSection.test.jsx b/src/components/settings/DataSection.test.jsx
new file mode 100644
index 0000000..11c8d5c
--- /dev/null
+++ b/src/components/settings/DataSection.test.jsx
@@ -0,0 +1,37 @@
+import { render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import { vi, test, expect, beforeEach } from 'vitest';
+import { AppContext } from '../../context/AppContext.js';
+import { ToastProvider } from '../Toasts.jsx';
+import { lastBackupAt } from '../../utils/backup.js';
+import DataSection from './DataSection.jsx';
+
+const value = {
+ authUser: { email: 'a@b.test' }, readerBookmarks: {}, readerBookmarkNotes: {}, readerTextHighlights: [], readerColorLabels: {}, readerInkByPage: {},
+ readingPlansState: { progress: [], customPlans: [], activity: [] }, importReaderMarks: vi.fn(), importReadingPlans: vi.fn(), refreshProjectIndex: vi.fn(), prayers: [], importPrayers: vi.fn(),
+};
+const setup = () => {
+ render(
);
+ return userEvent.setup();
+};
+
+beforeEach(() => {
+ localStorage.clear();
+ URL.createObjectURL = vi.fn(() => 'blob:x');
+ URL.revokeObjectURL = vi.fn();
+ document.addEventListener('click', (e) => { if (e.target.closest?.('a[download]')) e.preventDefault(); }); // no real navigation in the test
+});
+
+test('downloading the backup file is remembered, so Home stops asking', async () => {
+ const user = setup();
+ expect(lastBackupAt()).toBeNull();
+ await user.click(screen.getByRole('button', { name: 'Download backup' }));
+ expect(lastBackupAt()).toBeGreaterThan(Date.now() - 5000);
+});
+
+test('downloading from the account is remembered too', async () => {
+ const user = setup();
+ expect(lastBackupAt()).toBeNull();
+ await user.click(screen.getByRole('link', { name: 'Download from my account' }));
+ expect(lastBackupAt()).toBeGreaterThan(Date.now() - 5000);
+});