diff options
Diffstat (limited to 'spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb b/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb index 5c63d6a973d..0334187e4b1 100644 --- a/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb +++ b/spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb @@ -78,6 +78,18 @@ RSpec.shared_examples 'User updates wiki page' do expect(page).to have_content('My awesome wiki!') end + it 'saves page content in local storage if the user navigates away', :js do + fill_in(:wiki_title, with: "Test title") + fill_in(:wiki_content, with: "This is a test") + fill_in(:wiki_message, with: "Test commit message") + + refresh + + expect(page).to have_field(:wiki_title, with: "Test title") + expect(page).to have_field(:wiki_content, with: "This is a test") + expect(page).to have_field(:wiki_message, with: "Test commit message") + end + it 'updates the commit message as the title is changed', :js do fill_in(:wiki_title, with: '& < > \ \ { } &') |