Skip to content

Instantly share code, notes, and snippets.

@knowuh
Created May 30, 2012 20:06
Show Gist options
  • Save knowuh/2838614 to your computer and use it in GitHub Desktop.
Save knowuh/2838614 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<testsuite errors="0" failures="2" name="Student can not see deactivated offerings" skipped="0" tests="2" time="3.848014">
<testcase classname="Student can not see deactivated offerings.Student should not see deactivated offerings" name="Student should not see deactivated offerings" time="3.464007">
<failure message="failed Student should not see deactivated offerings" type="failed">
<![CDATA[Scenario: Student should not see deactivated offerings
Given The default project and jnlp resources exist using factories
And the following students exist:
And the following teachers exist:
And the following classes exist:
And the following simple investigations exist:
And the following resource pages exist:
And I login with username: teacher password: teacher
And the student "student" belongs to class "My Class"
And the investigation "Test Investigation" is assigned to the class "My Class"
And the resource page "Test Resource" is assigned to the class "My Class"
When I am on the class page for "My Class"
And I follow "Deactivate" on the investigation "Test Investigation" from the class "My Class"
And I follow "Deactivate" on the resource page "Test Resource" from the class "My Class"
And I log out
And I login with username: student password: student
Then I should be on the homepage
And I should not see "run Test Investigation"
And I should not see "View Test Resource"
And I should see "No offerings available."
When I am on the class page for "My Class"
And I should not see "run Test Investigation"
And I should see "No offerings available."
And I should not see "View Test Resource"
Message:
]]>
<![CDATA[expected there to be content "No offerings available." in "Cross Project Portal\n//<![CDATA[\ntinyMCE.init({\n theme : 'advanced',\n mode : 'textareas',\n plugins : \"paste, safari\",\n width : '100%',\n height : '100%',\n editor_deselector : \"mceNoEditor\",\n auto_resize : true,\n remove_script_host : false,\n relative_urls : false,\n content_css : \"/stylesheets/otml.css, /stylesheets/project.css\",\n gecko_spellcheck : true,\n theme_advanced_resizing : true,\n theme_advanced_resizing_use_cookie : true,\n theme_advanced_toolbar_location : 'top',\n theme_advanced_buttons1 : 'bold,italic,underline,|,sup,sub,|,bullist,numlist,|,link,image,|,pastetext,pasteword,selectall,|,justifyleft,justifycenter,justifyright',\n theme_advanced_buttons2 : '',\n theme_advanced_buttons3 : '',\n paste_auto_cleanup_on_paste : true,\n paste_preprocess : function(pl, o) {\n // Content string containing the HTML from the clipboard\n // alert(o.content);\n },\n paste_postprocess : function(pl, o) {\n // Content DOM node containing the DOM structure of the clipboard\n // alert(o.node.innerHTML);\n },\n theme_advanced_statusbar_location : 'bottom',\n convert_newlines_to_brs : false,\n convert_fonts_to_spans : true,\n theme_advanced_path : false\n});\n\n//]]>\n\n//<![CDATA[\nvar container_id = 2;\n//]]>\n\n//<![CDATA[\nvar container_type = 'Portal::Clazze';\n//]]>\n\n\n\n\n\n\n\nPlease\nwait\nwhile your activity loads.\nThis may take several minutes.\n\ncounter\n\n\n\n\n\n\n\n\n\n\ncancel\n\n\n\n\n\n\nrun\n\n\nthe activity now\n\n\n\n, or\n\nadd collaborators\n\n\n\n\n\nadd collaborators\n\nadd\n\n\n\n\nloading collaborator list. Please wait.\n\n\nerror loading calaborator list. (try again?)\n\n\nexisting collaborators:\n\n\n\n\ntemplates:\n\n\n\n\nName Text\n\n\n\nok\n\n\n\n\n\n\nsorry. your password is wrong.\n\n\n\n\n\n\n\n\n\n\nSkip to main content.\n\n\n\n\n\nWelcome\njoe user.\n\nPreferences\nLogout\n\n\n\nCross Project Portal\n\n\n\n\nNavigation:\n\nHome\nAbout\nInvestigations\n\n\n\n\n\n\n\n\n\n\n\n\n\nMy Class\n\n\n\n\n\n\n\n\nTeacher:\n\njoe user\n\n\n\n\n\n\n\nInvestigations:\n\n\n\n\n\n\n\n\n\n\n\nRecent Activity\n\n\nMy Class\n\n\n\n\n\n\n\n\n\nCopyright\n\n©\n\n2012\nConcord Consortium. All rights reserved.\n\n\nQuestions/Feedback:\neval(decodeURIComponent('%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%5c%22%6d%61%69%6c%74%6f%3a%78%70%72%6f%6a%65%63%74%40%63%6f%6e%63%6f%72%64%2e%6f%72%67%3f%73%75%62%6a%65%63%74%3d%44%45%46%41%55%4c%54%25%32%30%71%75%65%73%74%69%6f%6e%5c%22%3e%53%65%6e%64%20%75%73%20%61%6e%20%65%6d%61%69%6c%3c%5c%2f%61%3e%27%29%3b'))\n\n\n\n\n\n\n\n\n" (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/web_steps.rb:107:in `/^(?:|I )should see "([^"]*)"$/'
features/student_can_not_see_deactivated_offerings.feature:47:in `And I should see "No offerings available."']]>
</failure>
</testcase>
</testsuite>
@knowuh
Copy link
Author

knowuh commented May 30, 2012

You can see on line 34 cucumber is reporting the content is missing from a string, which includes a entry.
This expectation is itself wrapped in a CDTATA tag for the reporting XML.
Nested CDATA elements are not permitted in xml.

Its unclear who is to blame here. ci_reporter could possibly be expected to escape CDATA entries....

The CDATA itself is being generated by the HAML :javascript filters.

We should be more selective in where we look to match content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment