user_cancel_delete in function userDelete
Hello,
Just found out why drupaldriver is removing the content from a user 'logged in with "x" role' (behat drupalextension) at the end of the scenario.
Looks like Drupaldriver always takes 'user_cancel_delete' as parameter instead of using the variable user_cancel_method from the Drupal environment it is working on.
I might guess you dont want to leave any traces from the tests on the environment but have a feature with multi scenarios where one make a new node and the following scenarios are checking that node. After the first scenario the node gets deleted and so the following scenarios will always fail...
Any suggestions?
Thanks
Rather than have one scenario create content that another depends on, could you switch your test to use the background funcitonality? That way you get around inter-dependent scenarios which can be tricky.
Ugh... If I use background to login, all my scenarios depend on a particular login but not all scenarios are logged in. Some have just a json call...
It's still my idea that behat/drupaldriver should use the drupal settings as set on the site. If the drupal says to use user_cancel_delete, Behat/Drupaldriver should use that settings. Same for user_cancel_block.
Like @jhedstrom says, you should not have test that are dependant on other tests. Using background is a good solution. Otherwise you should create a custom "Given" function that creates the necessary setup for the rest of the story, or that is usable in the background setup.