blob: 2502a314b1216a94a97462ef31f2fcabd9ea6953 [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 "ios/showcase/test/showcase_test_case.h"
#import <EarlGrey/EarlGrey.h>
#include "base/logging.h"
#import "base/mac/foundation_util.h"
#import "ios/showcase/core/app_delegate.h"
#import "ios/testing/earl_grey/coverage_utils.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@implementation ShowcaseTestCase
+ (void)setUp {
[CoverageUtils configureCoverageReportPath];
// Overrides testInvocations so the set of tests run can be modified, as
// necessary.
+ (NSArray*)testInvocations {
NSError* error = nil;
[[EarlGrey selectElementWithMatcher:grey_systemAlertViewShown()]
if (error != nil) {
LOG(ERROR) << "System alert view is present, so skipping all tests.";
return @[];
return [super testInvocations];
- (void)setUp {
AppDelegate* delegate = base::mac::ObjCCastStrict<AppDelegate>(
[UIApplication sharedApplication].delegate);
[delegate setupUI];