Sha256: 0cb41b5d38d479aa72d2ebb496f04279bf62b0c92625525764cbf3bb65615080

Contents?: true

Size: 1.13 KB

Versions: 13

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

describe "Zones", type: :feature do
  stub_authorization!

  before(:each) do
    Spree::Zone.delete_all
    visit spree.admin_path
    click_link "Configuration"
  end

  context "show" do
    it "should display existing zones" do
      create(:zone, :name => "eastern", :description => "zone is eastern")
      create(:zone, :name => "western", :description => "cool san fran")
      click_link "Zones"

      within_row(1) { expect(page).to have_content("eastern") }
      within_row(2) { expect(page).to have_content("western") }

      click_link "zones_order_by_description_title"

      within_row(1) { expect(page).to have_content("western") }
      within_row(2) { expect(page).to have_content("eastern") }
    end
  end

  context "create" do
    it "should allow an admin to create a new zone" do
      click_link "Zones"
      click_link "admin_new_zone_link"
      expect(page).to have_content("New Zone")
      fill_in "zone_name", :with => "japan"
      fill_in "zone_description", :with => "japanese time zone"
      click_button "Create"
      expect(page).to have_content("successfully created!")
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spree_backend-3.1.5 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.4 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.3 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.2 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.0.10 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.1 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.0 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.0.rc4 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.0.9 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.0.rc3 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.0.rc2 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.1.0.rc1 spec/features/admin/configuration/zones_spec.rb
spree_backend-3.0.8 spec/features/admin/configuration/zones_spec.rb