-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into PAINTROID-662, fix merge conflics, make f…
…ormat
- Loading branch information
Showing
43 changed files
with
1,508 additions
and
467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.PHONY: pubget build watch clean test analyze test-unit test-widget test-all all | ||
|
||
clean: | ||
flutter clean | ||
|
||
pubget: | ||
flutter pub get | ||
|
||
build: | ||
dart run build_runner build --delete-conflicting-outputs | ||
|
||
run: | ||
flutter run | ||
|
||
all: clean pubget build run | ||
|
||
watch: | ||
dart run build_runner watch --delete-conflicting-outputs | ||
|
||
analyze: | ||
flutter analyze | ||
|
||
test-unit: | ||
flutter test test/unit | ||
|
||
test-widget: | ||
flutter test test/widget | ||
|
||
test-all: | ||
flutter test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,3 @@ analyzer: | |
exclude: | ||
- lib/**.pb*.dart | ||
- lib/data/*.g.dart | ||
- test/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
packages/features/workspace_screen/test/hand_tool_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_localizations/flutter_localizations.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
import 'package:l10n/l10n.dart'; | ||
import 'package:tools/tools.dart'; | ||
import 'package:workspace_screen/workspace_screen.dart'; | ||
|
||
import 'bottom_nav_bar_interactions.dart'; | ||
import 'interactive_viewer_interactions.dart'; | ||
|
||
void main() { | ||
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
late Widget sut; | ||
|
||
setUp(() { | ||
sut = ProviderScope( | ||
overrides: [ | ||
IDeviceService.sizeProvider | ||
.overrideWith((ref) => Future.value(const Size(600, 600))) | ||
], | ||
child: const MaterialApp( | ||
home: WorkspaceScreen(), | ||
localizationsDelegates: [ | ||
AppLocalizations.delegate, | ||
GlobalMaterialLocalizations.delegate, | ||
], | ||
), | ||
); | ||
}); | ||
|
||
testWidgets('Pan bottom left', (WidgetTester tester) async { | ||
await tester.pumpWidget(sut); | ||
await tester.pumpAndSettle(); | ||
|
||
final bottomNavBarInteractions = BottomNavBarInteractions(tester); | ||
final interactiveViewerInteractions = InterActiveViewerInteractions(tester); | ||
await bottomNavBarInteractions.selectTool(ToolData.HAND); | ||
await interactiveViewerInteractions.panAndVerify(const Offset(-50, 50)); | ||
}); | ||
|
||
testWidgets('Pan bottom right', (WidgetTester tester) async { | ||
await tester.pumpWidget(sut); | ||
await tester.pumpAndSettle(); | ||
|
||
final bottomNavBarInteractions = BottomNavBarInteractions(tester); | ||
final interactiveViewerInteractions = InterActiveViewerInteractions(tester); | ||
await bottomNavBarInteractions.selectTool(ToolData.HAND); | ||
await interactiveViewerInteractions.panAndVerify(const Offset(50, 50)); | ||
}); | ||
|
||
testWidgets('Pan top left', (WidgetTester tester) async { | ||
await tester.pumpWidget(sut); | ||
await tester.pumpAndSettle(); | ||
|
||
final bottomNavBarInteractions = BottomNavBarInteractions(tester); | ||
final interactiveViewerInteractions = InterActiveViewerInteractions(tester); | ||
await bottomNavBarInteractions.selectTool(ToolData.HAND); | ||
await interactiveViewerInteractions.panAndVerify(const Offset(-50, -50)); | ||
}); | ||
|
||
testWidgets('Pan top right', (WidgetTester tester) async { | ||
await tester.pumpWidget(sut); | ||
await tester.pumpAndSettle(); | ||
|
||
final bottomNavBarInteractions = BottomNavBarInteractions(tester); | ||
final interactiveViewerInteractions = InterActiveViewerInteractions(tester); | ||
await bottomNavBarInteractions.selectTool(ToolData.HAND); | ||
await interactiveViewerInteractions.panAndVerify(const Offset(50, -50)); | ||
}); | ||
} |
Oops, something went wrong.