Sha256: 57a8dabed15f46ead53dbc32d91ab3b4fce1d997372df67418070363740eb943

Contents?: true

Size: 1.24 KB

Versions: 24

Compression:

Stored size: 1.24 KB

Contents

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

When(/^he fills the payment_term's information$/) do
  fill_in 'billing_machine_payment_term_label', with: "Payment Term Label"
end

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

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

Then(/^the payment_term is added to the payment_term list$/) do
  expect(page).to have_content "Payment Term Label"
end

Given(/^an existing payment_term$/) do
  @payment_term = create(:billing_machine_payment_term)
end

When(/^the user edits the payment_term$/) do
  visit dorsale.billing_machine_payment_terms_path
  find(".link_update").click
end

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

When(/^he validates the new payment_term$/) do
  fill_in "billing_machine_payment_term_label", with: "New Payment Term Label"
  find("[type=submit]").click
end

Then(/^the payment_term's label is updated$/) do
  expect(page).to have_content "New Payment Term Label"
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
dorsale-3.8.1 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.8.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.8 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.7 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.6 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.5 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.4 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.2 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.1 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.7.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.6.1 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.6.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.5.2 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.5.1 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.5.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.4.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.3.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.2.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.1.7 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.1.6 features/step_definitions/billing_machine_payment_terms_steps.rb