correct test for dashboard under PhantomJS
authorymh <ymh.work@gmail.com>
Sat, 15 Mar 2014 10:03:04 +0100
changeset 618 2bcc27f6c5fb
parent 613 a0b695aace0a
child 619 2528df052b6c
correct test for dashboard under PhantomJS
src/cm/scripts/test-suite/tests/tests.js
src/cm/templates/site/dashboard.html
--- a/src/cm/scripts/test-suite/tests/tests.js	Thu Mar 13 18:19:43 2014 +0100
+++ b/src/cm/scripts/test-suite/tests/tests.js	Sat Mar 15 10:03:04 2014 +0100
@@ -182,11 +182,11 @@
 		test_count	('table.dash_table', 5);
 		test_text	('table.dash_table th:eq(0)', 'Actions');
 		test_match	('table.dash_table:eq(0) a:eq(0)[href="/create/content/"]', /\sCreate a text/);
-		test_text	('table.dash_table:eq(0) a:eq(1).tip[href="#"]', ' ');
+		test_text	('table.dash_table:eq(0) a:eq(1).tip[href="#"]', '\xa0');
 		test_match	('table.dash_table:eq(0) a:eq(2)[href="/create/upload/"]', /\sUpload a text/);
-		test_text	('table.dash_table:eq(0) a:eq(3).tip[href="#"]', ' ');
+		test_text	('table.dash_table:eq(0) a:eq(3).tip[href="#"]', '\xa0');
 		test_match	('table.dash_table:eq(0) a:eq(4)[href="/create/import/"]', /\sImport a co-mented text/);
-		test_text	('table.dash_table:eq(0) a:eq(5).tip[href="#"]', ' ');
+		test_text	('table.dash_table:eq(0) a:eq(5).tip[href="#"]', '\xa0');
 		test_match	('table.dash_table:eq(0) a:eq(6)[href="/user/add/"]', /\sInvite user/);
 		test_match	('table.dash_table:eq(0) a:eq(7)[href="/profile/"]', /\sEdit your profile/);
 		test_match	('table.dash_table:eq(0) a:eq(8)[href="/text/"]', /\sView text list/);
--- a/src/cm/templates/site/dashboard.html	Thu Mar 13 18:19:43 2014 +0100
+++ b/src/cm/templates/site/dashboard.html	Sat Mar 15 10:03:04 2014 +0100
@@ -45,9 +45,9 @@
 		</thead>
 		<tbody>
 	        <tr><td>	
-            {% if can_create_text %}<div class="dash_action"><a class="" href="{% url text-create-content %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/sop_write.png"/>&nbsp;{% blocktrans %}Create a text{% endblocktrans %}</a>&nbsp;<a class="tip" href="#" title="{% blocktrans %}Write a text inside your browser or paste a content from your clipboard{% endblocktrans %}"> </a></div>{% endif %}
-            {% if can_create_text %}<div class="dash_action"><a class="" href="{% url text-create-upload %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/sop_upload.png"/>&nbsp;{% blocktrans %}Upload a text{% endblocktrans %}</a>&nbsp;<a class="tip" href="#" title="{% blocktrans %}Upload a document from your computer (Text document, Open Format document, Word document){% endblocktrans %}"> </a></div>{% endif %}
-            {% if can_create_text %}<div class="dash_action"><a class="" href="{% url text-create-import %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/sop_import.png"/>&nbsp;{% blocktrans %}Import a co-mented text{% endblocktrans %}</a>&nbsp;<a class="tip" href="#" title="{% blocktrans %}Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface{% endblocktrans %}"> </a></div>{% endif %}
+            {% if can_create_text %}<div class="dash_action"><a class="" href="{% url text-create-content %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/sop_write.png"/>&nbsp;{% blocktrans %}Create a text{% endblocktrans %}</a>&nbsp;<a class="tip" href="#" title="{% blocktrans %}Write a text inside your browser or paste a content from your clipboard{% endblocktrans %}">&nbsp;</a></div>{% endif %}
+            {% if can_create_text %}<div class="dash_action"><a class="" href="{% url text-create-upload %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/sop_upload.png"/>&nbsp;{% blocktrans %}Upload a text{% endblocktrans %}</a>&nbsp;<a class="tip" href="#" title="{% blocktrans %}Upload a document from your computer (Text document, Open Format document, Word document){% endblocktrans %}">&nbsp;</a></div>{% endif %}
+            {% if can_create_text %}<div class="dash_action"><a class="" href="{% url text-create-import %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/sop_import.png"/>&nbsp;{% blocktrans %}Import a co-mented text{% endblocktrans %}</a>&nbsp;<a class="tip" href="#" title="{% blocktrans %}Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface{% endblocktrans %}">&nbsp;</a></div>{% endif %}
             {% if can_manage_workspace %}<div class="dash_action"><a class="" href="{% url user-add %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/group_add.png"/>&nbsp;{% blocktrans %}Invite user{% endblocktrans %}</a></div>{% endif %}
             <div class="dash_action"><a class="" href="{% url profile %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/user_edit.png"/>&nbsp;{% blocktrans %}Edit your profile{% endblocktrans %}</a></div>
             <div class="dash_action"><a class="" href="{% url text %}"><img align="middle" src="{{ CM_MEDIA_PREFIX }}img/page_white_stack.png"/>&nbsp;{% blocktrans %}View text list{% endblocktrans %}</a></div>