fixed failing test

This commit is contained in:
2026-07-23 14:22:32 +02:00
parent 3493cf8617
commit 624c5512a6
@@ -81,7 +81,22 @@ void main() {
testWidgets('tapping a toolbar button switches the shared mode', (
tester,
) async {
await tester.pumpWidget(_host(_tableDoc()));
// The mode toolbar only renders once the table overflows its width — at the
// full test surface the fixture table fits and the toggle stays hidden. Pin
// a narrow width so it overflows, then let the post-frame overflow
// measurement settle so the toolbar is present before tapping.
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: SingleChildScrollView(
child: Center(
child: SizedBox(width: 200, child: PmDocumentView(doc: _tableDoc())),
),
),
),
),
);
await tester.pumpAndSettle();
expect(pmTableMode.value, PmTableMode.scroll);
await tester.tap(find.byTooltip('Spalten umbrechen').first);