{"action":"created","issue":{"url":"https://api.github.com/repos/xolvio/chimp/issues/101","labels_url":"https://api.github.com/repos/xolvio/chimp/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/xolvio/chimp/issues/101/comments","events_url":"https://api.github.com/repos/xolvio/chimp/issues/101/events","html_url":"https://github.com/xolvio/chimp/issues/101","id":112483552,"number":101,"title":"Signing in successfully but not remaining signed in when navigating","user":{"login":"samhatoum","id":2021955,"avatar_url":"https://avatars.githubusercontent.com/u/2021955?v=3","gravatar_id":"","url":"https://api.github.com/users/samhatoum","html_url":"https://github.com/samhatoum","followers_url":"https://api.github.com/users/samhatoum/followers","following_url":"https://api.github.com/users/samhatoum/following{/other_user}","gists_url":"https://api.github.com/users/samhatoum/gists{/gist_id}","starred_url":"https://api.github.com/users/samhatoum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samhatoum/subscriptions","organizations_url":"https://api.github.com/users/samhatoum/orgs","repos_url":"https://api.github.com/users/samhatoum/repos","events_url":"https://api.github.com/users/samhatoum/events{/privacy}","received_events_url":"https://api.github.com/users/samhatoum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-20T23:51:00Z","updated_at":"2015-10-23T06:56:47Z","closed_at":null,"body":"_From @philipobrien on August 20, 2015 10:47_\n\nHere is my feature file\r\n\r\n```cucumber\r\nBackground:\r\n    Given The processor analyst is signed in\r\n\r\n  @dev\r\n  Scenario: A processor analyst can view long term predictions\r\n    When The processor analyst navigates to \"/dashboard\"\r\n    Then The processor analyst should see the heading \"Long Term Prediction\"\r\n```\r\n\r\nand my step definitions\r\n\r\n```js\r\nthis.Given(/^The processor analyst is signed in$/, function (callback) {\r\n            this.client.\r\n                url(process.env.ROOT_URL).\r\n                waitForExist('.at-pwd-form').\r\n                waitForVisible('.at-pwd-form').\r\n                setValue('input#at-field-email', 'me@mail.com').\r\n                setValue('input#at-field-password', 'mypassword').\r\n                submitForm('#at-pwd-form').\r\n                call(callback);\r\n        });\r\n\r\n        this.When(/^The processor analyst navigates to \"([^\"]*)\"$/, function (arg1, callback) {\r\n            this.client.\r\n                url(url.resolve(process.env.ROOT_URL, arg1)). // process.env.ROOT_URL points to the app\r\n                waitForExist(\"body *\").\r\n                call(callback);\r\n        });\r\n\r\n        this.Then(/^The processor analyst should see the heading \"([^\"]*)\"$/, function (arg1, callback) {\r\n            this.client.\r\n                waitForExist('body *'). // WebdriverIO chain-able promise magic\r\n                waitForExist('#long-term-prediction', 100).\r\n                getTitle().should.become(arg1);\r\n        });\r\n```\r\n\r\nthe login is successful and although the navigation to `/dashboard` *seems* successful, i.e. it passes, none of the elements that should be on that page become visible. Instead the `useraccounts` **at-pwd-form** is visible, which suggests I have been logged out again. \r\n\r\nThe actual error in the logs is\r\n\r\n```console\r\n[chimp] Detected an unhandledRejection.\r\n[chimp][hooks] Reason:\r\n[chimp][hooks] CommandErrorWebdriverIO CommandError (Promise never resolved with an truthy value)\r\n[chimp][hooks] This usually happens when WebdriverIO assertions fail or timeout.\r\nHINT: Check the step AFTER [When The processor analyst navigates to \"/dashboard\"] (/features/processor/processor_view_prediction.feature: >12)\r\n```\r\n\r\n\r\nIf I change the 2nd step to this \r\n\r\n```js\r\nthis.When(/^The processor analyst navigates to \"([^\"]*)\"$/, function (arg1, callback) {\r\n            this.client.\r\n                waitForExist('#long-term-prediction').\r\n                call(callback);\r\n        });\r\n```\r\nthen that step passes. It seems to be an issue with the use of `url(url.resolve(process.env.ROOT_URL, arg1))`\n\n_Copied from original issue: xolvio/meteor-cucumber#198_"},"comment":{"url":"https://api.github.com/repos/xolvio/chimp/issues/comments/150492094","html_url":"https://github.com/xolvio/chimp/issues/101#issuecomment-150492094","issue_url":"https://api.github.com/repos/xolvio/chimp/issues/101","id":150492094,"user":{"login":"philcruz","id":281846,"avatar_url":"https://avatars.githubusercontent.com/u/281846?v=3","gravatar_id":"","url":"https://api.github.com/users/philcruz","html_url":"https://github.com/philcruz","followers_url":"https://api.github.com/users/philcruz/followers","following_url":"https://api.github.com/users/philcruz/following{/other_user}","gists_url":"https://api.github.com/users/philcruz/gists{/gist_id}","starred_url":"https://api.github.com/users/philcruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philcruz/subscriptions","organizations_url":"https://api.github.com/users/philcruz/orgs","repos_url":"https://api.github.com/users/philcruz/repos","events_url":"https://api.github.com/users/philcruz/events{/privacy}","received_events_url":"https://api.github.com/users/philcruz/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T06:56:47Z","updated_at":"2015-10-23T06:56:47Z","body":"I think I'm hitting a similar issue. Though in my case, the user fills out the registration form with username password, the form is submitted. Looking at the database I can see the new user is created. But the last step where a certain menu item should appear when logged in doesn't appear. I can see this in the Chrome browser as well. If I then manually login myself it works as expected. \r\n\r\n    (function () {\r\n\r\n\t'use strict';\r\n\r\n\tmodule.exports = function () {\r\n\r\n\t\tthis.Given(/^I am not logged in$/, function () {\r\n\t\t\tclient.url(process.env.ROOT_URL);\r\n\t\t});\r\n\r\n\t\tthis.When(/^I go to the registration form$/, function () {\r\n\t\t\tclient.url( process.env.ROOT_URL + 'sign-up');\r\n\t\t});\r\n\r\n\t\tthis.When(/^I fill in the form$/, function () {\r\n\t\t\tclient.setValue('#at-field-username', 'cucumbertest1');\r\n\t\t\tclient.setValue('#at-field-email', 'cucumbertest1@gmail.com');\r\n\t\t\tclient.setValue('#at-field-password', 'letmein');\r\n\t\t\tclient.setValue('#at-field-password_again', 'letmein');\r\n\t\t});\r\n\r\n\t\tthis.When(/^I click the button \"([^\"]*)\"$/, function (arg1) {\r\n\t\t\tclient.click('#at-btn');\r\n\t\t\tclient.url( process.env.ROOT_URL + 'projects');\r\n\t\t});\r\n\r\n\t\tthis.Then(/^I should see a menu called \"([^\"]*)\"$/, function (expectedLinkText) {\r\n\t\t\tclient.waitForExist('#project-dropdown');\r\n\t\t\texpect(client.getText('#project-dropdown')).toEqual(expectedLinkText);\r\n\t\t});\r\n\r\n\t}\r\n\r\n    })();\r\n\r\nWhat could be the issue?"}}