fixed failing test
This commit is contained in:
@@ -81,7 +81,22 @@ void main() {
|
|||||||
testWidgets('tapping a toolbar button switches the shared mode', (
|
testWidgets('tapping a toolbar button switches the shared mode', (
|
||||||
tester,
|
tester,
|
||||||
) async {
|
) 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);
|
expect(pmTableMode.value, PmTableMode.scroll);
|
||||||
|
|
||||||
await tester.tap(find.byTooltip('Spalten umbrechen').first);
|
await tester.tap(find.byTooltip('Spalten umbrechen').first);
|
||||||
|
|||||||
Reference in New Issue
Block a user