Skip to content

Conversation

@gspencergoog
Copy link
Contributor

Description

This contains the test changes for adding TargetPlatform.macOS, which was done in #43457.

The main goal of this PR is to enable tests in the material library that are currently running only on iOS to also run on macOS, but only for the tests where that makes sense. For instance, we don't run any of the haptic feedback tests on macOS.

Related Issues

Tests

  • Converts most iOS-only tests to be variant tests that test both iOS and macOS.

Breaking Change

  • No, this is not a breaking change.

@fluttergithubbot fluttergithubbot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jan 16, 2020
@gspencergoog gspencergoog changed the title Macos tests material Add macOS Tests (Part 2: Material) Jan 16, 2020
@gspencergoog gspencergoog mentioned this pull request Jan 16, 2020
1 task
@gspencergoog gspencergoog requested a review from justinmc January 16, 2020 21:22
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

expect(topAfterScroll.dy, lessThan(10.0));
expect(topAfterScroll.dy, greaterThan(-50.0));
});
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android, TargetPlatform.iOS, TargetPlatform.macOS }));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool that this allows you to remove all of the platform specific code above 👍

expect(find.byType(CupertinoButton), findsNothing);
});

// TODO(gspencergoog): Add in TargetPlatform.macOS in the line below when we figure out what global state is leaking.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that's scary. No ideas off the top of my head.

@gspencergoog gspencergoog merged commit 3dbe90e into flutter:master Jan 17, 2020
@gspencergoog gspencergoog deleted the macos_tests_material branch March 13, 2020 16:09
@lock
Copy link

lock bot commented Apr 2, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@lock lock bot locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants