Commit 1d0d9774 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS] Disable failing NTP tests

Disables failing tests on iphone-device:

NTPHomeTestCase/testOmniboxPinnedWidthRotation
NTPHomeTestCase/testTapFakeOmniboxScrollScrolled
NTPHomeTestCase/testOmniboxWidthRotation
NTPHomeTestCase/testFavicons
NTPHomeTestCase/testTapOmniboxSearchButtonLogsCorrectly
NTPHomeTestCase/testCollectionShortcuts
NTPHomeTestCase/testTapSearchButtonFakeOmniboxScrolled
NTPHomeTestCase/testOmniboxWidthRotationBehindSettings

TBR=gambard@chromium.org

Bug: 1046253
Change-Id: I7fd7a7b0f524ad9614f0f83fac0a4426ac28f7c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2023527Reviewed-by: default avatarJavier Ernesto Flores Robles <javierrobles@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735813}
parent 2edeeae9
...@@ -153,6 +153,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -153,6 +153,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
// Tests that the collections shortcut are displayed and working. // Tests that the collections shortcut are displayed and working.
- (void)testCollectionShortcuts { - (void)testCollectionShortcuts {
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
// Check the Bookmarks. // Check the Bookmarks.
[[EarlGrey [[EarlGrey
selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId(
...@@ -213,6 +220,14 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -213,6 +220,14 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
if ([ChromeEarlGrey isIPadIdiom]) { if ([ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to device rotation bug."); EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to device rotation bug.");
} }
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
UIEdgeInsets safeArea = UIEdgeInsets safeArea =
[ContentSuggestionsAppInterface collectionView].safeAreaInsets; [ContentSuggestionsAppInterface collectionView].safeAreaInsets;
...@@ -254,6 +269,14 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -254,6 +269,14 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
if ([ChromeEarlGrey isRegularXRegularSizeClass]) { if ([ChromeEarlGrey isRegularXRegularSizeClass]) {
EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to device rotation bug."); EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to device rotation bug.");
} }
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
UIEdgeInsets safeArea = UIEdgeInsets safeArea =
[ContentSuggestionsAppInterface collectionView].safeAreaInsets; [ContentSuggestionsAppInterface collectionView].safeAreaInsets;
...@@ -301,6 +324,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -301,6 +324,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to device rotation bug."); EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to device rotation bug.");
} }
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
[[EarlGrey selectElementWithMatcher:chrome_test_util:: [[EarlGrey selectElementWithMatcher:chrome_test_util::
ContentSuggestionCollectionView()] ContentSuggestionCollectionView()]
performAction:grey_swipeFastInDirection(kGREYDirectionUp)]; performAction:grey_swipeFastInDirection(kGREYDirectionUp)];
...@@ -475,6 +505,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -475,6 +505,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
// toolbar. // toolbar.
return; return;
} }
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
[ContentSuggestionsAppInterface swizzleSearchButtonLogging]; [ContentSuggestionsAppInterface swizzleSearchButtonLogging];
// Tap the search button. // Tap the search button.
...@@ -542,6 +579,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -542,6 +579,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
// Tests that tapping the fake omnibox then unfocusing it moves the collection // Tests that tapping the fake omnibox then unfocusing it moves the collection
// back to where it was. // back to where it was.
- (void)testTapFakeOmniboxScrollScrolled { - (void)testTapFakeOmniboxScrollScrolled {
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
// Get the collection and its layout. // Get the collection and its layout.
UICollectionView* collectionView = UICollectionView* collectionView =
[ContentSuggestionsAppInterface collectionView]; [ContentSuggestionsAppInterface collectionView];
...@@ -581,6 +625,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -581,6 +625,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
return; return;
} }
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
[[EarlGrey selectElementWithMatcher:chrome_test_util:: [[EarlGrey selectElementWithMatcher:chrome_test_util::
ContentSuggestionCollectionView()] ContentSuggestionCollectionView()]
performAction:grey_swipeFastInDirection(kGREYDirectionUp)]; performAction:grey_swipeFastInDirection(kGREYDirectionUp)];
...@@ -629,6 +680,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) { ...@@ -629,6 +680,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
} }
- (void)testFavicons { - (void)testFavicons {
// TODO(crbug.com/1046253): fix for iphone-device and reenable.
#if !TARGET_IPHONE_SIMULATOR
if (![ChromeEarlGrey isIPadIdiom]) {
EARL_GREY_TEST_DISABLED(@"Test disabled on iPhone devices.");
}
#endif
for (NSInteger index = 0; index < 8; index++) { for (NSInteger index = 0; index < 8; index++) {
[[EarlGrey selectElementWithMatcher: [[EarlGrey selectElementWithMatcher:
grey_accessibilityID([NSString grey_accessibilityID([NSString
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment