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) {
// Tests that the collections shortcut are displayed and working.
- (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.
[[EarlGrey
selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId(
......@@ -213,6 +220,14 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
if ([ChromeEarlGrey isIPadIdiom]) {
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];
UIEdgeInsets safeArea =
[ContentSuggestionsAppInterface collectionView].safeAreaInsets;
......@@ -254,6 +269,14 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
if ([ChromeEarlGrey isRegularXRegularSizeClass]) {
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];
UIEdgeInsets safeArea =
[ContentSuggestionsAppInterface collectionView].safeAreaInsets;
......@@ -301,6 +324,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
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::
ContentSuggestionCollectionView()]
performAction:grey_swipeFastInDirection(kGREYDirectionUp)];
......@@ -475,6 +505,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
// toolbar.
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];
// Tap the search button.
......@@ -542,6 +579,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
// Tests that tapping the fake omnibox then unfocusing it moves the collection
// back to where it was.
- (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.
UICollectionView* collectionView =
[ContentSuggestionsAppInterface collectionView];
......@@ -581,6 +625,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
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::
ContentSuggestionCollectionView()]
performAction:grey_swipeFastInDirection(kGREYDirectionUp)];
......@@ -629,6 +680,13 @@ id<GREYMatcher> OmniboxWidthBetween(CGFloat width, CGFloat margin) {
}
- (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++) {
[[EarlGrey selectElementWithMatcher:
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