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