Sha256: 65529a87360f63ff7eee297a5a7ed36a9a2305bf31a058b6f6c56260dee1a547
Contents?: true
Size: 1.37 KB
Versions: 22
Compression:
Stored size: 1.37 KB
Contents
require "rails_helper" describe "the signin process", js: true do login_success it "create new post" do admin_sign_in visit "#{cama_root_relative_path}/admin/post_type/2/posts/new" wait(2) within("#form-post") do fill_in 'post_title', :with => 'Test Title' page.execute_script('$("#form-post .tinymce_textarea").tinymce().setContent("Pants are pretty sweet.")') page.execute_script('$("#form-post input[name=\'categories[]\']:first").prop("checked", true)') wait(2) fill_in 'post_summary', :with => 'test summary' page.execute_script("$('#form-post input[name=\"tags\"]').val('owen,dota')") end click_button 'Create' expect(page).to have_css('.alert-success') end it "create edit post" do admin_sign_in visit "#{cama_root_relative_path}/admin/post_type/2/posts/#{get_content_attr("post", "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")') fill_in 'post_summary', :with => 'test summary changed' end click_button 'Update' expect(page).to have_css('.alert-success') # visit page in frontend visit "#{get_content_attr("post", "the_path", "last")}" expect(page).to have_content("Test Title changed") end end
Version data entries
22 entries across 22 versions & 1 rubygems