35 Commits

Author SHA1 Message Date
Yarden Eitan
fa7bc44bbf reverting 2019-02-26 11:57:14 -05:00
Yarden Eitan
8076d9fea9 Bumped version number to 78.0.1. 2019-02-26 10:24:29 -05:00
Andrew Overton
419d0cc9ca
[Cocoapods] Fixing Snapshot Tests (#6618)
Initially this PR was supposed to consist of a revert of #6619 (which reverted #6611) with some small tweaks to fix whatever was wrong in #6611. It turned into something else! I had a hard time figuring out a way to both run MDCDragons/MDCCatalog with ⌘R _and_ run snapshot tests within either of the two apps' schemes. The only way I was able to manage it was by abandoning our convention for podspecs (only for snapshot tests), which relies heavily on nested subspecs and test_specs. In its place, I wrote a probably not very idiomatic ruby module that aims to allow for all snapshot testing source files to funnel into a single unit test target but still give us some flexibility in how we configure snapshot tests on a per component basis.

Closes #6700.
2019-02-22 10:17:30 -05:00
Yarden Eitan
992822c764 Merge branch 'release-candidate' into develop 2019-02-21 14:47:54 -05:00
Robert Moore
ef9e18ea7f
{Testing} Create mechanism for test fakes and test data (#6673)
Sets up MDC iOS to allow each component to export "Test fakes" and test data for use by other components when performing tests.  The initial commit includes "test data" for MDCTypographyScheme that uses non-default values for each UIFont.

Contributors writing tests, particularly those that use shared components like schemes, can do so more quickly by accessing test data and test fakes directly from the component rather than having to write custom objects for each test.

**Bonus**
The new typography data has already confirmed the Dialogs bug #6637, which would have been discovered sooner if we didn't rely on the typographic defaults that already matched component defaults.

## Typical Usage

### Build/dependency management systems

**bazel BUILD files:**
```
deps = [
        "//components/schemes/Typography:TestingSupport",
],
```

**CocoaPods Podspec files:**
```ruby
  component.dependency "MaterialComponentsTestingSupport/schemes/Typography"
```

### Source includes

**Swift**
```swift
import MaterialComponentsTestingSupport.MaterialTypographyScheme_TestingSupport
```

**Objective-C**
```objc
#import <MaterialComponentsTestingSupporrt/MaterialTypographyScheme+TestingSupport.h>
```
2019-02-21 13:50:29 -05:00
Yarden Eitan
7aaa270f19 Bumped version number to 78.0.0. 2019-02-20 13:57:48 -05:00
Robert Moore
5ee639cc91
[ButtonBar] Add basic snapshot tests. (#6662)
Add simple layout and theming snapshot tests.
2019-02-20 08:26:00 -05:00
Robert Moore
41612628cc
[Buttons] Add states snapshot tests. (#6639)
Simple snapshot tests for the main UIControlStates.
2019-02-19 11:09:49 -05:00
Robert Moore
65426c86f9
[Slider] Add basic snapshot tests. (#6640)
Adding a few snapshot tests to capture the basic styling/appearance of
Sliders.
2019-02-19 09:26:53 -05:00
Robert Moore
d77f1b3dbb
[Dialogs] Add snapshot tests to MDCAlertController (#6641)
Adds basic snapshot tests to MDCAlertController.

Helped identify #6637
2019-02-19 09:26:25 -05:00
Robert Moore
fb8190d8d4
[BottomAppBar] Add basic snapshot tests. (#6643)
Adding a few simple snapshot tests to capture the default appearance of
the bar.
2019-02-19 09:25:57 -05:00
Randall Li
85d3f991c8 Bumped version number to 77.0.0. 2019-02-13 13:38:03 -05:00
Yarden Eitan
02161e4a76
[Ripple] Fix ripple layout issues with autolayout (#6588)
This fixes a long standing issue in our Ink/Ripple implementation where with auto layout the ink view doesn't fit itself correctly when there is a re-layout, as an example during an orientation change.

There were a few things needed to be fixed/added to be able to make the Ripple work correctly:

1. every time MDCRippleView lays out its view, the MDCRippleLayer sublayers need to receive the new bounds and need to lay out the ripple based on the new bounds.
2. The MDCRippleView should at all times be the size of it's superView.
2. When an MDCRippleLayer exists and needs to be laid out again, it needs to recalculate the ripple layer's position and path. This can happen as an example during a ripple animation when an orientation change occurs. This can also happen when there is a ripple overlay that isn't transient is on a surface and there is an orientation change.
3. Lastly, moving the MDCRippleLayer animations away from `removeOnCompletion = NO;` to having the final visual values be set prior to the animation, solves an issue where a `setNeedsLayout` reverts certain animations (an animation over layer.position) back to their original values and causes the ripple to be incorrectly centered.

Resolves #4533 
Resolves #4603 

Below are provided gifs showing the fix.
Before:
![beforeripplelayout](https://user-images.githubusercontent.com/4066863/52529447-c3640b00-2cbf-11e9-929b-cb69be6d3b27.gif)

After:
![afterripplelayout](https://user-images.githubusercontent.com/4066863/52529450-cb23af80-2cbf-11e9-828b-2dfd5cb2bc96.gif)
2019-02-11 17:22:26 -05:00
Ian Gordon
ac78d824a9 Bumped version number to 76.1.2. 2019-02-08 14:54:24 -05:00
Ian Gordon
fa686995c7 Bump Version 2019-02-07 13:11:55 -05:00
Ian Gordon
e650856240 Bumped version number to 76.1.0. 2019-02-06 17:49:09 -05:00
Robert Moore
68794ae90a Bumped version number to 76.0.0. 2019-01-30 13:17:41 -05:00
Robert Moore
d97f9ce0da
[BottomNavigation] Add snapshot tests. (#6521)
Adds basic snapshot tests for BottomNavigation.

Preparation for #6520
2019-01-30 08:14:15 -05:00
Rob Moore
a7cb1d6a2e Bumped version number to 75.0.1. 2019-01-23 15:33:37 -05:00
Rob Moore
e13c926089 Bumped version number to 75.0.0. 2019-01-23 10:29:37 -05:00
Rob Moore
f843c11da4 Bumped version number to 74.0.0. 2019-01-16 13:16:29 -05:00
Yarden Eitan
a622aa5a8d update changelog and version bump 2019-01-11 15:46:47 -05:00
Yarden Eitan
b9d3045d37 Bumped version number to 73.1.0. 2019-01-08 12:58:43 -05:00
Cody Weaver
914def5fc7
[Snapshot] Move files to src (#6138)
### Context
In working on #6137 I noticed snapshot test helpers were in the private directory but weren't in a _src_ folder. This doesn't align with any of our other components in the _private_ folder.
### The problem
Snapshot test helpers weren't in a _src_ folder.
### The fix
Move the files into _src_.
### Additional notes
I have removed the BUILD file as we will need to add a BUILD file to [ios-snapshot-test-case](https://github.com/uber/ios-snapshot-test-case) before we can add a BUILD file.
2018-12-28 18:41:55 -08:00
rami-a
a4820525cf
[Chips] Add snapshot tests to Chips (#6098)
This change adds snapshot tests to chips for unthemed and the 2 themed variants we have. This initial set of tests only sets the text.

Subsequent PRs will add tests that configure with leading and trailing images.

Part of #6090
2018-12-21 14:20:23 -05:00
Rob Moore
b29796f996 Release bump (again!) 2018-12-19 15:00:07 -05:00
Robert Moore
ced8274866
[TextFields] Incomplete snapshot RTL/Arabic support (#6023)
Adding RTL layout with Arabic text would be helpful for Text Fields
snapshot tests to ensure we don't break RTL layouts. While this change
paves the way for a scalable way to introduce RTL test classes, it does
not correctly trigger layouts for RTL.

Part of #5762
Source of #6022
2018-12-14 15:32:03 -05:00
featherless
73bdc03c2b
[automated] Rename MaterialComponentsAlpha to MaterialComponentsBeta. (#6018)
This is an automated change generated by replacing all instances of MaterialComponentsAlpha with MaterialComponentsBeta. This is not a breaking change because changes to Alpha/Beta components (including renaming them) are not considered breaking.

The MaterialComponentsAlpha podspec was mistakenly named Alpha, when what we meant was more close to Beta. The distinction is that Alpha components are not expected to be used by clients, while Beta components are.
2018-12-14 10:47:31 -05:00
Yarden Eitan
23f14c67a4 Bumped version number to 72.2.0. 2018-12-11 14:03:50 -05:00
Randall Li
47d4ea5e83 Merge branch 'release-candidate' into develop 2018-12-10 11:26:12 -05:00
Randall Li
eccdd7cf82 Bumped version number to 72.1.0. 2018-12-07 15:09:28 -05:00
Robert Moore
495a29ca69
[TextFields] Add Outlined snapshot tests (#5939)
Adding Snapshot tests for the MDCTextInputControllerOutlined styling.

Part of #5762
2018-12-07 12:06:20 -05:00
Randall Li
80c32e075f Bumped version number to 72.0.1. 2018-12-07 11:07:53 -05:00
Randall Li
2a334c409a Bumped version number to 72.0.0. 2018-12-06 11:19:10 -05:00
rami-a
615a0e4061
Snapshot Testing Proof of Concept (#5887)
* Snapshot Testing Proof of Concept (#5754)

### The problem
We currently do not have UI tests on a component level. Integrating snapshot tests would allow us to have peace of mind with each PR that it isn't going to introduce any changes to the UI unless its intended to.

### The solution
* Integrate `ios-snapshot-test-case` pod to handle generating and diffing images of components. 
* Integrate `git-lfs` to handle storage of the goldens.

This PR creates one test to showcase the ability to do snapshot tests. Upon merging this PR, you must install git-lfs in order to properly have the images pulled down. The 3 steps to do this:
1. `brew install git-lfs`
2. `git lfs install`
3. `git lfs pull`

Additionally, the golden is generated using an iOS 11 simulator at 2x scale so that the kokoro jobs are happy.

### Related bugs
Closes #5740

### Difference from #5754 
**Note:** This is a re-revert of #5754 that aims to fix issues with Travis CI by ensuring the snapshot test only runs on a single iOS version. I've opened #5888 to expand on this in the future. A few things changed in the approach in this PR:
 * We only run the snapshot test for iOS 11.2.0 until we can have an elegant solution for supporting multiple OS''s (see #5888)
 * The snapshot tests now live in their own test target to avoid issues with having to require an App host for all tests.
* Additionally, a dummy swift file was required for compilation of this new test target (see https://forums.developer.apple.com/thread/88451 for context)
2018-12-05 09:49:41 -05:00