@works Feature: Parsing HTML # tests for parsing only are in spec/lib/html_cleaner_spec.rb Scenario: Editing a work and saving it twice without changes should preserve the same content When I am logged in as "newbie" And I set up the draft "My Awesome Story" And I fill in "content" with """ This is paragraph 1. This is paragraph 2. This is paragraph 3. """ And I press "Preview" Then I should see "Preview" # testing the HTML here And I should see the text with tags """
This is paragraph 1.
This is paragraph 2.
This is paragraph 3.
""" When I press "Post" And I follow "Edit" # testing the textarea content here Then I should see in the "content" input """This is paragraph 1.
This is paragraph 2.
This is paragraph 3.
""" When I press "Post" And I follow "Edit" Then I should see in the "content" input """This is paragraph 1.
This is paragraph 2.
This is paragraph 3.
""" Scenario: HTML Parser should kick in When I am logged in as "newbie" And I set up the draft "My Awesome Story" And I fill in "content" with """ A paragraph Another paragraph. """ And I press "Preview" Then I should see "Preview" And I should see the text with tags """A paragraph
Another paragraph.
""" Scenario: Work notes and content HTML can have classes and they are kept when editing after previewing Given I am logged in as a random user And I set up the draft "Classy Work" When I fill in "Summary" with "Text
" And I fill in "Notes" with "Text
" And I fill in "End Notes" with "Text" And I fill in "content" with "
You better work
Text
" And I fill in "Notes" with "Text
" And I fill in "End Notes" with "Text" And I fill in "content" with "The continuation of my masterpiece
The continuation of my masterpiece
' When I follow "Edit Chapter" Then the "Chapter Summary" field should not contain "summary classes" And the "Notes" field should contain "note" And the "End Notes" field should contain "keep-me" And the "content" field should contain "elaborate formatting" Scenario: Can't use classes in comment content Given the work "Generic Work" And I am logged in as "commenter" And I view the work "Generic Work" When I fill in "Comment" with "Hi there!
" And I press "Comment" Then I should see "Comment created!" When I follow "Edit" Then the "Comment" field should not contain "strip me" Scenario: Can't use classes in a bookmark note Given the work "Really Good Thing" And I am logged in as "bookmarker" When I bookmark the work "Really Good Thing" with the note "My best yet" And I edit the bookmark for "Really Good Thing" Then the "Notes" field should not contain "remove-me"