Sha256: abc779958b243aa0840a62ed8830415de59e3edfa7ff8f3138ef0f4ce7283b85

Contents?: true

Size: 1.4 KB

Versions: 30

Compression:

Stored size: 1.4 KB

Contents

require "rails_helper"
describe "the signin process", js: true do
  init_site

  it "create new page" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/post_type/7/posts/new"
    wait(2)
    screenshot_and_save_page
    within("#form-post") do
      fill_in 'post_title', :with => 'Test Title'
      page.execute_script('$("#form-post .required").val("test required value")')
      page.execute_script('$("#form-post .tinymce_textarea").tinymce().setContent("Pants are pretty sweet.")')
      page.execute_script('$("#form-post #options_keywords").closest(".panel").find("a.panel-collapse").click()')
      fill_in 'options[seo_title]', :with => 'SEO Title'
      fill_in 'options[keywords]', :with => 'Test keywords changed'
      fill_in 'options[seo_description]', :with => 'Test SEO Description'
      fill_in 'options[seo_author]', :with => 'Test SEO Author'
    end
    click_button 'Create'
    expect(page).to have_css('.alert-success')
  end

  it "create edit page" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/post_type/7/posts/#{get_content_attr("page", "id", "last")}/edit"
    wait(2)
    within("#form-post") do
      fill_in 'post_title', :with => 'Test Title changed'
      page.execute_script('$("#form-post .tinymce_textarea").tinymce().setContent("Pants are pretty sweet. chaged")')
    end
    click_button 'Update'
    expect(page).to have_css('.alert-success')
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
camaleon_cms-2.6.4 spec/features/admin/pages_spec.rb
camaleon_cms-2.6.3 spec/features/admin/pages_spec.rb
camaleon_cms-2.6.2 spec/features/admin/pages_spec.rb
camaleon_cms-2.6.1 spec/features/admin/pages_spec.rb
camaleon_cms-2.6.0.1 spec/features/admin/pages_spec.rb
camaleon_cms-2.6.0 spec/features/admin/pages_spec.rb
camaleon_cms-2.5.3.1 spec/features/admin/pages_spec.rb
camaleon_cms-2.5.3 spec/features/admin/pages_spec.rb
camaleon_cms-2.5.2 spec/features/admin/pages_spec.rb
camaleon_cms_rails6-2.5.0 spec/features/admin/pages_spec.rb
camaleon_cms-2.5.1 spec/features/admin/pages_spec.rb
camaleon_cms-2.5.0 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.9 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.8 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.7 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.6 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.5 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.4 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.3 spec/features/admin/pages_spec.rb
camaleon_cms-2.4.6.2 spec/features/admin/pages_spec.rb