| 12345678910111213141516171819202122232425262728293031323334353637 |
- /**
- * Copyright (c) 2015-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
- #import <XCTest/XCTest.h>
- #import "FBElement.h"
- #import "XCUIElementDouble.h"
- #import "FBElementUtils.h"
- @interface FBElementUtilitiesTests : XCTestCase
- @end
- @implementation FBElementUtilitiesTests
- - (void)testTypesFiltering {
- NSMutableArray *elements = [NSMutableArray new];
- XCUIElementDouble *el1 = [XCUIElementDouble new];
- [elements addObject:el1];
- XCUIElementDouble *el2 = [XCUIElementDouble new];
- el2.elementType = XCUIElementTypeAlert;
- el2.wdType = @"XCUIElementTypeAlert";
- [elements addObject:el2];
- XCUIElementDouble *el3 = [XCUIElementDouble new];
- [elements addObject:el3];
-
- NSSet *result = [FBElementUtils uniqueElementTypesWithElements:elements];
- XCTAssertEqual([result count], 2);
- }
- @end
|