//
// BullsEyeUITests.m
// BullsEyeUITests
//
// Created by Vishnoi, Naman (US - Mechanicsburg Delivery) on 8/8/18.
// Copyright © 2018 Ray Wenderlich. All rights reserved.
//
#import <XCTest/XCTest.h>
#import <GTXiLib/GTXiLib.h>
@interface BullsEyeUITests : XCTestCase
@end
@implementation BullsEyeUITests
// Note that that is +setUp not -setUp
+ (void)setUp {
[super setUp];
// ... your other setup code (if any) comes here.
// Create a new check (for example that ensures that all AX label is not an image name)
id<GTXChecking> myNewCheck =
[GTXCheckBlock GTXCheckWithName:@"AXlabel is not image name"
block:^BOOL(id element, GTXErrorRefType errorPtr) {
// Ensure accessibilityLabel does not end with .png
return ![[element accessibilityLabel] hasSuffix:@".png"];
}];
// Create an array of checks to be installed.
NSArray *checksToBeInstalled = @[
[GTXChecksCollection checkForAXLabelPresent],
[GTXChecksCollection checkForAXTraitDontConflict],
myNewCheck,
];
// Install GTX on all tests in *this* test class.
[GTXiLib installOnTestSuite:[GTXTestSuite suiteWithAllTestsInClass:self]
checks:checksToBeInstalled
elementBlacklists:@[]];
}
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
self.continueAfterFailure = NO;
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
[[[XCUIApplication alloc] init] launch];
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results
XCUIApplication *app = [[XCUIApplication alloc] init];
XCUIElement *hitMeButton = app.buttons[@"hit me!"];
[hitMeButton tap];
}
@end
--
You received this message because you are subscribed to the Google Groups "ios-accessibility" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ios-accessibility+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ios-accessibility/2b542dc1-9d55-491f-9bfe-6046ea93fd06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ios-accessibil...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ios-accessibility+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ios-accessibility/ca50d9c2-9348-41e2-b283-4592309589cc%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ios-accessibility+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ios-accessibility/5cf2f8ec-51aa-4df7-9326-5c511e44d961%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ios-accessibility+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ios-accessibility/ff933138-bee2-4efb-a6e7-349ea0e1ad06%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ios-accessibility+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ios-accessibility/98dc3173-4868-4800-b0e3-24f8c2131e6f%40googlegroups.com.