Sha256: aa02538601bd41b93079930fba0c482c826337e689b4598ec68b09791a47c292

Contents?: true

Size: 876 Bytes

Versions: 1

Compression:

Stored size: 876 Bytes

Contents

require 'spec_helper'

RSpec.feature "Print Invoice Settings", js: true do
  given!(:order) { FactoryGirl.create(:completed_order_with_totals) }
  given(:user) { FactoryGirl.create(:admin_user, password: "boxen1011") }

  scenario "It allows for the update of print invoice settings" do
    visit spree.admin_path

    fill_in "Email", with: user.email
    fill_in "Password", with: "boxen1011"
    click_button "Login"

    click_link "Settings"

    select "Times Roman", from: "print_invoice_font_face"
    fill_in "print_invoice_next_number", with: "150"
    fill_in "print_invoice_logo_scale", with: "60"

    click_button "Update"
    visit current_path

    expect(find("#print_invoice_font_face").value).to eql("Times-Roman")
    expect(find("#print_invoice_next_number").value).to eql("150")
    expect(find("#print_invoice_logo_scale").value).to eql("60")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_print_invoice-1.0.2 spec/features/admin_invoice_settings_spec.rb