refactor: Switch from maestro to flutter integration tests

This commit is contained in:
Christian Kußowski 2026-03-19 16:25:20 +01:00
commit 0a42f28cf1
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
34 changed files with 495 additions and 727 deletions

View file

@ -96,104 +96,98 @@ class SignInPage extends StatelessWidget {
itemBuilder: (context, i) {
final server = publicHomeservers[i];
final website = server.website;
return Semantics(
identifier: 'homeserver_tile_$i',
child: RadioListTile(
value: server,
enabled:
state.loginLoading.connectionState !=
ConnectionState.waiting,
title: Row(
children: [
Expanded(
child: Text(server.name ?? 'Unknown'),
),
if (website != null)
SizedBox.square(
dimension: 32,
child: IconButton(
icon: const Icon(
Icons.open_in_new_outlined,
size: 16,
),
onPressed: () =>
launchUrlString(website),
return RadioListTile(
value: server,
enabled:
state.loginLoading.connectionState !=
ConnectionState.waiting,
title: Row(
children: [
Expanded(
child: Text(server.name ?? 'Unknown'),
),
if (website != null)
SizedBox.square(
dimension: 32,
child: IconButton(
icon: const Icon(
Icons.open_in_new_outlined,
size: 16,
),
onPressed: () =>
launchUrlString(website),
),
],
),
subtitle: Column(
spacing: 4.0,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (server.features?.isNotEmpty == true)
Wrap(
spacing: 4.0,
runSpacing: 4.0,
children: [
...?server.languages?.map(
(language) => Material(
borderRadius:
BorderRadius.circular(
AppConfig.borderRadius,
),
color: theme
.colorScheme
.tertiaryContainer,
child: Padding(
padding:
const EdgeInsets.symmetric(
horizontal: 6.0,
vertical: 3.0,
),
child: Text(
language,
style: TextStyle(
fontSize: 10,
color: theme
.colorScheme
.onTertiaryContainer,
),
),
),
),
),
...server.features!.map(
(feature) => Material(
borderRadius:
BorderRadius.circular(
AppConfig.borderRadius,
),
color: theme
.colorScheme
.secondaryContainer,
child: Padding(
padding:
const EdgeInsets.symmetric(
horizontal: 6.0,
vertical: 3.0,
),
child: Text(
feature,
style: TextStyle(
fontSize: 10,
color: theme
.colorScheme
.onSecondaryContainer,
),
),
),
),
),
],
),
Text(
server.description ??
'A matrix homeserver',
),
],
),
],
),
subtitle: Column(
spacing: 4.0,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (server.features?.isNotEmpty == true)
Wrap(
spacing: 4.0,
runSpacing: 4.0,
children: [
...?server.languages?.map(
(language) => Material(
borderRadius: BorderRadius.circular(
AppConfig.borderRadius,
),
color: theme
.colorScheme
.tertiaryContainer,
child: Padding(
padding:
const EdgeInsets.symmetric(
horizontal: 6.0,
vertical: 3.0,
),
child: Text(
language,
style: TextStyle(
fontSize: 10,
color: theme
.colorScheme
.onTertiaryContainer,
),
),
),
),
),
...server.features!.map(
(feature) => Material(
borderRadius: BorderRadius.circular(
AppConfig.borderRadius,
),
color: theme
.colorScheme
.secondaryContainer,
child: Padding(
padding:
const EdgeInsets.symmetric(
horizontal: 6.0,
vertical: 3.0,
),
child: Text(
feature,
style: TextStyle(
fontSize: 10,
color: theme
.colorScheme
.onSecondaryContainer,
),
),
),
),
),
],
),
Text(
server.description ?? 'A matrix homeserver',
),
],
),
);
},
@ -217,29 +211,26 @@ class SignInPage extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SafeArea(
child: Semantics(
identifier: 'connect_to_homeserver_button',
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: theme.colorScheme.primary,
foregroundColor: theme.colorScheme.onPrimary,
),
onPressed:
state.loginLoading.connectionState ==
ConnectionState.waiting
? null
: () => connectToHomeserverFlow(
selectedHomserver,
context,
viewModel.setLoginLoading,
signUp,
),
child:
state.loginLoading.connectionState ==
ConnectionState.waiting
? const CircularProgressIndicator.adaptive()
: Text(L10n.of(context).continueText),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: theme.colorScheme.primary,
foregroundColor: theme.colorScheme.onPrimary,
),
onPressed:
state.loginLoading.connectionState ==
ConnectionState.waiting
? null
: () => connectToHomeserverFlow(
selectedHomserver,
context,
viewModel.setLoginLoading,
signUp,
),
child:
state.loginLoading.connectionState ==
ConnectionState.waiting
? const CircularProgressIndicator.adaptive()
: Text(L10n.of(context).continueText),
),
),
),