fix: Resolve test issues and update tasks
- Fix a11y issues in modal backdrops (keyboard handler + ARIA role) - Increase build verification test timeouts - Update tasks.md with current test status (157/157 passing) - Document resolved issues #22, #23, #24
This commit is contained in:
@@ -332,7 +332,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-backdrop" onclick={closeModal}></div>
|
||||
<div class="modal-backdrop" onclick={closeModal} onkeydown={(e) => e.key === 'Escape' && closeModal()} role="button" tabindex="-1"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -360,6 +360,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-backdrop" onclick={closeDeleteModal}></div>
|
||||
<div class="modal-backdrop" onclick={closeDeleteModal} onkeydown={(e) => e.key === 'Escape' && closeDeleteModal()} role="button" tabindex="-1"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -10,9 +10,15 @@ import * as path from 'path';
|
||||
* Note: There is 1 known TypeScript warning in DataTable.svelte (generics syntax)
|
||||
* that does not affect runtime behavior.
|
||||
*
|
||||
* Note: These tests may trigger a vitest worker timeout warning, but all tests pass.
|
||||
* This is a known vitest infrastructure issue with long-running tests.
|
||||
*
|
||||
* Run with: npm run test:unit -- tests/unit/build-verification.spec.ts
|
||||
*/
|
||||
|
||||
// Increase vitest timeout for these long-running tests
|
||||
const BUILD_TIMEOUT = 360000; // 6 minutes
|
||||
|
||||
describe('Build Verification', () => {
|
||||
it('should complete TypeScript check', async () => {
|
||||
let output: string;
|
||||
@@ -20,7 +26,7 @@ describe('Build Verification', () => {
|
||||
try {
|
||||
output = execSync('npm run check', {
|
||||
encoding: 'utf-8',
|
||||
timeout: 120000,
|
||||
timeout: BUILD_TIMEOUT,
|
||||
stdio: ['pipe', 'pipe', 'pipe']
|
||||
});
|
||||
} catch (error: any) {
|
||||
@@ -41,9 +47,9 @@ describe('Build Verification', () => {
|
||||
const criticalErrorMatch = output.match(/svelte-check found (\d+) error/i);
|
||||
const errorCount = criticalErrorMatch ? parseInt(criticalErrorMatch[1], 10) : 0;
|
||||
|
||||
// We expect 1 known error in DataTable.svelte
|
||||
expect(errorCount, `Expected 1 known error (DataTable generics), found ${errorCount}`).toBeLessThanOrEqual(1);
|
||||
}, 180000); // 3 minute timeout
|
||||
// We expect 0-1 known error in DataTable.svelte
|
||||
expect(errorCount, `Expected 0-1 known error (DataTable generics), found ${errorCount}`).toBeLessThanOrEqual(1);
|
||||
}, BUILD_TIMEOUT);
|
||||
|
||||
it('should complete production build successfully', async () => {
|
||||
let output: string;
|
||||
@@ -52,7 +58,7 @@ describe('Build Verification', () => {
|
||||
try {
|
||||
output = execSync('npm run build', {
|
||||
encoding: 'utf-8',
|
||||
timeout: 300000, // 5 minutes
|
||||
timeout: BUILD_TIMEOUT,
|
||||
stdio: ['pipe', 'pipe', 'pipe']
|
||||
});
|
||||
} catch (error: any) {
|
||||
@@ -77,7 +83,7 @@ describe('Build Verification', () => {
|
||||
output,
|
||||
'Build should indicate successful completion'
|
||||
).toMatch(/✓ built|✔ done|built in \d+/i);
|
||||
}, 300000); // 5 minute timeout
|
||||
}, BUILD_TIMEOUT);
|
||||
|
||||
it('should produce expected build artifacts', () => {
|
||||
const outputDir = path.join(process.cwd(), '.svelte-kit', 'output');
|
||||
|
||||
Reference in New Issue
Block a user