Lately, I've noticed a peculiar line in one of our tests:
browser.actions().sendKeys(protractor.Key.RETURN);
Although the intention behind it is clear, it actually doesn't do anything because perform()
was not called. Surprisingly, the test still passed, revealing a flaw in the logic and expectations of the test.
How can I catch these issues early on and prevent such violations of protractor/WebDriverJS usage from being committed to the repository?