Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@Skip(
'This file is skipped due to a cross-import that needs to be fixed. Tracked in https://github.com/flutter/flutter/issues/177028.',
)
import 'package:cupertino_ui/cupertino_ui.dart';
import 'package:flutter/foundation.dart';
import 'package:material_ui/material_ui.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import '../widgets/clipboard_utils.dart';
import '../widgets/text_selection_toolbar_utils.dart';
import 'package:material_ui/material_ui.dart';

import 'clipboard_utils.dart';
import 'editable_text_utils.dart';
import 'live_text_utils.dart';
import 'text_selection_toolbar_utils.dart';

void main() {
final mockClipboard = MockClipboard();
Expand Down
38 changes: 38 additions & 0 deletions packages/material_ui/test/text_selection_toolbar_utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
Comment thread
QuncCccccc marked this conversation as resolved.

Finder findMaterialOverflowNextButton() {
return find.byKey(StandardComponentType.moreButton.key);
}

Finder findMaterialOverflowBackButton() {
return find.byKey(StandardComponentType.backButton.key);
}

Future<void> tapMaterialOverflowNextButton(WidgetTester tester) async {
await tester.tapAt(tester.getCenter(findMaterialOverflowNextButton()));
await tester.pumpAndSettle();
}

Finder findCupertinoOverflowNextButton() {
return find.byWidgetPredicate((Widget widget) {
return widget is CustomPaint &&
'${widget.painter?.runtimeType}' == '_RightCupertinoChevronPainter';
});
}

Finder findCupertinoOverflowBackButton() {
return find.byWidgetPredicate((Widget widget) {
return widget is CustomPaint &&
'${widget.painter?.runtimeType}' == '_LeftCupertinoChevronPainter';
});
}

Future<void> tapCupertinoOverflowNextButton(WidgetTester tester) async {
await tester.tapAt(tester.getCenter(findCupertinoOverflowNextButton()));
await tester.pumpAndSettle();
}
Loading