Use backend rescan summary in group editor
This commit is contained in:
@@ -82,6 +82,39 @@ void main() {
|
||||
expect(api.createdGroupMacs, ['AA:BB']);
|
||||
});
|
||||
|
||||
testWidgets('group edit screen shows backend rescan summary', (
|
||||
tester,
|
||||
) async {
|
||||
final api = FakeIgnisApi(
|
||||
devicesData: {
|
||||
'devices': [
|
||||
{'mac': 'AA:BB', 'name': 'Лампа 1'},
|
||||
],
|
||||
},
|
||||
groupsData: <Object>[],
|
||||
)..rescanNetworkData = {
|
||||
'status': 'ok',
|
||||
'found': 3,
|
||||
'added': 1,
|
||||
'updated': 2,
|
||||
'removed_offline': 1,
|
||||
'pending_removal': 0,
|
||||
'online': 3,
|
||||
};
|
||||
|
||||
await pumpTestApp(tester, child: const GroupEditScreen(), api: api);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.byTooltip('Пересканировать сеть'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(
|
||||
find.text('Сканирование завершено: найдено 3, новых 1, обновлено 2, убрано 1'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(api.rescanCalls, 1);
|
||||
});
|
||||
|
||||
testWidgets('api keys screen validates and shows created key banner', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
Reference in New Issue
Block a user