shader update, fixed driver
This commit is contained in:
parent
6eece5d427
commit
4eb6f948e8
5 changed files with 17 additions and 11 deletions
File diff suppressed because one or more lines are too long
1
shaders_3.0.0.sksl.json
Normal file
1
shaders_3.0.0.sksl.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -95,7 +95,7 @@ void configureCollectionVisibility(AppDebugAction action) {
|
||||||
test('configure collection visibility', () async {
|
test('configure collection visibility', () async {
|
||||||
await driver.tapKeyAndWait('appbar-leading-button');
|
await driver.tapKeyAndWait('appbar-leading-button');
|
||||||
final verticalPageView = find.byValueKey('drawer-scrollview');
|
final verticalPageView = find.byValueKey('drawer-scrollview');
|
||||||
await driver.scroll(verticalPageView, 0, -600, const Duration(milliseconds: 400));
|
await driver.scrollY(verticalPageView, -600);
|
||||||
await driver.tapKeyAndWait('drawer-debug');
|
await driver.tapKeyAndWait('drawer-debug');
|
||||||
|
|
||||||
await driver.tapKeyAndWait('appbar-menu-button');
|
await driver.tapKeyAndWait('appbar-menu-button');
|
||||||
|
@ -146,13 +146,13 @@ void info() {
|
||||||
test('3. Info (basic), 4. Info (metadata)', () async {
|
test('3. Info (basic), 4. Info (metadata)', () async {
|
||||||
final verticalPageView = find.byValueKey('vertical-pageview');
|
final verticalPageView = find.byValueKey('vertical-pageview');
|
||||||
|
|
||||||
await driver.scroll(verticalPageView, 0, -600, const Duration(milliseconds: 400));
|
await driver.scrollY(verticalPageView, -600);
|
||||||
// tiles may take time to load
|
// tiles may take time to load
|
||||||
await Future.delayed(const Duration(seconds: 5));
|
await Future.delayed(const Duration(seconds: 5));
|
||||||
|
|
||||||
await _takeScreenshot(driver, '3');
|
await _takeScreenshot(driver, '3');
|
||||||
|
|
||||||
await driver.scroll(verticalPageView, 0, -680, const Duration(milliseconds: 600));
|
await driver.scrollY(verticalPageView, -680);
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
|
||||||
final gpsTile = find.descendant(
|
final gpsTile = find.descendant(
|
||||||
|
|
|
@ -60,7 +60,7 @@ void agreeToTerms() {
|
||||||
// delay to avoid flaky failures when widget binding is not ready from the start
|
// delay to avoid flaky failures when widget binding is not ready from the start
|
||||||
await Future.delayed(const Duration(seconds: 3));
|
await Future.delayed(const Duration(seconds: 3));
|
||||||
|
|
||||||
await driver.scroll(find.text('Terms of Service'), 0, -300, const Duration(milliseconds: 500));
|
await driver.scrollY(find.text('Terms of Service'), -300);
|
||||||
|
|
||||||
await driver.tap(find.byValueKey('apps-checkbox'));
|
await driver.tap(find.byValueKey('apps-checkbox'));
|
||||||
await driver.tap(find.byValueKey('terms-checkbox'));
|
await driver.tap(find.byValueKey('terms-checkbox'));
|
||||||
|
@ -189,7 +189,7 @@ void showViewer() {
|
||||||
void goToNextImage() {
|
void goToNextImage() {
|
||||||
test('[viewer] show next image', () async {
|
test('[viewer] show next image', () async {
|
||||||
final horizontalPageView = find.byValueKey('horizontal-pageview');
|
final horizontalPageView = find.byValueKey('horizontal-pageview');
|
||||||
await driver.scroll(horizontalPageView, -600, 0, const Duration(milliseconds: 400));
|
await driver.scrollX(horizontalPageView, -500);
|
||||||
await Future.delayed(const Duration(seconds: 2));
|
await Future.delayed(const Duration(seconds: 2));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -228,11 +228,11 @@ void showInfoMetadata() {
|
||||||
final verticalPageView = find.byValueKey('vertical-pageview');
|
final verticalPageView = find.byValueKey('vertical-pageview');
|
||||||
|
|
||||||
print('* scroll down to info');
|
print('* scroll down to info');
|
||||||
await driver.scroll(verticalPageView, 0, -600, const Duration(milliseconds: 400));
|
await driver.scrollY(verticalPageView, -600);
|
||||||
await Future.delayed(const Duration(seconds: 2));
|
await Future.delayed(const Duration(seconds: 2));
|
||||||
|
|
||||||
print('* scroll down to metadata details');
|
print('* scroll down to metadata details');
|
||||||
await driver.scroll(verticalPageView, 0, -800, const Duration(milliseconds: 600));
|
await driver.scrollY(verticalPageView, -800);
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
|
||||||
print('* toggle GPS metadata');
|
print('* toggle GPS metadata');
|
||||||
|
@ -246,7 +246,7 @@ void showInfoMetadata() {
|
||||||
await driver.waitUntilNoTransientCallbacks();
|
await driver.waitUntilNoTransientCallbacks();
|
||||||
|
|
||||||
print('* scroll up to show app bar');
|
print('* scroll up to show app bar');
|
||||||
await driver.scroll(verticalPageView, 0, 100, const Duration(milliseconds: 400));
|
await driver.scrollY(verticalPageView, 100);
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
|
||||||
print('* back to image');
|
print('* back to image');
|
||||||
|
@ -256,7 +256,7 @@ void showInfoMetadata() {
|
||||||
|
|
||||||
void scrollOffImage() {
|
void scrollOffImage() {
|
||||||
test('[viewer] scroll off', () async {
|
test('[viewer] scroll off', () async {
|
||||||
await driver.scroll(find.byValueKey('image_view'), 0, 800, const Duration(milliseconds: 600));
|
await driver.scrollY(find.byValueKey('image_view'), 800);
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,13 @@ import 'adb_utils.dart';
|
||||||
extension ExtraFlutterDriver on FlutterDriver {
|
extension ExtraFlutterDriver on FlutterDriver {
|
||||||
static const doubleTapDelay = Duration(milliseconds: 100); // in [kDoubleTapMinTime = 40 ms, kDoubleTapTimeout = 300 ms]
|
static const doubleTapDelay = Duration(milliseconds: 100); // in [kDoubleTapMinTime = 40 ms, kDoubleTapTimeout = 300 ms]
|
||||||
|
|
||||||
Future doubleTap(SerializableFinder finder, {Duration? timeout}) async {
|
// scrolling is ineffective when duration is too short for the spatial delta
|
||||||
|
Future<void> scrollX(SerializableFinder finder, double dx) => scroll(finder, dx, 0, Duration(milliseconds: dx.toInt().abs() * 2));
|
||||||
|
|
||||||
|
// scrolling is ineffective when duration is too short for the spatial delta
|
||||||
|
Future<void> scrollY(SerializableFinder finder, double dy) => scroll(finder, 0, dy, Duration(milliseconds: dy.toInt().abs() * 2));
|
||||||
|
|
||||||
|
Future<void> doubleTap(SerializableFinder finder, {Duration? timeout}) async {
|
||||||
await tap(finder, timeout: timeout);
|
await tap(finder, timeout: timeout);
|
||||||
await Future.delayed(doubleTapDelay);
|
await Future.delayed(doubleTapDelay);
|
||||||
await tap(finder, timeout: timeout);
|
await tap(finder, timeout: timeout);
|
||||||
|
|
Loading…
Reference in a new issue