summaryrefslogtreecommitdiff
path: root/frontend/src/lib/projectDataTabRecreated.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/lib/projectDataTabRecreated.test.ts')
-rw-r--r--frontend/src/lib/projectDataTabRecreated.test.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/frontend/src/lib/projectDataTabRecreated.test.ts b/frontend/src/lib/projectDataTabRecreated.test.ts
new file mode 100644
index 0000000..1a922c2
--- /dev/null
+++ b/frontend/src/lib/projectDataTabRecreated.test.ts
@@ -0,0 +1,19 @@
+import { describe, expect, it } from 'vitest';
+// leader review regression (2026-09-17): the recreated dataset previously
+// stayed invisible — the parent (ProjectDataTab) never reloaded, the user
+// remained on the failed card. The wiring must exist AND the callback must be
+// the parent's own load (so pending→ready/failed tracking resumes).
+import dataTabSource from '../pages/ProjectDataTab.svelte?raw';
+import wizardSource from '../components/DatasetWizard.svelte?raw';
+
+describe('ProjectDataTab reloads when a failed dataset is re-requested', () => {
+ it('DatasetCard receives onRecreated bound to the parent reload', () => {
+ const src: string = dataTabSource as unknown as string;
+ expect(src).toMatch(/onRecreated=\{\(\) => void load\(\)\}/);
+ });
+
+ it('dataset card posts the create through the same client API the wizard uses', () => {
+ const src: string = wizardSource as unknown as string;
+ expect(src).toMatch(/createDataset/);
+ });
+});