TF-3631 E2E log out
This commit is contained in:
@@ -88,4 +88,13 @@ class MailboxMenuRobot extends CoreRobot {
|
||||
|
||||
return inboxCount;
|
||||
}
|
||||
|
||||
Future<void> tapSignOut() async {
|
||||
await $.scrollUntilVisible(finder: $(AppLocalizations().sign_out));
|
||||
await $(AppLocalizations().sign_out).tap();
|
||||
}
|
||||
|
||||
Future<void> confirmSignOut() async {
|
||||
await $(AppLocalizations().yesLogout).tap();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import 'package:tmail_ui_user/features/starting_page/presentation/twake_welcome/twake_welcome_view.dart';
|
||||
|
||||
import '../../base/base_test_scenario.dart';
|
||||
import '../../robots/mailbox_menu_robot.dart';
|
||||
import '../../robots/thread_robot.dart';
|
||||
|
||||
class LogOutScenario extends BaseTestScenario {
|
||||
const LogOutScenario(super.$);
|
||||
|
||||
@override
|
||||
Future<void> runTestLogic() async {
|
||||
final threadRobot = ThreadRobot($);
|
||||
final mailboxMenuRobot = MailboxMenuRobot($);
|
||||
|
||||
await threadRobot.openMailbox();
|
||||
await mailboxMenuRobot.openSetting();
|
||||
await mailboxMenuRobot.tapSignOut();
|
||||
await mailboxMenuRobot.confirmSignOut();
|
||||
|
||||
await _expectTwakeWelcomeViewVisible();
|
||||
}
|
||||
|
||||
Future<void> _expectTwakeWelcomeViewVisible() async {
|
||||
await expectViewVisible($(TwakeWelcomeView));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import '../../base/test_base.dart';
|
||||
import '../../scenarios/misc/log_out_scenario.dart';
|
||||
|
||||
void main() {
|
||||
TestBase().runPatrolTest(
|
||||
description: 'Should see Twake welcome screen when log out successfully',
|
||||
scenarioBuilder: ($) => LogOutScenario($),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user