Skip to content

Conversation

@chillenious
Copy link
Contributor

No description provided.

chillenious and others added 3 commits January 26, 2026 11:19
Fixes #35 test failures by addressing version detection and extractor logic issues.

**Issues Fixed:**
1. QTI 3.0 version detection not recognizing fragment elements
2. Broken canHandle methods after refactoring
3. Missing QTI 3.0 element name checks in extractors
4. Registry API not converting element types to canonical form

**Changes:**

Version Detection (detectQtiVersion.ts):
- Enhanced to recognize any qti- prefixed element as QTI 3.0
- Added regex pattern for kebab-case QTI 3.0 elements in string detection

Extractor canHandle Methods:
- Reverted 14 extractors to check element.rawTagName (proper validation)
- Added QTI 3.0 kebab-case element name checks for 3 extractors:
  - textEntryExtractor: checks both 'textEntryInteraction' and 'qti-text-entry-interaction'
  - extendedTextExtractor: checks both camelCase and kebab-case
  - matchExtractor: checks both camelCase and kebab-case

Registry API (ExtractionRegistry.ts):
- Fixed getExtractorsForType() to convert input to canonical form

Tests (qti3-attribute-extraction.test.ts):
- Fixed querySelector calls to use lowercase for HTML parser compatibility

**Test Results:**
✅ All 1568 tests passing (previously 10 failures)

Co-Authored-By: Claude <[email protected]>
@chillenious chillenious merged commit b688f0b into develop Jan 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants