Commit bd3c4bd3 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Disable reading lists tests for UI refresh.

Also corrects the scroll distance to fix iPhone X tests.

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I516c19f8343eaa21f5dcd9ce4e6e35e1fcd62640
Reviewed-on: https://chromium-review.googlesource.com/991574
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547745}
parent 746f0000
......@@ -96,13 +96,13 @@ ContentSuggestion Suggestion(Category category,
}
// Select the cell with the |matcher| by scrolling the collection.
// 150 is a reasonable scroll displacement that works for all UI elements, while
// 200 is a reasonable scroll displacement that works for all UI elements, while
// not being too slow.
GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
return [[EarlGrey
selectElementWithMatcher:grey_allOf(matcher, grey_sufficientlyVisible(),
nil)]
usingSearchAction:grey_scrollInDirection(kGREYDirectionDown, 150)
usingSearchAction:grey_scrollInDirection(kGREYDirectionDown, 200)
onElementWithMatcher:chrome_test_util::ContentSuggestionCollectionView()];
}
......@@ -229,6 +229,12 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that after dismissing a ReadingList item, it is not displayed on the
// NTP. But it is still unread in the Reading List surface.
- (void)testSwipeToDismissReadingListItem {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
// Add two items to Reading List.
std::string stdTitle1{"test title1"};
std::string stdTitle2{"test title2"};
......@@ -310,6 +316,12 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that only the 3 most recent Reading List items are displayed.
- (void)testReadingListItem {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
// Create entry titles for 4 unread entries and 1 read entry.
std::string stdTitle1{"test unread title1"};
std::string stdTitle2{"test unread title2"};
......@@ -354,6 +366,11 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that tapping "More" on the Reading List section opens the Reading List
// surface.
- (void)testMoreReadingListSection {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
// Add an entry to make sure the Reading List section is displayed.
ReadingListModel* readingListModel =
ReadingListModelFactory::GetForBrowserState(self.browserState);
......@@ -392,6 +409,12 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that the section titles are displayed only if there are two sections.
- (void)testSectionTitle {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
ReadingListModel* readingListModel =
ReadingListModelFactory::GetForBrowserState(self.browserState);
readingListModel->AddEntry(GURL("http://chromium.org"), "test title",
......@@ -504,6 +527,12 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that when long pressing a Reading List entry, a context menu is shown.
- (void)testReadingListLongPress {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
NSString* title = @"ReadingList test title";
std::string sTitle{"ReadingList test title"};
ReadingListModel* readingListModel =
......@@ -528,6 +557,12 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that "Open in New Tab" in context menu opens in a new tab.
- (void)testReadingListOpenNewTab {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
// Setup.
[self setupReadingListContextMenu];
const GURL pageURL = self.testServer->GetURL(kPageURL);
......@@ -571,6 +606,12 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that "Open in New Incognito Tab" in context menu opens in a new
// incognito tab.
- (void)testReadingListOpenNewIncognitoTab {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
// Setup.
[self setupReadingListContextMenu];
const GURL pageURL = self.testServer->GetURL(kPageURL);
......@@ -597,6 +638,12 @@ GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) {
// Tests that "Remove" in context menu removes the entry.
- (void)testReadingListRemove {
// TODO(crbug.com/807330): The collection view reading list section is not
// used in ui refresh.
if (IsUIRefreshPhase1Enabled()) {
EARL_GREY_TEST_SKIPPED(@"ReadingList section does not exist in UI Refresh");
}
// Setup.
NSString* title = @"ReadingList test title";
[self setupReadingListContextMenu];
......
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