Fix TypeScript errors in test files
Cast Element to HTMLElement for style property access. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
eedfe22654
commit
a5fc0c4d3f
2 changed files with 7 additions and 7 deletions
|
|
@ -8,7 +8,7 @@ test.describe('KiCad PCBnew WASM', () => {
|
|||
|
||||
// Wait for runtime initialization (longer timeout for KiCad - 15MB WASM)
|
||||
await page.waitForFunction(() => {
|
||||
return document.querySelector('#canvas')?.style.display === 'block';
|
||||
return (document.querySelector('#canvas') as HTMLElement)?.style.display === 'block';
|
||||
}, { timeout: 120000 }); // 2 min timeout for large WASM
|
||||
|
||||
// Verify canvas is visible
|
||||
|
|
@ -52,7 +52,7 @@ test.describe('KiCad PCBnew WASM', () => {
|
|||
|
||||
// Wait for load
|
||||
await page.waitForFunction(() => {
|
||||
return document.querySelector('#canvas')?.style.display === 'block';
|
||||
return (document.querySelector('#canvas') as HTMLElement)?.style.display === 'block';
|
||||
}, { timeout: 120000 });
|
||||
|
||||
// Wait for initial render
|
||||
|
|
@ -77,7 +77,7 @@ test.describe('KiCad PCBnew WASM', () => {
|
|||
await page.goto('/kicad/pcbnew.html');
|
||||
|
||||
await page.waitForFunction(() => {
|
||||
return document.querySelector('#canvas')?.style.display === 'block';
|
||||
return (document.querySelector('#canvas') as HTMLElement)?.style.display === 'block';
|
||||
}, { timeout: 120000 });
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ test.describe('wxLogError Dialog Tests', () => {
|
|||
|
||||
// Wait for app to initialize
|
||||
await page.waitForFunction(() => {
|
||||
return document.querySelector('#canvas')?.style.display === 'block';
|
||||
return (document.querySelector('#canvas') as HTMLElement)?.style.display === 'block';
|
||||
}, { timeout: 30000 });
|
||||
|
||||
// Verify canvas is visible
|
||||
|
|
@ -41,7 +41,7 @@ test.describe('wxLogError Dialog Tests', () => {
|
|||
await page.goto('/standalone/logerror/logerror_test.html');
|
||||
|
||||
await page.waitForFunction(() => {
|
||||
return document.querySelector('#canvas')?.style.display === 'block';
|
||||
return (document.querySelector('#canvas') as HTMLElement)?.style.display === 'block';
|
||||
}, { timeout: 30000 });
|
||||
|
||||
// Wait for UI to be ready
|
||||
|
|
@ -86,7 +86,7 @@ test.describe('wxLogError Dialog Tests', () => {
|
|||
await page.goto('/standalone/logerror/logerror_test.html');
|
||||
|
||||
await page.waitForFunction(() => {
|
||||
return document.querySelector('#canvas')?.style.display === 'block';
|
||||
return (document.querySelector('#canvas') as HTMLElement)?.style.display === 'block';
|
||||
}, { timeout: 30000 });
|
||||
|
||||
// Wait for UI to be ready
|
||||
|
|
@ -122,7 +122,7 @@ test.describe('wxLogError Dialog Tests', () => {
|
|||
await page.goto('/standalone/logerror/logerror_test.html');
|
||||
|
||||
await page.waitForFunction(() => {
|
||||
return document.querySelector('#canvas')?.style.display === 'block';
|
||||
return (document.querySelector('#canvas') as HTMLElement)?.style.display === 'block';
|
||||
}, { timeout: 30000 });
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
|
|
|||
Loading…
Reference in a new issue