Initial commit
This commit is contained in:
37
integration_test/flows/multi_account.dart
Normal file
37
integration_test/flows/multi_account.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
// SPDX-FileCopyrightText: 2019-Present Christian Kußowski
|
||||
// SPDX-FileCopyrightText: 2019-Present Contributors to FluffyChat
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
|
||||
import '../data/environment_constants.dart';
|
||||
import '../utils/tatu_chat_tester.dart';
|
||||
import 'auth_flows.dart';
|
||||
|
||||
Future<void> multiAccount(WidgetTester widgetTester) => widgetTester
|
||||
.startTatuChatTest()
|
||||
.then((tester) => tester._multiAccountAndNotifications());
|
||||
|
||||
extension on TatuChatTester {
|
||||
Future<void> _multiAccountAndNotifications() async {
|
||||
await ensureLoggedIn();
|
||||
|
||||
// Login user 2
|
||||
await tapOn(Key('accounts_and_settings_buttons'));
|
||||
await tapOn('Add account');
|
||||
await login(username: user2Name, password: user2Pw);
|
||||
await initCryptoIdentity(username: user2Name);
|
||||
|
||||
// Logout user 2
|
||||
await tapOn(Key('accounts_and_settings_buttons'));
|
||||
await tapOn(user2Name);
|
||||
await tapOn(Key('accounts_and_settings_buttons'));
|
||||
await tapOn('Settings');
|
||||
await scrollUntilVisible('Logout');
|
||||
await tapOn('Logout');
|
||||
await tapOn(Key('ok_cancel_alert_dialog_ok_button'));
|
||||
await waitFor('One of your clients has been logged out');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user