Sha256: 1f14ded0ab8efd0cd1b4466cb07813894d5de73c7b33bf2313894751f9e77248

Contents?: true

Size: 1.18 KB

Versions: 10

Compression:

Stored size: 1.18 KB

Contents

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

When(/^he fills the activity type's information$/) do
fill_in 'activity_type_name', with: "Activity Name"
end

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

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

Then(/^the activity type is added to the activity types list$/) do
  expect(page).to have_content "Activity Name"
end

Given(/^an existing activity type$/) do
  @activity_type = create(:customer_vault_activity_type)
end

When(/^I edit the activity type$/) do
  visit dorsale.customer_vault_activity_types_path
  find(".link_update").click
end

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

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

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