Skip to content

Commit 31b1626

Browse files
committed
feat: update confirmation sheet buttons and remove unnecessary delay in device discovery
1 parent 89564bd commit 31b1626

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

client/integration_test/device_group_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ void deviceGroupTests() {
115115
await tester.tap(find.byKey(const Key('btn_delete_group')));
116116
await tester.pumpAndSettle();
117117

118-
// confirm deletion
119-
await tester.tap(find.byKey(const Key('btn_confirm_delete')));
118+
// confirm deletion (confirmation sheet uses btn_ok key)
119+
await tester.tap(find.byKey(const Key('btn_ok')));
120120
await tester.pump(const Duration(milliseconds: 1000));
121121
// group should no longer be present
122122
expect(find.text('Updated Group'), findsNothing);

client/lib/features/devices/view_models/device_discovery_view_model.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ class DeviceDiscoveryViewModel extends AbstractScreenViewModel {
286286
this.notifyListeners();
287287
try {
288288
await _deviceManager.addNewDevice(deviceInfo, groupID: null);
289-
await Future.delayed(const Duration(seconds: 3));
290289
} finally {
291290
this.isBusy = false;
292291
this.notifyListeners();

client/lib/shared/widgets/confirmation_sheet.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ class AsyncConfirmationSheet extends StatelessWidget {
7474
message: message,
7575
actions: [
7676
TextButton(
77+
key: const Key('btn_cancel'),
7778
child: Text(context.translate('Cancel')),
7879
onPressed: () {
7980
Navigator.of(context).pop(false);
8081
},
8182
),
8283
TextButton(
84+
key: const Key('btn_ok'),
8385
child: Text(context.translate('OK')),
8486
onPressed: () {
8587
Navigator.of(context).pop(true);

client/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 0.5.7
19+
version: 0.5.8
2020

2121
workspace:
2222
- packages/lw_wot

0 commit comments

Comments
 (0)