Sha256: 9f1fc272330f52dd421ae061cb3bde8ea95518b14bdc030c62572a3a1553dfe6

Contents?: true

Size: 1.37 KB

Versions: 16

Compression:

Stored size: 1.37 KB

Contents

require "rails_helper"
describe "the Content Groups", js: true do
  login_success

  it "create new content group" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/settings/post_types"
    expect(page).to have_content('Post')
    expect(page).to have_content('Page')
    within("#post_type_form") do
      fill_in 'post_type_name', :with => 'Test cat'
      fill_in 'post_type_slug', :with => 'test-content'
      fill_in 'post_type_description', :with => 'test-content descri'
      check("Manage Multiple Categories")
      click_button 'Submit'
    end
    expect(page).to have_css('.alert-success')
  end

  it "edit content type" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/settings/post_types"
    within '#admin_content' do
      all("table .btn-default").last.click
    end
    within("#post_type_form") do
      expect(page).to have_checked_field("Manage Multiple Categories")
      fill_in 'post_type_name', :with => 'Test cat updated'
      fill_in 'post_type_slug', :with => 'test-content'
      click_button 'Submit'
    end
    expect(page).to have_css('.alert-success')
  end

  it "delete content type" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/settings/post_types"
    within '#admin_content' do
      all("table .btn-danger").last.click
    end
    confirm_dialog
    expect(page).to have_css('.alert-success')
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
camaleon_cms-2.4.5.5 spec/features/content_groups_spec.rb
camaleon_cms-2.4.5.4 spec/features/content_groups_spec.rb
camaleon_cms-2.4.5.3 spec/features/content_groups_spec.rb
camaleon_cms-2.4.5.2 spec/features/content_groups_spec.rb
camaleon_cms-2.4.5.1 spec/features/content_groups_spec.rb
camaleon_cms-2.4.5 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4.7 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4.6 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4.5 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4.4 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4.3 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4.2 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4.1 spec/features/content_groups_spec.rb
camaleon_cms-2.4.4 spec/features/content_groups_spec.rb
camaleon_cms-2.4.3.13 spec/features/content_groups_spec.rb
camaleon_cms-2.4.3.12 spec/features/content_groups_spec.rb