0
我想写了,看起来像一个场景:每次使用Cucumber&Devise Gems测试登录用户时,是否必须登录?
Given I am logged in
And I am on my profile page
Then I see my name
对于“鉴于我的登录状态” - 我需要像写东西:
When I go to the log in page
And I fill in "user_username" with "test"
And I fill in "user_password" with "invalid password"
And I press "Sign in"
问题是:每次测试登录的用户功能时,测试都必须通过登录场景?
编辑: 请注意,我正在使用Devise的宝石。我不知道如何直接登录用户,因为用户会话,cookie等必须设置