restore coverage floor to 95; cover ground elsewhere
test / unit + widget + golden + a11y (push) Failing after 30s
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / integration_test (xvfb) (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m1s
test / unit + widget + golden + a11y (push) Failing after 30s
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / integration_test (xvfb) (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m1s
Reverts the D-66 amendment + the floor drop to 94 from 78b38e3 — both
were unilateral and outside my call to make. The T-115 widget-test
gap is real (T-122 still tracks it), but the right response is to
land coverage elsewhere rather than lower the gate.
Adds:
- intents_test.dart — parseIntentId for every builtin id + the
`command:<id>` prefix path.
- session_naming_test.dart — HOME-collapse, "/" → "root", oversize
paths hashing to 8 hex chars, hash stability.
- project_test.dart — onProjectOpen await branch in `open()`.
- settings_test.dart — nested-list emit + empty-map emit (the two
un-fired branches in the YAML serializer).
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import 'package:clide/kernel/src/keymap/intents.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
group('parseIntentId', () {
|
||||
test('returns null for an unknown id', () {
|
||||
expect(parseIntentId('not.a.real.intent'), isNull);
|
||||
});
|
||||
|
||||
test('returns ActivateIntent for "activate"', () {
|
||||
expect(parseIntentId('activate'), isA<ActivateIntent>());
|
||||
});
|
||||
|
||||
test('returns DismissIntent for "dismiss"', () {
|
||||
expect(parseIntentId('dismiss'), isA<DismissIntent>());
|
||||
});
|
||||
|
||||
test('returns the focus.* intents', () {
|
||||
expect(parseIntentId('focus.nextPanel'), isA<FocusNextPanelIntent>());
|
||||
expect(parseIntentId('focus.previousPanel'), isA<FocusPreviousPanelIntent>());
|
||||
});
|
||||
|
||||
test('returns the palette.* intents', () {
|
||||
expect(parseIntentId('palette.open'), isA<PaletteOpenIntent>());
|
||||
expect(parseIntentId('palette.selectNext'), isA<PaletteSelectNextIntent>());
|
||||
expect(parseIntentId('palette.selectPrevious'), isA<PaletteSelectPreviousIntent>());
|
||||
expect(parseIntentId('palette.accept'), isA<PaletteAcceptIntent>());
|
||||
});
|
||||
|
||||
test('returns the text.scale* intents', () {
|
||||
expect(parseIntentId('text.scaleIncrease'), isA<TextScaleIncreaseIntent>());
|
||||
expect(parseIntentId('text.scaleDecrease'), isA<TextScaleDecreaseIntent>());
|
||||
expect(parseIntentId('text.scaleReset'), isA<TextScaleResetIntent>());
|
||||
});
|
||||
|
||||
test('returns InvokeCommandIntent for "command:<id>" with the id stripped', () {
|
||||
final intent = parseIntentId('command:theme.pick');
|
||||
expect(intent, isA<InvokeCommandIntent>());
|
||||
expect((intent as InvokeCommandIntent).commandId, 'theme.pick');
|
||||
});
|
||||
|
||||
test('returns InvokeCommandIntent with an empty commandId for "command:"', () {
|
||||
final intent = parseIntentId('command:');
|
||||
expect(intent, isA<InvokeCommandIntent>());
|
||||
expect((intent as InvokeCommandIntent).commandId, '');
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user