     }
 
     func testPasscodeMustBeCorrectWhenRemoving() {
+        waitForExistence(app.textFields["url"], timeout: 5)
+        navigator.performAction(Action.CloseURLBarOpen)
+        navigator.nowAt(NewTabScreen)
         navigator.performAction(Action.SetPasscode)
         XCTAssertTrue(app.staticTexts["Immediately"].exists)
 


    func testEnteringLoginsWithNoPasscode() {
        // It is disabled
        navigator.goto(PasscodeSettings)
        waitForExistence(app.tables["AuthenticationManager.settingsTableView"].staticTexts["Turn Passcode On"])


    }

    func testTurnOnOff() {
        waitForExistence(app.textFields["url"], timeout: 5)
        navigator.performAction(Action.CloseURLBarOpen)
        navigator.nowAt(NewTabScreen)
        navigator.performAction(Action.SetPasscode)
        setInterval("Immediately")
        XCTAssertTrue(app.staticTexts["Immediately"].exists)
