This repository has been archived by the owner on Aug 16, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD support for animated flag ADD started with writing Snapshot test - WIP ADD Snapshot for Snapshot test, but current snapshot is not waht we want
- Loading branch information
1 parent
60eba94
commit 321d7a3
Showing
3 changed files
with
43 additions
and
6 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
Binary file added
BIN
+23 KB
...be_positioned_as_wanted__should_be_able_to_scroll_horizontally_to_target@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
321d7a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MP0w Can you tell me why line 2 fails, if I comment line 1 out? (in your test
should be able to scroll horizontally
above)expect(vc).to(haveValidSnapshot())
expect(scrollView).to(scroll(.horizontal))
expect(scrollView).toNot(scroll(.vertical))
321d7a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx to @ChristianOrgler, we found the answer.
The view has to be layout first, that's why we have to call view.layoutIfNeeded() before we can take correct snapshots for the scrolling tests. I will add this to some of your tests, too. That way some expectations do not rely on taking a snapshot first.
321d7a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I wonder if we can do all without any calculation: you get a CGPoint using minX/Y maxX/Y or mid and then use the UiView method to convert that point to the stack's space