Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Side by Side Diff: ios/showcase/content_suggestions/sc_content_suggestions_egtest.mm

Issue 2769063005: Add CSDataSource in showcase (Closed)
Patch Set: Address comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <EarlGrey/EarlGrey.h> 5 #import <EarlGrey/EarlGrey.h>
6 6
7 #include "components/strings/grit/components_strings.h"
8 #include "ios/chrome/grit/ios_strings.h"
9 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
7 #import "ios/showcase/test/showcase_eg_utils.h" 10 #import "ios/showcase/test/showcase_eg_utils.h"
8 #import "ios/showcase/test/showcase_test_case.h" 11 #import "ios/showcase/test/showcase_test_case.h"
9 12
10 #if !defined(__has_feature) || !__has_feature(objc_arc) 13 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support." 14 #error "This file requires ARC support."
12 #endif 15 #endif
13 16
14 // Tests for the suggestions view controller. 17 // Tests for the suggestions view controller.
15 @interface SCContentSuggestionsTestCase : ShowcaseTestCase 18 @interface SCContentSuggestionsTestCase : ShowcaseTestCase
16 @end 19 @end
17 20
18 @implementation SCContentSuggestionsTestCase 21 @implementation SCContentSuggestionsTestCase
19 22
20 // Tests launching ContentSuggestionsViewController. 23 // Tests launching ContentSuggestionsViewController.
21 - (void)testLaunch { 24 - (void)testLaunch {
22 showcase_utils::Open(@"ContentSuggestionsViewController"); 25 showcase_utils::Open(@"ContentSuggestionsViewController");
26 [[EarlGrey
27 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId(
28 IDS_IOS_CONTENT_SUGGESTIONS_FOOTER_TITLE)]
29 assertWithMatcher:grey_interactable()];
30 [[EarlGrey selectElementWithMatcher:
31 chrome_test_util::StaticTextWithAccessibilityLabelId(
32 IDS_NTP_ARTICLE_SUGGESTIONS_SECTION_HEADER)]
33 assertWithMatcher:grey_sufficientlyVisible()];
23 showcase_utils::Close(); 34 showcase_utils::Close();
24 } 35 }
25 36
26 @end 37 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698