diff --git a/test/widget/prosemirror/pm_table_view_test.dart b/test/widget/prosemirror/pm_table_view_test.dart index 12470b8..46ecf2a 100644 --- a/test/widget/prosemirror/pm_table_view_test.dart +++ b/test/widget/prosemirror/pm_table_view_test.dart @@ -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);