cover_image_test.dart 900 B

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:flutter_test/flutter_test.dart';
  2. import 'package:integration_test/integration_test.dart';
  3. import 'util/util.dart';
  4. void main() {
  5. IntegrationTestWidgetsFlutterBinding.ensureInitialized();
  6. group('cover image', () {
  7. const location = 'cover_image';
  8. setUp(() async {
  9. await TestFolder.cleanTestLocation(location);
  10. await TestFolder.setTestLocation(location);
  11. });
  12. tearDown(() async {
  13. await TestFolder.cleanTestLocation(location);
  14. });
  15. tearDownAll(() async {
  16. await TestFolder.cleanTestLocation(null);
  17. });
  18. testWidgets(
  19. 'hovering on cover image will display change and delete cover image buttons',
  20. (tester) async {
  21. await tester.initializeAppFlowy();
  22. await tester.tapGoButton();
  23. await tester.hoverOnCoverPluginAddButton();
  24. tester.expectToSeePluginAddCoverAndIconButton();
  25. });
  26. });
  27. }