You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fluffychat/integration_test/flows/basic_messaging.dart

30 lines
901 B
Dart

// 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/material.dart';
import 'package:flutter_test/flutter_test.dart';
import '../utils/fluffy_chat_tester.dart';
import 'auth_flows.dart';
import 'chat_flows.dart';
Future<void> basicMessaging(WidgetTester widgetTester) => widgetTester
.startFluffyChatTest()
.then((tester) => tester._basicMessaging());
extension on FluffyChatTester {
Future<void> _basicMessaging() async {
await ensureLoggedIn();
await ensureGroupChatCreated();
await tapOn(ChatFlows.groupChatName);
const testMessage = 'Hello from integration test!';
await enterText(Key('chat_input_field'), testMessage);
await tapOn(Key('send_button'));
await waitFor(testMessage);
await goBack();
}
}