Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

test(mobile): drop the hold-to-talk retry tests the build never runs

Dev jacob30c95b7b182f
diff --git a/mobile/test/voice_input_controller_test.dart b/mobile/test/voice_input_controller_test.dart
index 6deb5f5b3..64ee996ed 100644
--- a/mobile/test/voice_input_controller_test.dart
+++ b/mobile/test/voice_input_controller_test.dart
@@ -3,7 +3,6 @@ import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness_mobile/phone/voice_input_controller.dart';
-import 'package:harness_mobile/phone/voice_mic_mode.dart';
import 'package:harness_mobile/phone/voice_notice.dart';
import 'voice_fakes.dart';
@@ -214,47 +213,13 @@ void main() {
expect(voice.isSending, isFalse);
});
- group('the retry face, held to talk', () {
- // ⚠️ **A tap is a brushed button only when the mic is held to talk** —
- // [VoiceInputController.minTake] is zero in tap mode, the mode the app is
- // built in ([voiceMicMode]), because a short "yes" IS the message there. In
- // that mode the 120ms takes below are judged as speech (silence, here), and
- // the retry face sends its held words on a plain tap instead — `_tapAction`,
- // covered in `voice_mic_fab_test.dart`.
- final holdOnly = micHoldsToTalk ? null : 'hold-to-talk only';
-
- Future<void> failOneSend() async {
+ test(
+ 'the retry face, held again after a take fails, sends none of the message',
+ () async {
backend.replies.add('deploy');
await voice.startListening();
await voice.stopListening();
await voice.submit((_) async => false);
- }
-
- test('a quick tap sends the words held from the failed send', () async {
- await failOneSend();
- final delivered = <String>[];
- recorder.captured = (
- wav: Uint8List.fromList([1, 2, 3, 4]),
- length: const Duration(milliseconds: 120),
- peak: 0,
- );
-
- await voice.startHold((text) async {
- delivered.add(text);
- return true;
- });
- await voice.finishHold((text) async {
- delivered.add(text);
- return true;
- });
-
- expect(delivered, ['deploy']);
- expect(voice.isIdle, isTrue);
- expect(backend.calls, hasLength(1), reason: 'a tap is not uploaded');
- }, skip: holdOnly);
-
- test('a take that failed still sends none of the message', () async {
- await failOneSend();
backend.fails = true;
var delivered = false;
@@ -263,23 +228,8 @@ void main() {
expect(delivered, isFalse, reason: 'what was just said is missing');
expect(voice.transcript, 'deploy');
- });
-
- test('a quick tap with nothing held sends nothing', () async {
- recorder.captured = (
- wav: Uint8List.fromList([1, 2, 3, 4]),
- length: const Duration(milliseconds: 120),
- peak: 0,
- );
- var delivered = false;
-
- await voice.startHold((_) async => delivered = true);
- await voice.finishHold((_) async => delivered = true);
-
- expect(delivered, isFalse);
- expect(voice.notice, isNull, reason: 'a brushed button is not reported');
- }, skip: holdOnly);
- });
+ },
+ );
test('clearing mid-transcription drops the words when they arrive', () async {
backend.pending = Completer<String>();