blob: 33a3e8a3e00ed2f582b4554a7602de364b1c7c3d [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <EarlGrey/EarlGrey.h>
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "ios/chrome/test/app/tab_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
// Test case to verify that EarlGrey tests can be launched and perform basic UI
// interactions.
@interface SmokeTestCase : ChromeTestCase
@end
@implementation SmokeTestCase
// Tests that the tools menu is tappable.
- (void)testTapToolsMenu {
[[EarlGrey selectElementWithMatcher:chrome_test_util::ToolsMenuButton()]
performAction:grey_tap()];
}
// Tests that a tab can be opened.
- (void)testOpenTab {
[ChromeEarlGreyUI openNewTab];
GREYAssertEqual(2, chrome_test_util::GetMainTabCount(), @"Expected 2 tabs.");
}
@end