mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-12 11:52:07 +10:00
Merge branch 'dev' into update-pacox-multibyte
This commit is contained in:
@@ -123,11 +123,13 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.widgetWithText(FloatingActionButton, 'TCP'));
|
||||
final scannerContext = tester.element(find.byType(ScannerScreen));
|
||||
final scannerL10n = AppLocalizations.of(scannerContext);
|
||||
await tester.tap(find.byTooltip(scannerL10n.connectionChoiceTcpLabel));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(TcpScreen), findsOneWidget);
|
||||
|
||||
await tester.tap(find.widgetWithText(FloatingActionButton, 'Bluetooth'));
|
||||
await tester.tap(find.widgetWithText(OutlinedButton, 'Bluetooth'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byType(TcpScreen), findsNothing);
|
||||
|
||||
@@ -157,10 +157,12 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final context = tester.element(find.byType(ScannerScreen));
|
||||
final l10n = AppLocalizations.of(context);
|
||||
if (PlatformInfo.supportsUsbSerial) {
|
||||
expect(find.widgetWithText(FloatingActionButton, 'USB'), findsOneWidget);
|
||||
expect(find.byTooltip(l10n.connectionChoiceUsbLabel), findsOneWidget);
|
||||
} else {
|
||||
expect(find.widgetWithText(FloatingActionButton, 'USB'), findsNothing);
|
||||
expect(find.byTooltip(l10n.connectionChoiceUsbLabel), findsNothing);
|
||||
}
|
||||
|
||||
// ScannerScreen.dispose() schedules disconnect work that debounces notify.
|
||||
@@ -186,13 +188,13 @@ void main() {
|
||||
|
||||
final context = tester.element(find.byType(ScannerScreen));
|
||||
final l10n = AppLocalizations.of(context);
|
||||
expect(find.text(l10n.scanner_scan), findsOneWidget);
|
||||
expect(find.text(l10n.scanner_scan), findsWidgets);
|
||||
|
||||
if (PlatformInfo.supportsUsbSerial) {
|
||||
expect(find.text(l10n.connectionChoiceUsbLabel), findsOneWidget);
|
||||
expect(find.byTooltip(l10n.connectionChoiceUsbLabel), findsOneWidget);
|
||||
}
|
||||
if (!PlatformInfo.isWeb) {
|
||||
expect(find.text(l10n.connectionChoiceTcpLabel), findsOneWidget);
|
||||
expect(find.byTooltip(l10n.connectionChoiceTcpLabel), findsOneWidget);
|
||||
}
|
||||
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
|
||||
Reference in New Issue
Block a user