Sha256: 3c3231078bc8b48fbd48c7310d183605a87f37471d9111b66a25a24d541c9bc3

Contents?: true

Size: 961 Bytes

Versions: 9

Compression:

Stored size: 961 Bytes

Contents

require 'spec_helper'

describe 'Language tree 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'
      page.should 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'
      page.should have_content('This language tree does not exist')
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-3.0.4 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.3 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.2 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.1 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.0 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.0.rc8 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.0.rc7 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.0.rc6 spec/features/admin/language_tree_feature_spec.rb
alchemy_cms-3.0.0.rc5 spec/features/admin/language_tree_feature_spec.rb