Sha256: 4304af350f201d0e24da7b8205f2562fde487bb38b2e379f3c2aacdaeb289ca5

Contents?: true

Size: 689 Bytes

Versions: 57

Compression:

Stored size: 689 Bytes

Contents

When(/^he add a new document$/) do
  execute_script %(
    $("[type=file]").show()
  )

  attach_file :attachment_file, Dorsale::Engine.root.join("spec/files/pdf.pdf"), visible: :all

  find("#new_attachment [type=submit]").click
end

When(/^he delete a document$/) do
  all(".attachment .link_delete").first.click
end

When(/^he update the document$/) do
  find(".attachment [href$=edit]").click
  fill_in :attachment_name, with: "new document name"
  find("#edit_attachment [type$=submit]").click
  sleep 1 # ajax
end

Then(/^the document is updated$/) do
  @attachment = Dorsale::Alexandrie::Attachment.reorder(:updated_at).last
  expect(@attachment.name).to eq "new document name"
end

Version data entries

57 entries across 57 versions & 1 rubygems

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