cyberhybridhub/test/widgets/spelling_question_placeholder_test.dart
nathanAndrinoid 4459852f83
Some checks failed
Admin portal tests / test (push) Has been cancelled
spelling
2026-06-05 03:22:35 +00:00

25 lines
687 B
Dart

import 'package:cyberhybridhub/widgets/spelling_question_placeholder.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('SpellingQuestionPlaceholder shows retry', (tester) async {
var retried = false;
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: SpellingQuestionPlaceholder(
onRetry: () => retried = true,
),
),
),
);
expect(find.text('No spelling question ready'), findsOneWidget);
await tester.tap(find.byKey(const Key('spelling-placeholder-retry')));
await tester.pump();
expect(retried, isTrue);
});
}