diff --git a/integration_test/robots/login_robot.dart b/integration_test/robots/login_robot.dart index b079396fea..688bccbb52 100644 --- a/integration_test/robots/login_robot.dart +++ b/integration_test/robots/login_robot.dart @@ -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 expectWelcomeViewVisible() => ensureViewVisible($(TwakeWelcomeView)); + + Future tapOnUseCompanyServer() async { + await $.pump(const Duration(seconds: 1)); + await $(AppLocalizations().useCompanyServer).tap(); + } + Future expectLoginViewVisible() => ensureViewVisible($(LoginView)); Future enterEmail(String email) async { diff --git a/integration_test/scenarios/login_with_basic_auth_scenario.dart b/integration_test/scenarios/login_with_basic_auth_scenario.dart index f83ebd081d..3ed430d45b 100644 --- a/integration_test/scenarios/login_with_basic_auth_scenario.dart +++ b/integration_test/scenarios/login_with_basic_auth_scenario.dart @@ -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);