4 Commits

Author SHA1 Message Date
Huy Nguyen
69a915356d [ASStackLayoutSpec] Fix interitem spacing not being reset on new lines and add snapshot tests #trivial (#491)
* Add snapshot tests for interitem and interline spacings of stack spec

* Improve comment

* Make sure item spacings are properly considered and reset on new lines, snapshot tests included
2017-08-06 13:20:33 +01:00
Huy Nguyen
18c906aa5c Some bug fixes for ASStackLayoutSpec: (#3153)
- Avoid returning a NaN flexShrinkAdjustment.
- Bail early (instead of assert) if a line has a positive `flexFactorSum` but then no flexible item can be found via flex adjustments, for example because the flexible items have zero size.
- Continue flexing other lines when one line is inflexible.
- Add unit test for the first 2 fixes.
2017-03-09 13:35:17 -08:00
Huy Nguyen
421a896713 Clean up snapshot test cases (#3091)
* Clean up snapshot test cases:
- Drop 32bit snapshots
- Update iOS 9 snapshots and move some others to the correct directory
- Remove `setUp` overrides in subclasses of `ASLayoutSpecSnapshotTestCase` that set `recordMode` flag. Doing so in multiple places make it difficult to enable/dis
able the flag for all layout spec test cases. It can always be overridden locally if need
to.
- Fix BUCK build

* Fix testThatOnDidLoadThrowsIfCalledOnLoadedOffMain of ASDisplayNodeTests
2017-02-27 09:14:40 -08:00
Adlai Holler
73ca6ab514 Shuffle & Cleanup Stuff (#3080) 2017-02-26 18:14:13 -08:00