TF-3631 E2E log out
This commit is contained in:
@@ -88,4 +88,13 @@ class MailboxMenuRobot extends CoreRobot {
|
|||||||
|
|
||||||
return inboxCount;
|
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($),
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import 'dart:convert';
|
|||||||
import 'package:core/presentation/extensions/color_extension.dart';
|
import 'package:core/presentation/extensions/color_extension.dart';
|
||||||
import 'package:core/utils/app_logger.dart';
|
import 'package:core/utils/app_logger.dart';
|
||||||
import 'package:core/utils/html/html_utils.dart';
|
import 'package:core/utils/html/html_utils.dart';
|
||||||
|
import 'package:core/utils/platform_info.dart';
|
||||||
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -318,7 +319,9 @@ class RichTextWebController extends GetxController {
|
|||||||
void onClose() {
|
void onClose() {
|
||||||
menuParagraphController.dispose();
|
menuParagraphController.dispose();
|
||||||
menuOrderListController.dispose();
|
menuOrderListController.dispose();
|
||||||
editorController.clear();
|
if (PlatformInfo.isWeb || editorController.editorController != null) {
|
||||||
|
editorController.clear();
|
||||||
|
}
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user