Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jul 20, 2024
1 parent 1124c36 commit a98ebc1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions WebDriverAgentMac/IntegrationTests/AMW3CActionsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,25 @@ - (void)testKeys
XCTAssertEqualObjects(edit.value, @"NBA");
}

- (void)testKeysWithEmptyActions
{
[self switchToEditsTab];
XCUIElement *edit = self.testedApplication.textFields.firstMatch;
[edit click];

NSArray<NSDictionary<NSString *, id> *> *gesture =
@[@{
@"type": @"key",
@"id": @"keyboard",
@"actions": @[],
},
];
NSError *error;
XCTAssertTrue([self.testedApplication fb_performW3CActions:gesture
elementCache:nil
error:&error]);
XCTAssertNil(error);
XCTAssertEqualObjects(edit.value, @"");
}

@end

0 comments on commit a98ebc1

Please sign in to comment.