blob: 9e49c83a40f07d8921cc09466d28ffd738fbd1cb [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/earl_grey/chrome_earl_grey.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, [ChromeEarlGrey mainTabCount], @"Expected 2 tabs.");
}
@end