Sha256: 37f814138df8ff8f315720a918512324a8e35ebf4e5d67d769a7f7b4c3cff280

Contents?: true

Size: 1.53 KB

Versions: 18

Compression:

Stored size: 1.53 KB

Contents

require "rails_helper"
describe "the Themes", js: true do
  login_success

  it "Widgets list" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/appearances/widgets/main"
    expect(page).to have_css('#view_widget_list')
    within "#view_widget_list" do
      first('#new_widget_link').click
      wait_for_ajax
    end
    screenshot_and_save_page
    within '#widget_form' do
      fill_in "widget_main_name", with: "test widget"
      fill_in "widget_main_slug", with: "test-widget"
      fill_in "widget_main_description", with: "lorem ipsum"
      click_button "Submit"
    end
    expect(page).to have_css('.alert-success')
    expect(page).to have_content("test-widget")
  end

  it "Widgets Edit" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/appearances/widgets/main"
    within "#view_widget_list" do
      first('.edit_link').click
      wait_for_ajax
    end
    within '#widget_form' do
      fill_in "widget_main_name", with: "test widget updated"
      fill_in "widget_main_slug", with: "test-widget-updated"
      fill_in "widget_main_description", with: "lorem ipsum updated"
      click_button "Submit"
    end
    expect(page).to have_css('.alert-success')
    expect(page).to have_content("test-widget-updated")
  end

  it "Widgets destroy" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/appearances/widgets/main"
    within "#view_widget_list" do
      first('.del_link').click
    end
    screenshot_and_save_page
    confirm_dialog
    expect(page).to have_css('.alert-success')
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
camaleon_cms-2.4.3.11 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.10 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.9 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.8 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.7 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.6 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.5 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.4 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.3 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.2 spec/features/widgets_spec.rb
camaleon_cms-2.4.3.1 spec/features/widgets_spec.rb
camaleon_cms-2.4.3 spec/features/widgets_spec.rb
camaleon_cms-2.4.2 spec/features/widgets_spec.rb
camaleon_cms-2.4.1 spec/features/widgets_spec.rb
camaleon_cms-2.4.0 spec/features/widgets_spec.rb
camaleon_cms-2.3.7.2 spec/features/widgets_spec.rb
camaleon_cms-2.3.7.1 spec/features/widgets_spec.rb
camaleon_cms-2.3.7 spec/features/widgets_spec.rb