Sha256: 3ec0391d2b03c05db8df32d4f7b8eb791c197bf1e4be51619150e1960eb0d2ea

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-4.0.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.20.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.19.1 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.19.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.18.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.17.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.16.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.15.0 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.11 features/step_definitions/customer_vault_activity_types_steps.rb
dorsale-3.14.10 features/step_definitions/customer_vault_activity_types_steps.rb