Sha256: 0d7a44c01b16b211be678e758d96cd9b08761c1f5a1fa7eeed774e5e33e91164

Contents?: true

Size: 1.03 KB

Versions: 10

Compression:

Stored size: 1.03 KB

Contents

Given(/^the user goes on the new origin page$/) do
  visit dorsale.customer_vault_origins_path
  find(".link_create").click
end

When(/^he fills the origin's information$/) do
fill_in 'origin_name', with: "Origin Name"
end

When(/^creates a new origin$/) do
  find("[type=submit]").click
end

Then(/^he is redirected on the origins page$/) do
  expect(current_path).to eq dorsale.customer_vault_origins_path
end

Then(/^the origin is added to the origin list$/) do
  expect(page).to have_content "Origin Name"
end

Given(/^an existing origin$/) do
  @origin = create(:customer_vault_origin)
end

When(/^I edit the origin$/) do
  visit dorsale.customer_vault_origins_path
  find(".link_update").click
end

Then(/^the current origin's name should be pre\-filled$/) do
  expect(page).to have_field("origin_name", with: @origin.name)
end

When(/^he validates the new origin$/) do
  fill_in "origin_name", with: "New Origin Name"
  find("[type=submit]").click
end

Then(/^the origin's label is updated$/) do
  expect(page).to have_content "New Origin Name"
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dorsale-3.8.1 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.8.0 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.8 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.7 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.6 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.5 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.4 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.2 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.1 features/step_definitions/customer_vault_origins_steps.rb
dorsale-3.7.0 features/step_definitions/customer_vault_origins_steps.rb