fix(jellyfin): a tap on someone a server shows names them, the password asked

Jellyfin v10.11 and later no longer say which accounts have a password
(HasPassword is always true, jellyfin/jellyfin#14950), so the demo's
account was listed as "With a password" and only named in the form.
Every listed account is now named in the form with the password field
focused, which says to leave it empty for an account without one, as
Jellyfin's own apps do; the line under each account goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-14 01:52:42 +02:00
commit 107160cac4
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -238,15 +238,19 @@ void main() {
group('a Jellyfin server the instance suggests (decided 2026-10-13)', () {
setUp(() {
jellyfin.shownUsers = const [
JellyfinPublicUser(id: 'user-2', name: 'Demo', hasPassword: false),
JellyfinPublicUser(id: 'user-1', name: 'mika', hasPassword: true),
];
jellyfin
..shownUsers = const [
JellyfinPublicUser(id: 'user-2', name: 'Demo'),
JellyfinPublicUser(id: 'user-1', name: 'mika'),
]
..withoutPassword = const {'Demo'};
});
testWidgets('Add material offers it before signing in; the sign-in '
"finds it by itself and lists the server's public people, one "
'without a password signed in with a tap', (tester) async {
'without a password signed in with the password left empty', (
tester,
) async {
await show(
tester,
RoutePaths.studyset('japanese'),
@ -262,13 +266,16 @@ void main() {
expect(find.text('Demo'), findsOneWidget);
await tester.tap(find.text('Demo'));
await tester.pumpAndSettle();
expect(store.kept?.account, isNull);
await tester.tap(find.text('Sign in'));
await tester.pumpAndSettle();
expect(find.text('Libraries'), findsOneWidget);
expect(store.kept?.account?.userName, 'Demo');
});
testWidgets('one with a password is named in the form, which asks for '
'it', (tester) async {
testWidgets('a tap names one in the form, which asks for the '
'password', (tester) async {
await show(
tester,
RoutePaths.jellyfin('japanese'),
@ -285,6 +292,13 @@ void main() {
.text,
'mika',
);
expect(
tester
.widget<TextField>(find.widgetWithText(TextField, 'Password'))
.focusNode!
.hasFocus,
isTrue,
);
expect(store.kept?.account, isNull);
});
});