Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollView without content, scroll to content edge issue simulation. #631

Merged
merged 1 commit into from
Sep 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Tests/FunctionalTests/Sources/FTRScrollViewTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ - (void)setUp {
[self openTestViewNamed:@"Scroll Views"];
}

- (void)DISABLED_testFreezingScrollView {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this test disabled?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. This is replicating an issue for us. Can you link the issue as well / create one if not already there?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should block this PR on that?

Feel free to create and link one to this Adarsh.

[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(@"Freezing Scroll View")] performAction:grey_scrollToContentEdge(kGREYContentEdgeTop)];
}

- (void)testScrollToTopEdge {
id<GREYMatcher> matcher = grey_allOf(grey_accessibilityLabel(@"Label 2"),
grey_interactable(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
@property(retain, nonatomic) IBOutlet UIView *blockView;
@property(retain, nonatomic) IBOutlet UITextField *topTextbox;
@property(retain, nonatomic) UIAccessibilityElement *accessibilityElement;
@property (weak, nonatomic) IBOutlet UIScrollView *freezingScrollView;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ - (void)viewDidLoad {
[self.scrollview addSubview:_squareView];
self.scrollview.delegate = self;
self.topTextbox.delegate = self;

self.freezingScrollView.isAccessibilityElement = YES;
self.freezingScrollView.accessibilityLabel = @"Freezing Scroll View";

// Required to disable the swipe from edge to go back gesture as it can interfere with tests.
[self.navigationItem setHidesBackButton:YES animated:NO];
Expand Down
10 changes: 10 additions & 0 deletions Tests/FunctionalTests/TestRig/Sources/FTRScrollViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<connections>
<outlet property="blockView" destination="nuR-Jb-FaD" id="qSh-fP-zy4"/>
<outlet property="bottomScrollView" destination="V9g-g7-db5" id="FeH-5p-YD4"/>
<outlet property="freezingScrollView" destination="ocp-2V-YZR" id="scv-CJ-J4f"/>
<outlet property="infiniteScrollView" destination="td9-NB-ySB" id="1hm-gw-wSx"/>
<outlet property="scrollview" destination="5d8-Eo-Ig8" id="uuc-2e-jvK"/>
<outlet property="topTextbox" destination="P3e-SN-PxX" id="sYS-qn-3Bw"/>
Expand Down Expand Up @@ -428,6 +429,12 @@
<rect key="frame" x="0.0" y="488" width="1024" height="123"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</view>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ocp-2V-YZR">
<rect key="frame" x="16" y="439" width="343" height="128"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="Hzo-CS-qZL"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
Expand All @@ -440,10 +447,13 @@
<constraint firstItem="nuR-Jb-FaD" firstAttribute="top" secondItem="V9g-g7-db5" secondAttribute="top" constant="82" id="Dqt-W9-oIC"/>
<constraint firstAttribute="trailing" secondItem="td9-NB-ySB" secondAttribute="trailing" id="Ekc-nI-mMv"/>
<constraint firstItem="nuR-Jb-FaD" firstAttribute="bottom" secondItem="V9g-g7-db5" secondAttribute="bottom" constant="5" id="JRf-4g-S0e"/>
<constraint firstItem="ocp-2V-YZR" firstAttribute="top" secondItem="nuR-Jb-FaD" secondAttribute="bottom" constant="31" id="MFu-Qw-cHz"/>
<constraint firstAttribute="trailing" secondItem="ocp-2V-YZR" secondAttribute="trailing" constant="16" id="Nvb-pq-Q0d"/>
<constraint firstItem="5d8-Eo-Ig8" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="PGh-w8-S6v"/>
<constraint firstAttribute="trailing" secondItem="td9-NB-ySB" secondAttribute="trailing" id="QIa-ig-FOJ"/>
<constraint firstAttribute="trailing" secondItem="V9g-g7-db5" secondAttribute="trailing" id="WyT-xF-GKs"/>
<constraint firstItem="Wff-P0-8YW" firstAttribute="leading" secondItem="P3e-SN-PxX" secondAttribute="trailing" constant="4" id="eIg-VY-OEN"/>
<constraint firstItem="ocp-2V-YZR" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="16" id="ebm-99-Amq"/>
<constraint firstAttribute="trailing" secondItem="5d8-Eo-Ig8" secondAttribute="trailing" id="hDZ-Ut-Hvi"/>
<constraint firstItem="V9g-g7-db5" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="iCv-II-YGu"/>
<constraint firstItem="5d8-Eo-Ig8" firstAttribute="top" secondItem="P3e-SN-PxX" secondAttribute="bottom" constant="8" symbolic="YES" id="kZZ-PF-dfv"/>
Expand Down