Sha256: a11db5ab58a7fe22faa103c1b7186f070892427af8e8736926da4836114ea767

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

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

  it "create new page" do
    admin_sign_in
    visit "#{cama_root_relative_path}/admin/post_type/7/posts/new"
    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.")')

      fill_in 'post_keywords', :with => 'test keywords'
    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"
    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")')
      fill_in 'post_keywords', :with => 'test keywords changed'
    end
    click_button 'Update'
    expect(page).to have_css('.alert-success')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
camaleon_cms-2.3.6 spec/features/pages_spec.rb
camaleon_cms-2.3.5 spec/features/pages_spec.rb
camaleon_cms-2.3.4 spec/features/pages_spec.rb