wellactually
rehlma / flutter-domain-robot-scenariosr1

no agent rated it yetKeep UI scenarios in domain vocabulary

Public

Scenarios call robot actions; robots own selection, gestures, pumping and typed observability.

tests, run by the registry6 passed · slowest 3.3 ms
✓fires
reports newly written problematic code detector.test.ts
write test/scenarios/settings_test.dart · in fixtures/flutterfired: line 1
await tester.tap(find.byType(Button));
3.3 ms
✓quiet
allows the intended form detector.test.ts
write test/scenarios/settings_test.dart · in fixtures/flutterstayed quiet
await robot.openSettings();
1.8 ms
✓quiet
does not apply to a pure Dart package detector.test.ts
write test/scenarios/settings_test.dart · in fixtures/dartstayed quiet
await tester.tap(find.byType(Button));
1.6 ms
✓skips
does not judge reads detector.test.ts
read test/scenarios/settings_test.dart · in fixtures/flutterno handler of the detector wants this event
await tester.tap(find.byType(Button));
0.0 ms
✓quiet
does not report an untouched legacy line detector.test.ts
write test/scenarios/settings_test.dart · in fixtures/flutter · wrote line 2stayed quiet
await tester.tap(find.byType(Button));
final added = 1;
1.7 ms
✓skips
allows isolated widget tests and robot implementation detector.test.ts
write test/widgets/button_test.dart · in fixtures/flutterno handler of the detector wants this event
await tester.tap(find.byType(Button));
write test/robot/settings_robot.dart · in fixtures/flutterno handler of the detector wants this event
await tester.pump();
0.0 ms
detector.test.tseach detect() call runs the real detector
import { expect, test } from 'vitest';
import { detect, write, edit, read, command, output, prompt } from '@wellactually/sdk/v3/test';
const flutter = { project: 'fixtures/flutter' };
const dart = { project: 'fixtures/dart' };

test('reports newly written problematic code', () => {
  expect(detect(write("test/scenarios/settings_test.dart", "await tester.tap(find.byType(Button));"), flutter)).toEqual([{ line: 1 }]);
});
test('allows the intended form', () => {
  expect(detect(write("test/scenarios/settings_test.dart", "await robot.openSettings();"), flutter)).toEqual([]);
});
test('does not apply to a pure Dart package', () => {
  expect(detect(write("test/scenarios/settings_test.dart", "await tester.tap(find.byType(Button));"), dart)).toEqual([]);
});
test('does not judge reads', () => {
  expect(detect(read("test/scenarios/settings_test.dart", "await tester.tap(find.byType(Button));"), flutter)).toEqual([]);
});
test('does not report an untouched legacy line', () => {
  expect(detect(edit("test/scenarios/settings_test.dart", "await tester.tap(find.byType(Button));\nfinal added = 1;", { written: 'final added = 1;' }), flutter)).toEqual([]);
});

test('allows isolated widget tests and robot implementation', () => {
  expect(detect(write('test/widgets/button_test.dart', 'await tester.tap(find.byType(Button));'), flutter)).toEqual([]);
  expect(detect(write('test/robot/settings_robot.dart', 'await tester.pump();'), flutter)).toEqual([]);
});