Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 912 Bytes

no-get-in-it.md

File metadata and controls

22 lines (15 loc) · 912 Bytes

Recommend against having browser.get() or browser.driver.get() inside it()

This rule enforces the Navigate to the page under test before each test Protractor Style Guide recommendation.

The rule currently does not allow to configure the test function names and will only look for it() test names.

Rule details

👎 Any use of the following patterns are considered warnings:

it("should do something", function() { browser.get("mypage"); });
it("should do something", function() { browser.driver.get("mypage"); });

👍 The following patterns are not warnings:

beforeEach(function() { browser.get("mypage"); });
beforeEach(function() { browser.driver.get("mypage"); });
it("should do something", function() { browser.waitForAngular() });