Sha256: 97f69f44dedf174f9c85f389cb2c5c2c1dc3f13c9621dee3b7be893a850af7fe

Contents?: true

Size: 1.24 KB

Versions: 10

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

10 entries across 10 versions & 1 rubygems

Version Path
dorsale-4.0.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.20.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.19.1 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.19.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.18.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.17.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.16.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.15.0 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.14.11 features/step_definitions/billing_machine_payment_terms_steps.rb
dorsale-3.14.10 features/step_definitions/billing_machine_payment_terms_steps.rb