Sha256: 4c490e173cb01c120a4e5d3c69facded975fda018763c508f65162a56f420860

Contents?: true

Size: 985 Bytes

Versions: 13

Compression:

Stored size: 985 Bytes

Contents

require 'spec_helper'

describe 'Language tree feature', type: :feature, js: true do

  let(:klingonian) { FactoryGirl.create(:klingonian) }
  let(:german_root) { FactoryGirl.create(:language_root_page) }
  let(:klingonian_root) { FactoryGirl.create(:language_root_page, :name => 'Klingonian', :language => klingonian) }

  before do
    german_root
    authorize_as_admin
  end

  context "in a multilangual environment" do
    before { klingonian_root }

    it "one should be able to switch the language tree" do
      visit('/admin/pages')
      page.select 'Klingonian', from: 'language_id'
      expect(page).to have_selector('#sitemap', text: 'Klingonian')
    end
  end

  context "with no language root page" do
    before { klingonian }

    it "it should display the form for creating language root" do
      visit('/admin/pages')
      page.select 'Klingonian', from: 'language_id'
      expect(page).to have_content('This language tree does not exist')
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
alchemy_cms-3.1.3 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.2.0.beta spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.1 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.rc3 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.rc2 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.rc1 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.beta6 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.beta5 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.beta4 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.beta3 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.beta2 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.1.0.beta1 spec/features/admin/language_tree_feature_spec.rb