paulgibbs / behat-wordpress-extension

WordHat: Behat for WordPress
https://wordhat.info
GNU General Public License v3.0
106 stars 20 forks source link

Handle exception in iAmAnonymousUser() #232

Closed paulgibbs closed 5 years ago

paulgibbs commented 5 years ago

Expected behaviour

iAmAnonymousUser() in the UserContext throws a DriverException if the browser is not open when this step definition is used.

Current behaviour

That the method handles failure quietly, because it doesn't matter here.

Possible solution

Add try/catch here or in logOut()!.

Steps to reproduce

Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant.

  1. Given I am an anonymous user
  2. When I do anything
  3. Then I get an exception before I get here.