Skip to content

Commit

Permalink
[atoms] Preparing a test for an upcoming PR merge
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 21, 2018
1 parent 30d04e9 commit 4da217c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions javascript/atoms/test/locator_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,21 @@
}
}

function testShouldThrowOnUnrecognizedLocatingStrategy() {
try {
bot.locators.findElement({cheese: 'brie'});
fail('Should not have succeeded because the locating strategy is unknown');
} catch (ex) {
assertEquals(bot.ErrorCode.INVALID_ARGUMENT, ex.code);
}
try {
bot.locators.findElements({cheese: 'brie'});
fail('Should not have succeeded because the locating strategy is unknown');
} catch (ex) {
assertEquals(bot.ErrorCode.INVALID_ARGUMENT, ex.code);
}
}

function testCanAddANewElementLocatingStrategy() {
var expected = goog.dom.$('lion');
bot.locators.add('fixed', {
Expand Down

0 comments on commit 4da217c

Please sign in to comment.