@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 "

Britney SpearsYou better work

" And I press "Preview" Then I should see "Draft was successfully created." And I should see the image "src" text "http://www.example.org/britney.gif" And I should see the image "alt" text "Britney Spears" When I press "Edit" Then the "Summary" field should not contain "myclass" And the "Notes" field should contain "note" And the "End Notes" field should contain "keep-me" And the "content" field should contain "size-10" When I press "Post" Then I should see "Work was successfully posted." And I should see the image "src" text "http://www.example.org/britney.gif" Scenario: Chapter notes and content HTML keep classes when previewing before posting Given I am logged in as a random user And I post the work "Classy Multichapter Work" And a chapter is set up for "Classy Multichapter Work" When I fill in "Chapter Summary" with "

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

" And I press "Preview" Then I should see "This is a draft chapter in a posted work." When I press "Post" Then I should see "Chapter was successfully posted." And I should see the text with tags '

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"