Skip to content

Commit

Permalink
TF-3269 Update login robot with starting page
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora authored and hoangdat committed Nov 12, 2024
1 parent 26e7eed commit c393bef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions integration_test/robots/login_robot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ import 'package:flutter/material.dart';
import 'package:tmail_ui_user/features/login/domain/model/recent_login_username.dart';
import 'package:tmail_ui_user/features/login/presentation/login_view.dart';
import 'package:tmail_ui_user/features/login/presentation/widgets/login_text_input_builder.dart';
import 'package:tmail_ui_user/features/starting_page/presentation/twake_welcome/twake_welcome_view.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';

import '../base/core_robot.dart';

class LoginRobot extends CoreRobot {
LoginRobot(super.$);

Future<void> expectWelcomeViewVisible() => ensureViewVisible($(TwakeWelcomeView));

Future<void> tapOnUseCompanyServer() async {
await $.pump(const Duration(seconds: 1));
await $(AppLocalizations().useCompanyServer).tap();
}

Future<void> expectLoginViewVisible() => ensureViewVisible($(LoginView));

Future<void> enterEmail(String email) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class LoginWithBasicAuthScenario extends BaseScenario with ScenarioUtilsMixin {
final loginRobot = LoginRobot($);
final threadRobot = ThreadRobot($);

await loginRobot.expectWelcomeViewVisible();
await loginRobot.tapOnUseCompanyServer();

await loginRobot.expectLoginViewVisible();
await loginRobot.enterEmail(username);
await loginRobot.enterHostUrl(hostUrl);
Expand Down

0 comments on commit c393bef

Please sign in to comment.