WIP
This commit is contained in:
parent
8700b54b0e
commit
a6dafe8b1e
|
@ -8,6 +8,7 @@ import 'package:hub/components/molecular_components/throw_exception/throw_except
|
||||||
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
||||||
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
||||||
import 'package:hub/features/backend/api_requests/index.dart';
|
import 'package:hub/features/backend/api_requests/index.dart';
|
||||||
|
import 'package:hub/features/local/index.dart';
|
||||||
import 'package:hub/features/menu/index.dart';
|
import 'package:hub/features/menu/index.dart';
|
||||||
import 'package:hub/features/module/data/index.dart';
|
import 'package:hub/features/module/data/index.dart';
|
||||||
import 'package:hub/features/module/domain/index.dart';
|
import 'package:hub/features/module/domain/index.dart';
|
||||||
|
@ -49,10 +50,10 @@ void main() {
|
||||||
// ModularizationTest.switchLicense();
|
// ModularizationTest.switchLicense();
|
||||||
// ModularizationTest.containLicense();
|
// ModularizationTest.containLicense();
|
||||||
//
|
//
|
||||||
MenuTest.navToEntries();
|
// MenuTest.navToEntries();
|
||||||
// MenuTest.containEntries();
|
// MenuTest.containEntries();
|
||||||
// MenuTest.labels2AppbarConsistency();
|
// MenuTest.labels2AppbarConsistency();
|
||||||
//
|
//
|
||||||
// LocalsTest.setLocal();
|
// LocalsTest.setLocal();
|
||||||
// LocalsTest.unlinkLocal();
|
LocalsTest.unlinkLocal();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,34 +7,30 @@ class LocalsTest {
|
||||||
(PatrolTester tester) async {
|
(PatrolTester tester) async {
|
||||||
$ = tester;
|
$ = tester;
|
||||||
await _logged();
|
await _logged();
|
||||||
await $.pumpWidget(const App());
|
await $.pumpWidgetAndSettle(const App());
|
||||||
await $.pumpAndSettle();
|
await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
|
await $.waitUntilVisible($(LocalProfileComponentWidget));
|
||||||
|
|
||||||
final Finder profileFinder =
|
final PatrolFinder profileFinder =
|
||||||
find.byKey(const Key('AsyncLocalProfileComponentWidget_InkWell'));
|
$(#AsyncLocalProfileComponentWidget_InkWell);
|
||||||
expect(profileFinder, findsOneWidget);
|
expect(profileFinder, findsOneWidget);
|
||||||
|
|
||||||
await $.tap(profileFinder);
|
await $(profileFinder).tap();
|
||||||
await $.pump(const Duration(seconds: 1));
|
await $.pump(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
final Finder bottomSheetFinder =
|
final PatrolFinder bottomSheetFinder =
|
||||||
find.byType(BottomArrowLinkedLocalsComponentWidget);
|
$(BottomArrowLinkedLocalsComponentWidget);
|
||||||
expect(bottomSheetFinder, findsOneWidget);
|
expect(bottomSheetFinder, findsOneWidget);
|
||||||
|
|
||||||
await $.pump(const Duration(seconds: 1));
|
await $.pump(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
final Finder listViewFinder = find.descendant(
|
final PatrolFinder listViewFinder = $(bottomSheetFinder).$(ListView);
|
||||||
of: bottomSheetFinder,
|
|
||||||
matching: find.byType(ListView),
|
|
||||||
);
|
|
||||||
expect(listViewFinder, findsOneWidget);
|
expect(listViewFinder, findsOneWidget);
|
||||||
|
|
||||||
await $.pump(const Duration(seconds: 1));
|
await $.pump(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
final Finder entriesFinder = find.descendant(
|
final PatrolFinder entriesFinder =
|
||||||
of: listViewFinder,
|
$(listViewFinder).$(CardItemTemplateComponentWidget);
|
||||||
matching: find.byType(CardItemTemplateComponentWidget),
|
|
||||||
);
|
|
||||||
expect(entriesFinder, findsWidgets);
|
expect(entriesFinder, findsWidgets);
|
||||||
|
|
||||||
if (entriesFinder.evaluate().isNotEmpty) {
|
if (entriesFinder.evaluate().isNotEmpty) {
|
||||||
|
@ -43,86 +39,130 @@ class LocalsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
await Future.delayed(const Duration(milliseconds: 500));
|
||||||
return;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future unlinkLocal() async {
|
static Future unlinkLocal() async {
|
||||||
patrolWidgetTest('Desvincular do local selecionado', //
|
// patrolWidgetTest('Desvincular do local selecionado', //
|
||||||
(PatrolTester tester) async {
|
// (PatrolTester tester) async {
|
||||||
$ = tester;
|
// $ = tester;
|
||||||
await _logged();
|
// await _logged();
|
||||||
await $.pumpWidget(const App());
|
// await $.pumpWidgetAndSettle(const App());
|
||||||
await $.pumpAndSettle();
|
// await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
await $.pump(const Duration(seconds: 1));
|
// Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
//
|
||||||
final Finder gridView = find.byType(GridView);
|
// final PatrolFinder gridView = await $(GridView) //
|
||||||
final Finder entries = find.descendant(
|
// .waitUntilVisible();
|
||||||
of: gridView,
|
// final PatrolFinder entries = await $(gridView)
|
||||||
matching: find.byType(ButtonMenuItem),
|
// .$(ButtonMenuItem) //
|
||||||
);
|
// .waitUntilVisible();
|
||||||
await $.pumpAndSettle();
|
//
|
||||||
expect(entries, findsWidgets);
|
// await $.pumpAndSettle();
|
||||||
final Finder settings = find.descendant(
|
// expect(entries, findsWidgets);
|
||||||
of: gridView,
|
// final PatrolFinder settings = await $(gridView) //
|
||||||
matching: find.byIcon(Icons.settings),
|
// .$(Icons.settings)
|
||||||
);
|
// .waitUntilVisible();
|
||||||
expect(settings, findsOneWidget);
|
// expect(settings, findsOneWidget);
|
||||||
|
//
|
||||||
await $.tap(settings);
|
// await $(settings).tap();
|
||||||
await $.pumpAndSettle();
|
//
|
||||||
|
// final PatrolFinder unlinkButton = await $(Symbols.digital_out_of_home) //
|
||||||
final Finder unlinkButton = find.byIcon(Symbols.digital_out_of_home);
|
// .waitUntilVisible();
|
||||||
expect(unlinkButton, findsOneWidget);
|
// expect(unlinkButton, findsOneWidget);
|
||||||
await $.tap(unlinkButton);
|
// await $(unlinkButton).tap();
|
||||||
await $.pumpAndSettle();
|
//
|
||||||
await $.tap(find.text('Sim'));
|
// await $('Sim') //
|
||||||
await $.pump();
|
// .waitUntilVisible()
|
||||||
await $.pump(const Duration(seconds: 1));
|
// .tap(settlePolicy: SettlePolicy.noSettle);
|
||||||
await $.pump();
|
//
|
||||||
|
// await $.pump();
|
||||||
final Finder bottomSheetFinder =
|
// await $.pump(const Duration(seconds: 1));
|
||||||
find.byType(BottomArrowLinkedLocalsComponentWidget);
|
// await $.pump();
|
||||||
await $.pump(const Duration(seconds: 1));
|
//
|
||||||
expect(bottomSheetFinder, findsOneWidget);
|
// final PatrolFinder bottomSheetFinder =
|
||||||
await $.pump(const Duration(seconds: 1));
|
// await $(BottomArrowLinkedLocalsComponentWidget) //
|
||||||
|
// .waitUntilVisible();
|
||||||
await $.pump(const Duration(seconds: 1));
|
//
|
||||||
|
// await $.pump(const Duration(seconds: 1));
|
||||||
final Finder listViewFinder = find.descendant(
|
// expect(bottomSheetFinder, findsOneWidget);
|
||||||
of: bottomSheetFinder,
|
// await $.pump(const Duration(seconds: 1));
|
||||||
matching: find.byType(ListView),
|
//
|
||||||
);
|
// await $.pump(const Duration(seconds: 1));
|
||||||
expect(listViewFinder, findsOneWidget);
|
// final PatrolFinder listViewFinder = await $(bottomSheetFinder) //
|
||||||
|
// .$(ListView)
|
||||||
await $.pump(const Duration(seconds: 1));
|
// .waitUntilVisible();
|
||||||
|
//
|
||||||
final Finder entriesFinder = find.descendant(
|
// expect(listViewFinder, findsOneWidget);
|
||||||
of: listViewFinder,
|
//
|
||||||
matching: find.byType(CardItemTemplateComponentWidget),
|
// await $.pump(const Duration(seconds: 1));
|
||||||
);
|
//
|
||||||
expect(entriesFinder, findsWidgets);
|
// final PatrolFinder entriesFinder = await $(listViewFinder)
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
// .$(CardItemTemplateComponentWidget)
|
||||||
return;
|
// .waitUntilVisible();
|
||||||
});
|
//
|
||||||
|
// expect(entriesFinder, findsWidgets);
|
||||||
|
// await Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
// return;
|
||||||
|
// });
|
||||||
|
|
||||||
patrolWidgetTest(
|
patrolWidgetTest(
|
||||||
'Desvincular de um local já desvinculado', //
|
'Vincular um local desvinculado', //
|
||||||
(PatrolTester tester) async {
|
(PatrolTester tester) async {
|
||||||
$ = tester;
|
$ = tester;
|
||||||
|
await _logged(false);
|
||||||
await $.pumpWidget(const App());
|
await $.pumpWidget(const App());
|
||||||
try {
|
|
||||||
await $.pumpAndSettle(
|
final loc = ff.FFLocalizations.of(navigatorKey.currentContext!);
|
||||||
// const Duration(seconds: 2),
|
|
||||||
// EnginePhase.sendSemanticsUpdate,
|
//
|
||||||
// const Duration(seconds: 2),
|
// await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
);
|
// await $.waitUntilVisible($(LocalProfileComponentWidget));
|
||||||
throw Exception('Local está vinculado');
|
//
|
||||||
} catch (e) {
|
// final PatrolFinder profileFinder =
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
// $(#AsyncLocalProfileComponentWidget_InkWell);
|
||||||
return;
|
// expect(profileFinder, findsOneWidget);
|
||||||
|
//
|
||||||
|
// await $(profileFinder).tap();
|
||||||
|
// await $.pump(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
|
final PatrolFinder bottomSheetFinder =
|
||||||
|
await $(BottomArrowLinkedLocalsComponentWidget) //
|
||||||
|
.waitUntilVisible();
|
||||||
|
expect(bottomSheetFinder, findsOneWidget);
|
||||||
|
|
||||||
|
await $.pump(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
|
final PatrolFinder listViewFinder = $(bottomSheetFinder) //
|
||||||
|
.$(ListView);
|
||||||
|
expect(listViewFinder, findsOneWidget);
|
||||||
|
|
||||||
|
await $.pump(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
|
final PatrolFinder entriesFinder = $(listViewFinder) //
|
||||||
|
.$(CardItemTemplateComponentWidget);
|
||||||
|
expect(entriesFinder, findsWidgets);
|
||||||
|
|
||||||
|
if (entriesFinder.evaluate().isNotEmpty) {
|
||||||
|
await $(entriesFinder.first).waitUntilVisible().tap();
|
||||||
|
final String accept =
|
||||||
|
loc.getVariableText(enText: 'Yes', ptText: 'Sim');
|
||||||
|
await $(accept).waitUntilVisible().tap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// await $.pumpAndSettle(
|
||||||
|
// duration: const Duration(seconds: 2),
|
||||||
|
// phase: EnginePhase.sendSemanticsUpdate,
|
||||||
|
// timeout: const Duration(seconds: 2),
|
||||||
|
// );
|
||||||
|
// throw Exception('Local está vinculado');
|
||||||
|
// } catch (e) {
|
||||||
|
// await Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,9 @@ class MenuTest {
|
||||||
(PatrolTester tester) async {
|
(PatrolTester tester) async {
|
||||||
$ = tester;
|
$ = tester;
|
||||||
await _logged();
|
await _logged();
|
||||||
await $.pumpWidget(const App());
|
await $.pumpWidgetAndSettle(const App());
|
||||||
await $.pumpAndSettle();
|
await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
|
Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
final List<String> routes = MenuEntry.entries
|
final List<String> routes = MenuEntry.entries
|
||||||
.where((entry) => entry.key != 'FRE-HUB-LOGOUT')
|
.where((entry) => entry.key != 'FRE-HUB-LOGOUT')
|
||||||
|
@ -20,30 +21,30 @@ class MenuTest {
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
final LinkedHashMap<String, String> routesTitles =
|
final LinkedHashMap<String, String> routesTitles =
|
||||||
LinkedHashMap.fromIterables(
|
LinkedHashMap.fromIterables(routes, titles);
|
||||||
routes,
|
|
||||||
titles,
|
|
||||||
);
|
|
||||||
for (final entry in routesTitles.entries) {
|
for (final entry in routesTitles.entries) {
|
||||||
|
await $.pumpAndSettle();
|
||||||
final String route = entry.key;
|
final String route = entry.key;
|
||||||
final String title = entry.value;
|
final String title = entry.value;
|
||||||
|
|
||||||
|
print('route: $route');
|
||||||
|
print('title: $title');
|
||||||
|
|
||||||
if (route == '/petsPage') continue;
|
if (route == '/petsPage') continue;
|
||||||
if (route == '/fastPassPage') continue;
|
if (route == '/fastPassPage') continue;
|
||||||
if (route == '/reservation') continue;
|
if (route == '/reservation') continue;
|
||||||
await $.pumpAndSettle();
|
|
||||||
|
|
||||||
|
await $.pumpAndSettle();
|
||||||
ff.navigatorKey.currentContext!.go(route);
|
ff.navigatorKey.currentContext!.go(route);
|
||||||
await $.pumpAndSettle();
|
await $.pumpAndSettle();
|
||||||
|
|
||||||
Future.delayed(const Duration(milliseconds: 500));
|
Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
await $.waitUntilExists($(AppBar));
|
||||||
final Finder appBar = find.text(title);
|
final PatrolFinder appBar = $(title);
|
||||||
await $.pumpAndSettle();
|
|
||||||
expect(appBar, findsOneWidget);
|
expect(appBar, findsOneWidget);
|
||||||
await $.pumpAndSettle();
|
|
||||||
}
|
}
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
await Future.delayed(const Duration(milliseconds: 500));
|
||||||
return;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -53,19 +54,15 @@ class MenuTest {
|
||||||
'HomeMenu contém seus itens?', //
|
'HomeMenu contém seus itens?', //
|
||||||
(PatrolTester tester) async {
|
(PatrolTester tester) async {
|
||||||
$ = tester;
|
$ = tester;
|
||||||
|
|
||||||
await _logged();
|
await _logged();
|
||||||
await $.pumpWidget(const App());
|
await $.pumpWidgetAndSettle(const App());
|
||||||
await $.pumpAndSettle();
|
await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
|
||||||
final Finder gridView = find.byType(GridView);
|
await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
await $.pumpAndSettle();
|
await $.waitUntilVisible($(GridView));
|
||||||
await $.pumpAndSettle();
|
final PatrolFinder gridEntries = $(GridView).$(ButtonMenuItem);
|
||||||
final Finder gridEntries = find.descendant(
|
|
||||||
of: gridView,
|
|
||||||
matching: find.byType(ButtonMenuItem),
|
|
||||||
);
|
|
||||||
await $.pumpAndSettle();
|
|
||||||
expect(gridEntries, findsWidgets);
|
expect(gridEntries, findsWidgets);
|
||||||
|
|
||||||
final List<String?> menuKeys = gridEntries
|
final List<String?> menuKeys = gridEntries
|
||||||
|
@ -90,7 +87,6 @@ class MenuTest {
|
||||||
await $.pumpAndSettle();
|
await $.pumpAndSettle();
|
||||||
expect(entriesKey, containsAll(menuKeys));
|
expect(entriesKey, containsAll(menuKeys));
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
await Future.delayed(const Duration(milliseconds: 500));
|
||||||
return;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -98,26 +94,23 @@ class MenuTest {
|
||||||
'DrawerMenu contém seus itens?', //
|
'DrawerMenu contém seus itens?', //
|
||||||
(PatrolTester tester) async {
|
(PatrolTester tester) async {
|
||||||
$ = tester;
|
$ = tester;
|
||||||
|
|
||||||
await _logged();
|
await _logged();
|
||||||
await $.pumpWidget(const App());
|
await $.pumpWidgetAndSettle(const App());
|
||||||
await $.pumpAndSettle();
|
await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
|
||||||
final Finder drawerButton = find.byIcon(Icons.menu_rounded);
|
await $.waitUntilVisible($(MenuStaggeredView));
|
||||||
await $.pumpAndSettle();
|
await $.waitUntilVisible($(GridView));
|
||||||
await $.tap(drawerButton);
|
final PatrolFinder gridEntries = $(GridView).$(ButtonMenuItem);
|
||||||
await $.pumpAndSettle();
|
|
||||||
|
|
||||||
final Finder gridView = find.byType(ListView);
|
|
||||||
await $.pumpAndSettle();
|
|
||||||
final Finder gridEntries = find.descendant(
|
|
||||||
of: gridView,
|
|
||||||
matching: find.byType(CardMenuItem),
|
|
||||||
);
|
|
||||||
await $.pumpAndSettle();
|
|
||||||
expect(gridEntries, findsWidgets);
|
expect(gridEntries, findsWidgets);
|
||||||
|
|
||||||
final List<String?> menuKeys = gridEntries
|
await $(Icons.menu_rounded).waitUntilVisible().tap();
|
||||||
|
await $.waitUntilVisible($(ListView));
|
||||||
|
final PatrolFinder listEntries = $(ListView).$(CardMenuItem);
|
||||||
|
expect(listEntries, findsWidgets);
|
||||||
|
|
||||||
|
final List<String?> menuKeys = listEntries
|
||||||
.evaluate()
|
.evaluate()
|
||||||
.map((element) {
|
.map((element) {
|
||||||
final key = element.widget.key;
|
final key = element.widget.key;
|
||||||
|
@ -139,7 +132,6 @@ class MenuTest {
|
||||||
await $.pumpAndSettle();
|
await $.pumpAndSettle();
|
||||||
expect(entriesKey, containsAll(menuKeys));
|
expect(entriesKey, containsAll(menuKeys));
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
await Future.delayed(const Duration(milliseconds: 500));
|
||||||
return;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -179,28 +171,20 @@ class MenuTest {
|
||||||
final int gridEntriesCount = gridEntries.evaluate().length;
|
final int gridEntriesCount = gridEntries.evaluate().length;
|
||||||
await $.pumpAndSettle();
|
await $.pumpAndSettle();
|
||||||
|
|
||||||
// final List<String?> menuKeys = gridEntries
|
|
||||||
// .evaluate()
|
|
||||||
// .map((element) {
|
|
||||||
// final key = element.widget.key;
|
|
||||||
// if (key is ValueKey<String>) {
|
|
||||||
// return key.value;
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// })
|
|
||||||
// .where((key) => key != null)
|
|
||||||
// .toList();
|
|
||||||
// final List<MenuEntry> entries = MenuEntry.entries;
|
|
||||||
// final List<String> entriesKey = entries
|
|
||||||
// .where((entry) => entry.types.contains(MenuEntryType.Home))
|
|
||||||
// .map((entry) => entry.key)
|
|
||||||
// .toList();
|
|
||||||
// await $.pumpAndSettle();
|
|
||||||
// expect(entriesKey, containsAll(menuKeys));
|
|
||||||
|
|
||||||
///
|
|
||||||
|
|
||||||
for (int i = 0; i < gridEntriesCount; i++) {
|
for (int i = 0; i < gridEntriesCount; i++) {
|
||||||
|
await $.waitUntilVisible(
|
||||||
|
$(MenuStaggeredView),
|
||||||
|
timeout: Duration(seconds: 1),
|
||||||
|
);
|
||||||
|
await $.waitUntilVisible(
|
||||||
|
gridView,
|
||||||
|
timeout: Duration(seconds: 1),
|
||||||
|
);
|
||||||
|
await $.waitUntilVisible(
|
||||||
|
gridEntries.at(i),
|
||||||
|
timeout: Duration(seconds: 1),
|
||||||
|
);
|
||||||
|
|
||||||
final ButtonMenuItem entry =
|
final ButtonMenuItem entry =
|
||||||
$.tester.widget<ButtonMenuItem>(gridEntries.at(i));
|
$.tester.widget<ButtonMenuItem>(gridEntries.at(i));
|
||||||
final Key? widgetKey = entry.key;
|
final Key? widgetKey = entry.key;
|
||||||
|
@ -210,14 +194,25 @@ class MenuTest {
|
||||||
if (widgetKey == ValueKey<String>('FRE-HUB-FASTPASS')) continue;
|
if (widgetKey == ValueKey<String>('FRE-HUB-FASTPASS')) continue;
|
||||||
if (widgetKey == ValueKey<String>('FRE-HUB-QRCODE')) continue;
|
if (widgetKey == ValueKey<String>('FRE-HUB-QRCODE')) continue;
|
||||||
if (widgetKey == ValueKey<String>('FRE-HUB-RESERVATIONS')) continue;
|
if (widgetKey == ValueKey<String>('FRE-HUB-RESERVATIONS')) continue;
|
||||||
|
if (widgetKey == ValueKey<String>('FRE-HUB-SETTINGS')) continue;
|
||||||
|
|
||||||
await $.waitUntilVisible(gridEntries.at(i));
|
await $(gridEntries.at(i))
|
||||||
await $(gridEntries.at(i)).waitUntilVisible().tap();
|
.waitUntilVisible(timeout: const Duration(seconds: 1))
|
||||||
await $(Icons.keyboard_arrow_down);
|
.tap(
|
||||||
Future.delayed(const Duration(milliseconds: 500));
|
settleTimeout: const Duration(seconds: 1),
|
||||||
// await _navigateBackUsingSystemGesture();
|
settlePolicy: SettlePolicy.noSettle,
|
||||||
await $(#BackNavigationAppBar).waitUntilVisible().tap();
|
);
|
||||||
// await $(Icons.keyboard_arrow_down).waitUntilVisible().tap();
|
|
||||||
|
await $.pumpAndSettle(duration: Duration(milliseconds: 500));
|
||||||
|
|
||||||
|
await $(Icons.keyboard_arrow_left)
|
||||||
|
.waitUntilVisible(timeout: const Duration(seconds: 1))
|
||||||
|
.tap(
|
||||||
|
settleTimeout: const Duration(seconds: 1),
|
||||||
|
settlePolicy: SettlePolicy.noSettle,
|
||||||
|
);
|
||||||
|
|
||||||
|
await $.pumpAndSettle(duration: Duration(milliseconds: 500));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
part of 'app_test.dart';
|
part of 'app_test.dart';
|
||||||
|
|
||||||
Future<void> _logged() async {
|
Future<void> _logged([bool forceLinkedLocal = true]) async {
|
||||||
await initializeApp();
|
await initializeApp();
|
||||||
await StorageHelper() //
|
await StorageHelper() //
|
||||||
.set(SecureStorageKey.isLogged.value, 'true');
|
.set(SecureStorageKey.isLogged.value, 'true');
|
||||||
|
@ -10,19 +10,22 @@ Future<void> _logged() async {
|
||||||
.set(ProfileStorageKey.devUUID.key, 'b5c3818753e76d85');
|
.set(ProfileStorageKey.devUUID.key, 'b5c3818753e76d85');
|
||||||
await StorageHelper() //
|
await StorageHelper() //
|
||||||
.set(ProfileStorageKey.userUUID.key, '649c45d7514a28.85876308');
|
.set(ProfileStorageKey.userUUID.key, '649c45d7514a28.85876308');
|
||||||
await StorageHelper() //
|
|
||||||
.set(ProfileStorageKey.clientUUID.key, '7');
|
|
||||||
await StorageHelper() //
|
await StorageHelper() //
|
||||||
.set(SecureStorageKey.email.value, 'email_app@exemplo.com');
|
.set(SecureStorageKey.email.value, 'email_app@exemplo.com');
|
||||||
await StorageHelper() //
|
await StorageHelper() //
|
||||||
.set(SecureStorageKey.password.value, '123456');
|
.set(SecureStorageKey.password.value, '123456');
|
||||||
await StorageHelper() //
|
await StorageHelper() //
|
||||||
.set(LocalsStorageKey.isNewVersion.key, true);
|
.set(LocalsStorageKey.isNewVersion.key, true);
|
||||||
|
if (forceLinkedLocal == true) {
|
||||||
|
await StorageHelper() //
|
||||||
|
.set(ProfileStorageKey.clientUUID.key, '7');
|
||||||
await PhpGroup //
|
await PhpGroup //
|
||||||
.resopndeVinculo
|
.resopndeVinculo
|
||||||
.call(tarefa: 'A');
|
.call(tarefa: 'A');
|
||||||
await LicenseRepositoryImpl() //
|
await LicenseRepositoryImpl() //
|
||||||
.resetLicense();
|
.resetLicense();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _unlogged() async {
|
Future<void> _unlogged() async {
|
||||||
|
|
|
@ -7,11 +7,14 @@ import 'sign_in_template_component_widget.dart'
|
||||||
class SignInTemplateComponentModel
|
class SignInTemplateComponentModel
|
||||||
extends FlutterFlowModel<SignInTemplateComponentWidget> {
|
extends FlutterFlowModel<SignInTemplateComponentWidget> {
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
FocusNode? emailAddressFocusNode;
|
FocusNode? emailAddressFocusNode;
|
||||||
TextEditingController? emailAddressTextController;
|
TextEditingController? emailAddressTextController;
|
||||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||||
|
|
||||||
SignInTemplateComponentModel();
|
SignInTemplateComponentModel();
|
||||||
|
|
||||||
String? _emailAddressTextControllerValidator(
|
String? _emailAddressTextControllerValidator(
|
||||||
BuildContext context, String? val) {
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
|
@ -32,6 +35,7 @@ class SignInTemplateComponentModel
|
||||||
TextEditingController? passwordTextController;
|
TextEditingController? passwordTextController;
|
||||||
late bool passwordVisibility;
|
late bool passwordVisibility;
|
||||||
String? Function(BuildContext, String?)? passwordTextControllerValidator;
|
String? Function(BuildContext, String?)? passwordTextControllerValidator;
|
||||||
|
|
||||||
String? _passwordTextControllerValidator(BuildContext context, String? val) {
|
String? _passwordTextControllerValidator(BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
|
|
Loading…
Reference in New Issue