2

シナリオ:

Feature: Login Success

  Scenario: Login in  User
    Given I am on the sign_in page
    And I fill in "Email" with "test@gmail.com"
    And I fill in "Password" with "12345678"
    When I press "Sign in"
    Then page should have content "Update Projects"

私はデバイスを使用しています。

手順:

Given /^I am on the sign_in page$/ do
  visit ('/users/sign_in')
end

Given /^I fill in "(.*?)" with "(.*?)"$/ do |arg1, arg2|
  fill_in arg1, :with => arg2
end

When /^I press "(.*?)"$/ do |arg1|
  click_button arg1
end

Then /^page should have content "(.*?)"$/ do |arg1|
  expect(page).to have_content arg1
end

とてもシンプルです。私はデバイスを使用しています。

失敗する理由:

「プロジェクトの更新」というテキストが...

cucumber が次のページにリダイレクトしないのはなぜですか?

4

0 に答える 0