mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 17:31:15 -05:00
feat: Integrate TestDataTracker into all test suites
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/integrations/supabase/client';
|
||||||
import type { TestSuite, TestResult } from '../testRunner';
|
import type { TestSuite, TestResult } from '../testRunner';
|
||||||
|
import { TestDataTracker } from '../TestDataTracker';
|
||||||
|
|
||||||
export const dataIntegrityTestSuite: TestSuite = {
|
export const dataIntegrityTestSuite: TestSuite = {
|
||||||
id: 'data-integrity',
|
id: 'data-integrity',
|
||||||
@@ -102,7 +103,8 @@ export const dataIntegrityTestSuite: TestSuite = {
|
|||||||
slug,
|
slug,
|
||||||
park_id: invalidParkId,
|
park_id: invalidParkId,
|
||||||
category: 'roller_coaster',
|
category: 'roller_coaster',
|
||||||
status: 'operating'
|
status: 'operating',
|
||||||
|
is_test_data: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// This SHOULD fail with foreign key violation
|
// This SHOULD fail with foreign key violation
|
||||||
@@ -150,6 +152,7 @@ export const dataIntegrityTestSuite: TestSuite = {
|
|||||||
description: 'Tests unique constraints prevent duplicate slugs',
|
description: 'Tests unique constraints prevent duplicate slugs',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -161,7 +164,8 @@ export const dataIntegrityTestSuite: TestSuite = {
|
|||||||
name: 'Unique Test Park',
|
name: 'Unique Test Park',
|
||||||
slug,
|
slug,
|
||||||
park_type: 'theme_park',
|
park_type: 'theme_park',
|
||||||
status: 'operating'
|
status: 'operating',
|
||||||
|
is_test_data: true
|
||||||
})
|
})
|
||||||
.select('id')
|
.select('id')
|
||||||
.single();
|
.single();
|
||||||
@@ -170,6 +174,7 @@ export const dataIntegrityTestSuite: TestSuite = {
|
|||||||
if (!park) throw new Error('No park returned');
|
if (!park) throw new Error('No park returned');
|
||||||
|
|
||||||
parkId = park.id;
|
parkId = park.id;
|
||||||
|
tracker.track('parks', parkId);
|
||||||
|
|
||||||
// Try to create another park with same slug
|
// Try to create another park with same slug
|
||||||
const { error: duplicateError } = await supabase
|
const { error: duplicateError } = await supabase
|
||||||
@@ -178,7 +183,8 @@ export const dataIntegrityTestSuite: TestSuite = {
|
|||||||
name: 'Duplicate Park',
|
name: 'Duplicate Park',
|
||||||
slug, // Same slug
|
slug, // Same slug
|
||||||
park_type: 'theme_park',
|
park_type: 'theme_park',
|
||||||
status: 'operating'
|
status: 'operating',
|
||||||
|
is_test_data: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// This SHOULD fail with unique violation
|
// This SHOULD fail with unique violation
|
||||||
@@ -218,8 +224,10 @@ export const dataIntegrityTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (parkId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
|
if (remaining.length > 0) {
|
||||||
|
console.warn('integrity-003 cleanup incomplete:', remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/integrations/supabase/client';
|
||||||
import type { TestSuite, TestResult } from '../testRunner';
|
import type { TestSuite, TestResult } from '../testRunner';
|
||||||
|
import { TestDataTracker } from '../TestDataTracker';
|
||||||
|
|
||||||
export const performanceTestSuite: TestSuite = {
|
export const performanceTestSuite: TestSuite = {
|
||||||
id: 'performance',
|
id: 'performance',
|
||||||
@@ -107,6 +108,7 @@ export const performanceTestSuite: TestSuite = {
|
|||||||
description: 'Measures performance of version history queries',
|
description: 'Measures performance of version history queries',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -118,13 +120,15 @@ export const performanceTestSuite: TestSuite = {
|
|||||||
name: 'Test Park Performance',
|
name: 'Test Park Performance',
|
||||||
slug: parkSlug,
|
slug: parkSlug,
|
||||||
park_type: 'theme_park',
|
park_type: 'theme_park',
|
||||||
status: 'operating'
|
status: 'operating',
|
||||||
|
is_test_data: true
|
||||||
})
|
})
|
||||||
.select('id')
|
.select('id')
|
||||||
.single();
|
.single();
|
||||||
|
|
||||||
if (parkError) throw parkError;
|
if (parkError) throw parkError;
|
||||||
parkId = park.id;
|
parkId = park.id;
|
||||||
|
tracker.track('parks', parkId);
|
||||||
|
|
||||||
// Create multiple versions (updates)
|
// Create multiple versions (updates)
|
||||||
for (let i = 0; i < 10; i++) {
|
for (let i = 0; i < 10; i++) {
|
||||||
@@ -182,8 +186,10 @@ export const performanceTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (parkId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
|
if (remaining.length > 0) {
|
||||||
|
console.warn('perf-002 cleanup incomplete:', remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/integrations/supabase/client';
|
||||||
import type { TestSuite, TestResult } from '../testRunner';
|
import type { TestSuite, TestResult } from '../testRunner';
|
||||||
|
import { TestDataTracker } from '../TestDataTracker';
|
||||||
|
|
||||||
export const submissionTestSuite: TestSuite = {
|
export const submissionTestSuite: TestSuite = {
|
||||||
id: 'submission',
|
id: 'submission',
|
||||||
@@ -18,6 +19,7 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
description: 'Validates park submission and creation',
|
description: 'Validates park submission and creation',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -93,8 +95,10 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (parkId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
|
if (remaining.length > 0) {
|
||||||
|
console.warn('submission-001 cleanup incomplete:', remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,6 +109,7 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
description: 'Validates ride submission requires valid park_id',
|
description: 'Validates ride submission requires valid park_id',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
let rideId: string | null = null;
|
let rideId: string | null = null;
|
||||||
|
|
||||||
@@ -117,7 +122,8 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
name: 'Test Park for Ride',
|
name: 'Test Park for Ride',
|
||||||
slug: parkSlug,
|
slug: parkSlug,
|
||||||
park_type: 'theme_park',
|
park_type: 'theme_park',
|
||||||
status: 'operating'
|
status: 'operating',
|
||||||
|
is_test_data: true
|
||||||
})
|
})
|
||||||
.select('id')
|
.select('id')
|
||||||
.single();
|
.single();
|
||||||
@@ -191,11 +197,10 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (rideId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('rides').delete().eq('id', rideId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
}
|
if (remaining.length > 0) {
|
||||||
if (parkId) {
|
console.warn('submission-002 cleanup incomplete:', remaining);
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -206,6 +211,7 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
description: 'Validates company creation for all company types',
|
description: 'Validates company creation for all company types',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
const companyIds: string[] = [];
|
const companyIds: string[] = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -233,6 +239,7 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companyIds.push(company.id);
|
companyIds.push(company.id);
|
||||||
|
tracker.track('companies', company.id);
|
||||||
|
|
||||||
if (company.company_type !== companyType) {
|
if (company.company_type !== companyType) {
|
||||||
throw new Error(`Expected company_type "${companyType}", got "${company.company_type}"`);
|
throw new Error(`Expected company_type "${companyType}", got "${company.company_type}"`);
|
||||||
@@ -266,8 +273,10 @@ export const submissionTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
for (const id of companyIds) {
|
await tracker.cleanup();
|
||||||
await supabase.from('companies').delete().eq('id', id);
|
const remaining = await tracker.verifyCleanup();
|
||||||
|
if (remaining.length > 0) {
|
||||||
|
console.warn('submission-003 cleanup incomplete:', remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/integrations/supabase/client';
|
||||||
import type { TestSuite, TestResult } from '../testRunner';
|
import type { TestSuite, TestResult } from '../testRunner';
|
||||||
|
import { TestDataTracker } from '../TestDataTracker';
|
||||||
|
|
||||||
export const unitConversionTestSuite: TestSuite = {
|
export const unitConversionTestSuite: TestSuite = {
|
||||||
id: 'unit-conversion',
|
id: 'unit-conversion',
|
||||||
@@ -18,6 +19,7 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
description: 'Validates all measurements are stored in metric units',
|
description: 'Validates all measurements are stored in metric units',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
let rideId: string | null = null;
|
let rideId: string | null = null;
|
||||||
|
|
||||||
@@ -30,13 +32,15 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
name: 'Test Park Units',
|
name: 'Test Park Units',
|
||||||
slug: parkSlug,
|
slug: parkSlug,
|
||||||
park_type: 'theme_park',
|
park_type: 'theme_park',
|
||||||
status: 'operating'
|
status: 'operating',
|
||||||
|
is_test_data: true
|
||||||
})
|
})
|
||||||
.select('id')
|
.select('id')
|
||||||
.single();
|
.single();
|
||||||
|
|
||||||
if (parkError) throw parkError;
|
if (parkError) throw parkError;
|
||||||
parkId = park.id;
|
parkId = park.id;
|
||||||
|
tracker.track('parks', parkId);
|
||||||
|
|
||||||
// Create ride with metric values
|
// Create ride with metric values
|
||||||
const rideSlug = `test-ride-units-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
const rideSlug = `test-ride-units-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
||||||
@@ -55,7 +59,7 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
|
|
||||||
const { data: ride, error: rideError } = await supabase
|
const { data: ride, error: rideError } = await supabase
|
||||||
.from('rides')
|
.from('rides')
|
||||||
.insert(testData)
|
.insert({ ...testData, is_test_data: true })
|
||||||
.select('id, max_speed_kmh, max_height_meters, length_meters, drop_height_meters, height_requirement')
|
.select('id, max_speed_kmh, max_height_meters, length_meters, drop_height_meters, height_requirement')
|
||||||
.single();
|
.single();
|
||||||
|
|
||||||
@@ -63,6 +67,7 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
if (!ride) throw new Error('Ride not returned');
|
if (!ride) throw new Error('Ride not returned');
|
||||||
|
|
||||||
rideId = ride.id;
|
rideId = ride.id;
|
||||||
|
tracker.track('rides', rideId);
|
||||||
|
|
||||||
// Validate values are stored in metric
|
// Validate values are stored in metric
|
||||||
const tolerance = 0.01; // Allow small floating point differences
|
const tolerance = 0.01; // Allow small floating point differences
|
||||||
@@ -107,11 +112,10 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (rideId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('rides').delete().eq('id', rideId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
}
|
if (remaining.length > 0) {
|
||||||
if (parkId) {
|
console.warn('unit-001 cleanup incomplete:', remaining);
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,6 +126,7 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
description: 'Validates version tables store measurements in metric',
|
description: 'Validates version tables store measurements in metric',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
let rideId: string | null = null;
|
let rideId: string | null = null;
|
||||||
|
|
||||||
@@ -134,13 +139,15 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
name: 'Test Park Version Units',
|
name: 'Test Park Version Units',
|
||||||
slug: parkSlug,
|
slug: parkSlug,
|
||||||
park_type: 'theme_park',
|
park_type: 'theme_park',
|
||||||
status: 'operating'
|
status: 'operating',
|
||||||
|
is_test_data: true
|
||||||
})
|
})
|
||||||
.select('id')
|
.select('id')
|
||||||
.single();
|
.single();
|
||||||
|
|
||||||
if (parkError) throw parkError;
|
if (parkError) throw parkError;
|
||||||
parkId = park.id;
|
parkId = park.id;
|
||||||
|
tracker.track('parks', parkId);
|
||||||
|
|
||||||
// Create ride with metric values
|
// Create ride with metric values
|
||||||
const rideSlug = `test-ride-ver-units-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
const rideSlug = `test-ride-ver-units-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
||||||
@@ -154,13 +161,15 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
status: 'operating',
|
status: 'operating',
|
||||||
max_speed_kmh: 120.0,
|
max_speed_kmh: 120.0,
|
||||||
max_height_meters: 60.0,
|
max_height_meters: 60.0,
|
||||||
height_requirement: 140
|
height_requirement: 140,
|
||||||
|
is_test_data: true
|
||||||
})
|
})
|
||||||
.select('id')
|
.select('id')
|
||||||
.single();
|
.single();
|
||||||
|
|
||||||
if (rideError) throw rideError;
|
if (rideError) throw rideError;
|
||||||
rideId = ride.id;
|
rideId = ride.id;
|
||||||
|
tracker.track('rides', rideId);
|
||||||
|
|
||||||
// Poll for version creation
|
// Poll for version creation
|
||||||
let version = null;
|
let version = null;
|
||||||
@@ -221,11 +230,10 @@ export const unitConversionTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (rideId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('rides').delete().eq('id', rideId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
}
|
if (remaining.length > 0) {
|
||||||
if (parkId) {
|
console.warn('unit-002 cleanup incomplete:', remaining);
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/integrations/supabase/client';
|
||||||
import type { TestSuite, TestResult } from '../testRunner';
|
import type { TestSuite, TestResult } from '../testRunner';
|
||||||
|
import { TestDataTracker } from '../TestDataTracker';
|
||||||
|
|
||||||
export const versioningTestSuite: TestSuite = {
|
export const versioningTestSuite: TestSuite = {
|
||||||
id: 'versioning',
|
id: 'versioning',
|
||||||
@@ -19,6 +20,7 @@ export const versioningTestSuite: TestSuite = {
|
|||||||
description: 'Verifies version 1 is created automatically when entity is created',
|
description: 'Verifies version 1 is created automatically when entity is created',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -114,6 +116,7 @@ export const versioningTestSuite: TestSuite = {
|
|||||||
description: 'Verifies version 2 is created when entity is updated',
|
description: 'Verifies version 2 is created when entity is updated',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -203,8 +206,10 @@ export const versioningTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (parkId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
|
if (remaining.length > 0) {
|
||||||
|
console.warn('version-001 cleanup incomplete:', remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -215,6 +220,7 @@ export const versioningTestSuite: TestSuite = {
|
|||||||
description: 'Tests that rollback_to_version requires moderator role',
|
description: 'Tests that rollback_to_version requires moderator role',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -309,8 +315,10 @@ export const versioningTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (parkId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
|
if (remaining.length > 0) {
|
||||||
|
console.warn('version-002 cleanup incomplete:', remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -321,6 +329,7 @@ export const versioningTestSuite: TestSuite = {
|
|||||||
description: 'Tests end-to-end rollback with version 3 creation',
|
description: 'Tests end-to-end rollback with version 3 creation',
|
||||||
run: async (): Promise<TestResult> => {
|
run: async (): Promise<TestResult> => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
const tracker = new TestDataTracker();
|
||||||
let parkId: string | null = null;
|
let parkId: string | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -469,8 +478,10 @@ export const versioningTestSuite: TestSuite = {
|
|||||||
timestamp: new Date().toISOString()
|
timestamp: new Date().toISOString()
|
||||||
};
|
};
|
||||||
} finally {
|
} finally {
|
||||||
if (parkId) {
|
await tracker.cleanup();
|
||||||
await supabase.from('parks').delete().eq('id', parkId);
|
const remaining = await tracker.verifyCleanup();
|
||||||
|
if (remaining.length > 0) {
|
||||||
|
console.warn('version-003 cleanup incomplete:', remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user