fix(studyset): Progress is always one of a studyset's parts

Progress joined the switch only once the studyset's reviews were read
and showed something studied, so the switch grew from two parts to
three after a moment. It is now always there, saying there is nothing
learnt yet where nothing was studied, as in Vaia; the switch never
changes as a studyset opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-12 19:32:30 +02:00
commit ceb7ca1a1e
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1682,15 +1682,18 @@ void main() {
);
});
testWidgets('Progress shows once a card in the studyset was studied: how '
'much is learnt, what is due, and the study time this week', (
tester,
) async {
testWidgets('Progress is always there, nothing yet before anything is '
'studied; then how much is learnt, what is due, and the study time '
'this week', (tester) async {
stored('japanese', 'Japanese');
final id = await card('japanese', '猫');
await showApp(tester, location: RoutePaths.studyset('japanese'));
await tester.pumpAndSettle();
expect(parts(tester), ['Material', 'Study plan']);
expect(parts(tester), ['Material', 'Progress', 'Study plan']);
await openPart(tester, 'Progress');
expect(find.text('0 of 1 card'), findsOneWidget);
expect(find.text('0 min'), findsOneWidget);
await openPart(tester, 'Material');
await PersonScope.of(
tester.element(find.byType(StudysetScreen)),