Skip to content

Commit

Permalink
Add regression test for save-and_continue after previewing
Browse files Browse the repository at this point in the history
  • Loading branch information
bricesanchez committed Dec 17, 2017
1 parent e642e00 commit f38f98c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pages/spec/features/refinery/admin/pages_spec.rb
Expand Up @@ -327,6 +327,30 @@ module Admin
window.close window.close
end end


# Regression test for save-and_continue after previewing
# https://github.com/refinery/refinerycms/issues/3328
it 'will save-and-continue after show the preview in a new window' do
visit refinery.admin_pages_path

find('a[tooltip^=Edit]').click
fill_in "Title", :with => "Save this"

window = window_opened_by do
click_button "Preview"
end

expect_window_with_content("Save this", window: window)
expect_window_without_content(
::I18n.t('switch_to_website', :scope => 'refinery.site_bar'),
window: window
)

window.close

click_button "Save & continue editing"
expect(page).to have_content("'Save this' was successfully updated")
end

it 'will show pages with inherited templates', js:true do it 'will show pages with inherited templates', js:true do
visit refinery.admin_pages_path visit refinery.admin_pages_path


Expand Down

0 comments on commit f38f98c

Please sign in to comment.