{"action":"created","issue":{"url":"https://api.github.com/repos/jhedstrom/drupalextension/issues/267","repository_url":"https://api.github.com/repos/jhedstrom/drupalextension","labels_url":"https://api.github.com/repos/jhedstrom/drupalextension/issues/267/labels{/name}","comments_url":"https://api.github.com/repos/jhedstrom/drupalextension/issues/267/comments","events_url":"https://api.github.com/repos/jhedstrom/drupalextension/issues/267/events","html_url":"https://github.com/jhedstrom/drupalextension/issues/267","id":147823999,"number":267,"title":"DrupalExtension and Behat 3","user":{"login":"aronbeal","id":2242035,"avatar_url":"https://avatars.githubusercontent.com/u/2242035?v=3","gravatar_id":"","url":"https://api.github.com/users/aronbeal","html_url":"https://github.com/aronbeal","followers_url":"https://api.github.com/users/aronbeal/followers","following_url":"https://api.github.com/users/aronbeal/following{/other_user}","gists_url":"https://api.github.com/users/aronbeal/gists{/gist_id}","starred_url":"https://api.github.com/users/aronbeal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronbeal/subscriptions","organizations_url":"https://api.github.com/users/aronbeal/orgs","repos_url":"https://api.github.com/users/aronbeal/repos","events_url":"https://api.github.com/users/aronbeal/events{/privacy}","received_events_url":"https://api.github.com/users/aronbeal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-04-12T17:45:37Z","updated_at":"2016-09-22T20:25:17Z","closed_at":null,"body":"Hi,\r\n\r\nI've been working with DrupalExtension and Behat context files for about a month now.  I'm using Behat 3, where the conversion was made to use Contexts only (no sub-contexts).  For your module, that conversion meant that folks had to extend RawDrupalContext instead of DrupalContext.  This caused the side effect of having all the functionality established in DrupalContext to be not available generally, unless one used a workaround like [capturing said contexts in a BeforeScenario hook](http://stackoverflow.com/questions/29674685/how-to-communicate-between-contexts-in-behat-3) so you could ask questions of them later.\r\n\r\nThis worked all fine, until recently when I was working with which user was logged in at any given moment.  It was at this point that I realized that logged in users are localized to the context that created them, and even if I can leverage DrupalContext to create said user, I can't subsequently gain access to the same.\r\n\r\nAn approach I've been taking with my context files in Behat 3 is to remove the bulk of the functionality to a class that extends RawDrupalContext but does *not* define any steps in and of itself.  The step defining classes subsequently have lots of methods, but they all then leverage the functionality in the parent class to do all the work.\r\n\r\nMy best approach at this point seems to be to rewrite DrupalContext entirely so that it doesn't actually define any steps, and then create another stub class that has all the step definitions the parent class had.  I'm wondering two things:\r\n\r\n1) Do you see a problem with this approach I'm missing, or another less laborious avenue I could pursue?\r\n2) If not, would you be interested in the results of this work once I'm done?"},"comment":{"url":"https://api.github.com/repos/jhedstrom/drupalextension/issues/comments/249017728","html_url":"https://github.com/jhedstrom/drupalextension/issues/267#issuecomment-249017728","issue_url":"https://api.github.com/repos/jhedstrom/drupalextension/issues/267","id":249017728,"user":{"login":"aronbeal","id":2242035,"avatar_url":"https://avatars.githubusercontent.com/u/2242035?v=3","gravatar_id":"","url":"https://api.github.com/users/aronbeal","html_url":"https://github.com/aronbeal","followers_url":"https://api.github.com/users/aronbeal/followers","following_url":"https://api.github.com/users/aronbeal/following{/other_user}","gists_url":"https://api.github.com/users/aronbeal/gists{/gist_id}","starred_url":"https://api.github.com/users/aronbeal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronbeal/subscriptions","organizations_url":"https://api.github.com/users/aronbeal/orgs","repos_url":"https://api.github.com/users/aronbeal/repos","events_url":"https://api.github.com/users/aronbeal/events{/privacy}","received_events_url":"https://api.github.com/users/aronbeal/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T20:25:17Z","updated_at":"2016-09-22T20:25:17Z","body":"I'm not getting notifications for thread postings here for some reason.  Either that, or they're being swallowed by my spam filter.  Sorry for the delay in response.\r\n\r\nMy current root composer.json is as follows:\r\n\r\n```json\r\n{\r\n    \"require\": {\r\n        \"drupal/drupal-extension\": \"dev-feature/add_field_deletion\",\r\n        \"behat/behat\": \"~3.0\",\r\n        \"emuse/behat-html-formatter\": \"~0.1\",\r\n        \"behat/mink-zombie-driver\": \"^1.4\",\r\n        \"symfony/console\": \"^3.1\"\r\n    },\r\n    \"repositories\": [\r\n        {\r\n            \"type\": \"vcs\",\r\n            \"url\": \"git@github.com:aronbeal/drupalextension.git\"\r\n        },\r\n        {\r\n            \"type\": \"vcs\",\r\n            \"url\": \"https://github.com/aronbeal/DrupalDriver\"\r\n        }\r\n    ],\r\n    \"minimum-stability\": \"dev\",\r\n    \"prefer-stable\": true,\r\n    \"config\": {\r\n        \"bin-dir\": \"bin/\"\r\n    }\r\n}\r\n```\r\n\r\nI would, however, use the setting 'dev-master' for drupal/drupal-driver and drupal/drupal-extension, as I can't vouch for anything not in the main branch."}}
{"actor":{"display_login":"aronbeal"}}