fix(web): increase replay.test.ts timeout for first module load
The first test in replay.test.ts was failing due to a race condition: the initial module import took longer than the 100ms timeout, causing urlInput to be null. Subsequent tests passed because the module was cached. Increased timeout to 500ms to ensure the first module load completes before checking for DOM elements. All tests now pass (5/5).
This commit is contained in:
parent
eba5d90a6d
commit
846a976f1c
1 changed files with 2 additions and 2 deletions
|
|
@ -79,8 +79,8 @@ describe('replay.ts error handling (URL load button)', () => {
|
|||
const { renderReplayPage } = await import('./replay');
|
||||
renderReplayPage({});
|
||||
|
||||
// Wait for async module loading
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
// Wait for async module loading (first import takes longer)
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
|
||||
// Get the URL input and load button
|
||||
const urlInput = document.getElementById('url-input') as HTMLInputElement;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue