Sha256: 1bb78533fa3e6ef64aae0c42436ea7bce2645e23037dcccf78bc0a96f592b1f1

Contents?: true

Size: 1.99 KB

Versions: 18

Compression:

Stored size: 1.99 KB

Contents

When(/^I search "(.*?)"$/) do |q|
  fill_in "q", with: q
  find(".search-submit").click
end

When(/^an existing customer$/) do
  @customer = create(:customer_vault_corporation)
end

When(/^he goes on the next page$/) do
  find(".next").click
  expect(page).to have_selector ".page.active a[href$='2']"
end

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

Given(/^an authenticated user$/) do
  @user = create(:user)
  sign_in @user
end

Given(/^an active user$/) do
  @user = create(:user)
end

Given(/^an inactive user$/) do
  @user = create(:user, is_active: false)
end

Given(/^an existing "(.*?)" having "(.*?)" set to "(.*?)"$/) do |factory, key, value|
  create(factory, key => value)
end

Then(/^the selected filter is "(.*?)"$/) do |value|
  selected_values = all(".filters select").map(&:value)
  expect(selected_values).to include value
end

Then(/^he do not see the "([^"]*)" filter$/) do |id|
  expect(page).to have_no_selector("#filters_#{id}")
end

When(/^he select custom date filter$/) do
  select "Choisir une date"
end

Then(/^he see the "([^"]*)" filter$/) do |id|
  expect(page).to have_selector("#filters_#{id}")
end

When(/^(?:I|he|she) export to XLSX$/) do
  find("a[href$=xlsx]").click
end

When(/^(?:I|he|she) download XLSX file$/) do
end

When(/^I click on show more$/) do
  find("a[class*=show_more]").click
end

When(/^I select "([^"]*)"$/) do |value|
  select value
end

When(/^I submit$/) do
  find("#main [type=submit]").click
end

When(/^I fill "([^"]*)" with "([^"]*)"$/) do |field, value|
  fill_in field, with: value
end

Then(/^"([^"]*)" has value "([^"]*)"$/) do |field, expected_value|
  value = find_field(field).value
  expect(value).to eq expected_value
end

Then(/^I do not see "([^"]*)" element$/) do |element_selector|
  expect(page).to have_no_selector element_selector
end

Then(/^I see "([^"]*)" element$/) do |element_selector|
  expect(page).to have_selector element_selector
end

When("I click on {string}") do |text|
  click_on text
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dorsale-4.0.0 features/step_definitions/common_steps.rb
dorsale-3.20.0 features/step_definitions/common_steps.rb
dorsale-3.19.1 features/step_definitions/common_steps.rb
dorsale-3.19.0 features/step_definitions/common_steps.rb
dorsale-3.18.0 features/step_definitions/common_steps.rb
dorsale-3.17.0 features/step_definitions/common_steps.rb
dorsale-3.16.0 features/step_definitions/common_steps.rb
dorsale-3.15.0 features/step_definitions/common_steps.rb
dorsale-3.14.11 features/step_definitions/common_steps.rb
dorsale-3.14.10 features/step_definitions/common_steps.rb
dorsale-3.14.9 features/step_definitions/common_steps.rb
dorsale-3.14.8 features/step_definitions/common_steps.rb
dorsale-3.14.7 features/step_definitions/common_steps.rb
dorsale-3.14.6 features/step_definitions/common_steps.rb
dorsale-3.14.5 features/step_definitions/common_steps.rb
dorsale-3.14.3 features/step_definitions/common_steps.rb
dorsale-3.14.2 features/step_definitions/common_steps.rb
dorsale-3.14.1 features/step_definitions/common_steps.rb