Skip to content

Commit 9baee71

Browse files
committed
Increase test timeouts for integration tests
Set the timeout to 30000ms for all relevant integration tests in complete-session-creation, import-export-workflow, and sample-metadata-modification test suites to prevent flakiness and accommodate longer-running operations.
1 parent b98a8fc commit 9baee71

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

src/__tests__/integration/complete-session-creation.test.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ describe('End-to-End Session Creation Workflow', () => {
264264
* - Form validates with complete data
265265
* - Exported YAML includes all fields
266266
*/
267-
it('creates complete session with all optional fields', async () => {
267+
it('creates complete session with all optional fields', { timeout: 30000 }, async () => {
268268
// ARRANGE
269269
const user = userEvent.setup();
270270
render(<App />);
@@ -783,7 +783,7 @@ describe('End-to-End Session Creation Workflow', () => {
783783
* - Ntrode structure is correct
784784
* - Ntrode IDs are assigned properly
785785
*/
786-
it('triggers ntrode generation when device type selected', async () => {
786+
it('triggers ntrode generation when device type selected', { timeout: 30000 }, async () => {
787787
// ARRANGE
788788
const user = userEvent.setup();
789789
render(<App />);
@@ -845,7 +845,7 @@ describe('End-to-End Session Creation Workflow', () => {
845845
* - Exported YAML is well-formed
846846
* - All sections are present in export
847847
*/
848-
it('validates and exports complete session as valid YAML', async () => {
848+
it('validates and exports complete session as valid YAML', { timeout: 30000 }, async () => {
849849
// ARRANGE
850850
const user = userEvent.setup();
851851
render(<App />);

src/__tests__/integration/import-export-workflow.test.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('Import/Export Workflow Integration', () => {
5656
/**
5757
* Test 1: Import minimal valid YAML and verify form population
5858
*/
59-
it('imports minimal valid YAML and populates form fields', async () => {
59+
it('imports minimal valid YAML and populates form fields', { timeout: 30000 }, async () => {
6060
// ARRANGE
6161
const user = userEvent.setup();
6262
const { container } = render(<App />);
@@ -101,7 +101,7 @@ describe('Import/Export Workflow Integration', () => {
101101
/**
102102
* Test 2: Import YAML with arrays and verify array population
103103
*/
104-
it('imports YAML with arrays (cameras, tasks) and populates correctly', async () => {
104+
it('imports YAML with arrays (cameras, tasks) and populates correctly', { timeout: 30000 }, async () => {
105105
// ARRANGE
106106
const user = userEvent.setup();
107107
const { container } = render(<App />);
@@ -148,7 +148,7 @@ describe('Import/Export Workflow Integration', () => {
148148
/**
149149
* Test 3: Import YAML and verify nested object structure (subject)
150150
*/
151-
it('imports YAML with nested objects and preserves structure', async () => {
151+
it('imports YAML with nested objects and preserves structure', { timeout: 30000 }, async () => {
152152
// ARRANGE
153153
const user = userEvent.setup();
154154
const { container } = render(<App />);
@@ -191,7 +191,7 @@ describe('Import/Export Workflow Integration', () => {
191191
* without running into the field selector issues from Task 1.5.2.
192192
* We'll use import → export instead for comprehensive testing.
193193
*/
194-
it('exports form data as valid YAML with correct structure', async () => {
194+
it('exports form data as valid YAML with correct structure', { timeout: 30000 }, async () => {
195195
// ARRANGE
196196
const user = userEvent.setup();
197197
const { container } = render(<App />);
@@ -238,7 +238,7 @@ describe('Import/Export Workflow Integration', () => {
238238
/**
239239
* Test 5: Verify export Blob properties
240240
*/
241-
it('creates Blob with correct MIME type and content', async () => {
241+
it('creates Blob with correct MIME type and content', { timeout: 30000 }, async () => {
242242
// ARRANGE
243243
const user = userEvent.setup();
244244
const { container } = render(<App />);
@@ -275,7 +275,7 @@ describe('Import/Export Workflow Integration', () => {
275275
/**
276276
* Test 6: Import → Export → verify data preservation
277277
*/
278-
it('preserves all data through import → export cycle', async () => {
278+
it('preserves all data through import → export cycle', { timeout: 30000 }, async () => {
279279
// ARRANGE
280280
const user = userEvent.setup();
281281
const { container } = render(<App />);
@@ -321,7 +321,7 @@ describe('Import/Export Workflow Integration', () => {
321321
/**
322322
* Test 7: Import → Modify → Export → verify modifications
323323
*/
324-
it('preserves modifications after import and re-export', async () => {
324+
it('preserves modifications after import and re-export', { timeout: 30000 }, async () => {
325325
// ARRANGE
326326
const user = userEvent.setup();
327327
const { container } = render(<App />);

src/__tests__/integration/sample-metadata-modification.test.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('Sample Metadata Modification Workflow', () => {
7474
* - YAML is parsed correctly
7575
* - Form fields are populated with sample data
7676
*/
77-
it('imports sample metadata through file upload', async () => {
77+
it('imports sample metadata through file upload', { timeout: 30000 }, async () => {
7878
// ARRANGE
7979
const user = userEvent.setup();
8080
const { container } = render(<App />);
@@ -123,7 +123,7 @@ describe('Sample Metadata Modification Workflow', () => {
123123
* - User can modify existing experimenter names
124124
* - New values are stored in form state
125125
*/
126-
it('modifies experimenter name after import', async () => {
126+
it('modifies experimenter name after import', { timeout: 30000 }, async () => {
127127
// ARRANGE
128128
const user = userEvent.setup();
129129
const { container } = render(<App />);
@@ -151,7 +151,7 @@ describe('Sample Metadata Modification Workflow', () => {
151151
* Note: This test types long strings and may take 8-10 seconds
152152
* Timeout increased to 15s to prevent flakes when running with full suite
153153
*/
154-
it('modifies subject information after import', async () => {
154+
it('modifies subject information after import', { timeout: 30000 }, async () => {
155155
// ARRANGE
156156
const user = userEvent.setup();
157157
const { container } = render(<App />);
@@ -193,7 +193,7 @@ describe('Sample Metadata Modification Workflow', () => {
193193
* - Camera IDs auto-increment correctly
194194
* - New camera appears in form
195195
*/
196-
it('adds new camera to imported metadata', async () => {
196+
it('adds new camera to imported metadata', { timeout: 30000 }, async () => {
197197
// ARRANGE
198198
const user = userEvent.setup();
199199
const { container } = render(<App />);
@@ -227,7 +227,7 @@ describe('Sample Metadata Modification Workflow', () => {
227227
* - New task appears in form
228228
* - Task can reference existing cameras
229229
*/
230-
it('adds new task to imported metadata', async () => {
230+
it('adds new task to imported metadata', { timeout: 30000 }, async () => {
231231
// ARRANGE
232232
const user = userEvent.setup();
233233
const { container } = render(<App />);
@@ -260,7 +260,7 @@ describe('Sample Metadata Modification Workflow', () => {
260260
* - Electrode group ID auto-increments
261261
* - New electrode group appears in form
262262
*/
263-
it('adds new electrode group to imported metadata', async () => {
263+
it('adds new electrode group to imported metadata', { timeout: 30000 }, async () => {
264264
// ARRANGE
265265
const user = userEvent.setup();
266266
const { container } = render(<App />);
@@ -290,7 +290,7 @@ describe('Sample Metadata Modification Workflow', () => {
290290
* - Export functionality works after import
291291
* - Blob contains YAML content
292292
*/
293-
it('re-exports metadata with modifications preserved', async () => {
293+
it('re-exports metadata with modifications preserved', { timeout: 30000 }, async () => {
294294
// ARRANGE
295295
const user = userEvent.setup();
296296
const { container } = render(<App />);
@@ -341,7 +341,7 @@ describe('Sample Metadata Modification Workflow', () => {
341341
* - All modifications are preserved through round-trip
342342
* - No data loss during import/export cycle
343343
*/
344-
it('preserves all modifications through import-modify-export-import round-trip', async () => {
344+
it('preserves all modifications through import-modify-export-import round-trip', { timeout: 30000 }, async () => {
345345
// ARRANGE
346346
const user = userEvent.setup();
347347
const { container } = render(<App />);

0 commit comments

Comments
 (0)