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

Side by Side Diff: ios/chrome/browser/ui/settings/translate_ui_egtest.mm

Issue 2733973002: Create shared matcher for navigation bar done button. (Closed)
Patch Set: remove sufficientlyVisible from shared matcher Created 3 years, 9 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 #import <XCTest/XCTest.h> 6 #import <XCTest/XCTest.h>
7 7
8 #import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h" 8 #import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h"
9 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h" 9 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h"
10 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" 10 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h"
11 #include "ios/chrome/grit/ios_strings.h" 11 #include "ios/chrome/grit/ios_strings.h"
12 #include "ios/chrome/test/earl_grey/accessibility_util.h" 12 #include "ios/chrome/test/earl_grey/accessibility_util.h"
13 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" 13 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
14 #import "ios/chrome/test/earl_grey/chrome_matchers.h" 14 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
15 #import "ios/chrome/test/earl_grey/chrome_test_case.h" 15 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
16 16
17 using chrome_test_util::NavigationBarDoneButton;
18
17 namespace { 19 namespace {
18 // Displacement for scroll action. 20 // Displacement for scroll action.
19 const CGFloat kScrollDisplacement = 50.0; 21 const CGFloat kScrollDisplacement = 50.0;
20 } // namespace 22 } // namespace
21 @interface TranslateUITestCase : ChromeTestCase 23 @interface TranslateUITestCase : ChromeTestCase
22 @end 24 @end
23 25
24 @implementation TranslateUITestCase 26 @implementation TranslateUITestCase
25 27
26 // Opens the translate settings page and verifies that accessibility is set up 28 // Opens the translate settings page and verifies that accessibility is set up
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 grey_accessibilityID(@"ic_arrow_back"), 63 grey_accessibilityID(@"ic_arrow_back"),
62 grey_accessibilityTrait( 64 grey_accessibilityTrait(
63 UIAccessibilityTraitButton), 65 UIAccessibilityTraitButton),
64 nil)] performAction:grey_tap()]; 66 nil)] performAction:grey_tap()];
65 [[EarlGrey 67 [[EarlGrey
66 selectElementWithMatcher:grey_allOf( 68 selectElementWithMatcher:grey_allOf(
67 grey_accessibilityID(@"ic_arrow_back"), 69 grey_accessibilityID(@"ic_arrow_back"),
68 grey_accessibilityTrait( 70 grey_accessibilityTrait(
69 UIAccessibilityTraitButton), 71 UIAccessibilityTraitButton),
70 nil)] performAction:grey_tap()]; 72 nil)] performAction:grey_tap()];
71 [[EarlGrey 73 [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()]
72 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId(
73 IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)]
74 performAction:grey_tap()]; 74 performAction:grey_tap()];
75 } 75 }
76 76
77 @end 77 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/settings_egtest.mm ('k') | ios/chrome/test/earl_grey/chrome_matchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698