spec/features/posts_spec.rb in camaleon_cms-2.4.3.5 vs spec/features/posts_spec.rb in camaleon_cms-2.4.3.6
- old
+ new
@@ -3,10 +3,11 @@
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)
@@ -18,10 +19,11 @@
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
@@ -29,6 +31,6 @@
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
\ No newline at end of file
+end