Sha256: 2388a75a6469707a7537db03a65129919caa908e2d36329471950ed76b222aa0

Contents?: true

Size: 1.18 KB

Versions: 25

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

25 entries across 25 versions & 1 rubygems

Version Path
dorsale-3.14.9 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.8 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.7 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.6 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.5 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.3 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.2 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.1 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.13.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.12.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.11.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.10.3 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.10.2 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.10.1 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.10.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.9.8 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.9.7 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.9.6 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.9.5 features/step_definitions/customer_vault_activity_types_steps.rb