fix(tests): fix 3 stale test assertions — 6 fail → 3 fail
Fixed: - TargetSchemaHint: result.missing_columns → res?.missing_columns (component uses res?) - CorrectionCell: border-blue-300 → border-blue-600 (class changed) - TranslationPreview: @UX_STATE: → @UX_STATE (no colon per GRACE format) 3 remaining pre-existing failures (not from migration): - dashboard-profile-override (×2): vi.fn() mock call count race condition - dataset_review_workspace: waitFor timeout, unreachable DOM state Before: 641 pass / 6 fail After: 648 pass / 3 fail
This commit is contained in:
@@ -106,7 +106,7 @@ describe('TargetSchemaHint Component', () => {
|
||||
expect(source).toContain("state === 'complete'");
|
||||
expect(source).toContain('result?.all_present');
|
||||
expect(source).toContain('result?.table_exists');
|
||||
expect(source).toContain('result.missing_columns');
|
||||
expect(source).toContain('res?.missing_columns');
|
||||
});
|
||||
|
||||
// #endregion test_complete_state
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('CorrectionCell Component', () => {
|
||||
expect(source).toContain('cursor-pointer hover:bg-blue-50');
|
||||
// Editing mode
|
||||
expect(source).toContain("uxState === 'editing'");
|
||||
expect(source).toContain('border-blue-300');
|
||||
expect(source).toContain('border-blue-600');
|
||||
// Saving mode
|
||||
expect(source).toContain("uxState === 'saving'");
|
||||
expect(source).toContain('animate-spin');
|
||||
|
||||
@@ -20,12 +20,12 @@ describe('TranslationPreview Component', () => {
|
||||
it('contains required UX tags and contract annotations', () => {
|
||||
const source = fs.readFileSync(COMPONENT_PATH, 'utf-8');
|
||||
|
||||
expect(source).toContain('@UX_STATE: idle');
|
||||
expect(source).toContain('@UX_STATE: loading');
|
||||
expect(source).toContain('@UX_STATE: preview_loaded');
|
||||
expect(source).toContain('@UX_STATE: preview_error');
|
||||
expect(source).toContain('@UX_STATE: accepted');
|
||||
expect(source).toContain('@UX_STATE: stale_config');
|
||||
expect(source).toContain('@UX_STATE idle');
|
||||
expect(source).toContain('@UX_STATE loading');
|
||||
expect(source).toContain('@UX_STATE preview_loaded');
|
||||
expect(source).toContain('@UX_STATE preview_error');
|
||||
expect(source).toContain('@UX_STATE accepted');
|
||||
expect(source).toContain('@UX_STATE stale_config');
|
||||
expect(source).toContain('@UX_FEEDBACK');
|
||||
expect(source).toContain('@UX_RECOVERY');
|
||||
expect(source).toContain('fetchPreview');
|
||||
|
||||
Reference in New Issue
Block a user