merge 24067001082c
authorymh <ymh.work@gmail.com>
Mon, 05 May 2014 11:36:41 +0200
changeset 647 c28be856aad5
parent 645 4d1aa030e746 (current diff)
parent 646 24067001082c (diff)
child 648 c8b44a569549
merge 24067001082c
--- a/test-suite/tests/001_comt_test_utils.js	Mon May 05 11:17:48 2014 +0200
+++ b/test-suite/tests/001_comt_test_utils.js	Mon May 05 11:36:41 2014 +0200
@@ -8,7 +8,10 @@
  * Constants and variables
  */
 
-var test_comt = { 'text_nb': 0,	'user_nb': 4 };
+var test_comt = { text_nb: 0, user_nb: 4, long_text: '' };
+
+for (var i = 20; i--;)
+    test_comt.long_text += 'Contenu du troisième texte.<br/>Sur <b>plusieurs</b> lignes<br/>';
 
 const C = { 'HIDDEN': false,
 	'H': false,
@@ -27,7 +30,37 @@
 	'#id_workspace_category_5': 'ws_cat_5',
 	'#id_custom_css': "h2 {  font-family: Test_Sopinspace !important; }",
 	'#id_custom_font': 'Test_Sopinspace_custom_font',
-	'#id_custom_titles_font': 'Test_Sopinspace_custom_titles_font'
+	'#id_custom_titles_font': 'Test_Sopinspace_custom_titles_font',
+	'TEXTS': [
+	    {
+	        '#id_title':    'Text One Sopinspace-Test éléguant',
+	        '#id_format':   'markdown',
+	        '#id_content':  'Contenu du premier texte.\nSur plusieurs lignes\nPour tester un cas réaliste',
+	        '#id_tags':     'test_text, Text Premier'
+	    },
+	    {
+	        '#id_title':    'Text Two Sopinspace-Test éléguant',
+	        '#id_format':   'rst',
+	        '#id_content':  'Contenu du deuxième texte.\nSur plusieurs lignes aussi\nPour tester un cas réaliste',
+	        '#id_tags':     'test_text, Text Second'
+	    },
+	    {
+	        '#id_title':    'Text Three Sopinspace-Test éléguant',
+    	    '#id_format':   'html',
+	        '#id_content':  test_comt.long_text,
+	        '#id_tags':     'test_text, Text Troisième'
+	    }
+	],
+	'USERS': [
+	    {}, // to start counting at one
+		// SID roles should be : '', 4, 2, 5 ; but we're facing a bug here 
+	    { name: 'admin',        email: 'admin@mail.com',            date:'March 8, 2014 at 3:12 p.m.', role:'' },
+	    { name: 'user-com',     email: 'user-com@example.com',      date:'March 9, 2014 at 2:40 p.m.', role:'5'},
+    	{ name: 'user-edit',    email: 'user-edit@example.com',     date:'March 9, 2014 at 2:40 p.m.', role:'5'},
+	    { name: 'user-observ',  email: 'user-observ@example.com',   date:'March 9, 2014 at 2:40 p.m.', role:'5'},
+	    { '#id_tags': 'user-created-1',   '#id_email': 'uc1@example.com',   '#id_role':'2'},
+	    { '#id_tags': 'user-created-2',   '#id_email': 'uc2@example.com',   '#id_role':'4'}
+	]
 };
 
 
@@ -67,6 +100,19 @@
 	test_comt.text_nb++;
 }
 
+function test_comt_create_user (u) {
+    test_page_loading   ('/user/add/', 'Add a new user\n - '+C['#id_workspace_name']);
+	test_fill_field ('#id_email', u);
+	test_fill_field ('#id_tags', u);
+
+    test ('test creation', dsl(function () {
+        dropdownlist ('#id_role').option (u['#id_role']);
+    }));
+
+    test_click   ('#user input[type="submit"]', C.WAIT_PAGE_LOAD);
+    test_comt.user_nb++;
+}
+
 
 /**
  * Other factorized tests
--- a/test-suite/tests/011_comt-logged-admin.js	Mon May 05 11:17:48 2014 +0200
+++ b/test-suite/tests/011_comt-logged-admin.js	Mon May 05 11:36:41 2014 +0200
@@ -137,7 +137,7 @@
 	});
 
 	suite ('edit password page conformity', function () {
-		test_page_loading	('/profile-pw/', 'Your profile [(]'+C.W.USER_ADMIN+'[)]\n - '+C['#id_workspace_name']);
+		test_page_loading ('/profile-pw/', 'Your profile [(]'+C.W.USER_ADMIN+'[)]\n - '+C['#id_workspace_name']);
 		test_comt_logged_header	(C.W.USER_ADMIN, C.NO_TAGLINE);
 		test_count	('#content ul.sub_list:eq(0) a', 1);
 		test_text	('#content ul.sub_list:eq(0) a:eq(0)[href="/profile/"]', 'Profile');
@@ -149,87 +149,6 @@
 		test_comt_unlogged_footer ();
 	});
 
-	suite ('people list page conformity', function () {
-		test_page_loading	('/user/', 'People\' list\n - '+C['#id_workspace_name']);
-		test_comt_logged_header	(C.W.USER_ADMIN);
-		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
-		test_count	('#user ul.sub_list:eq(0) a', 2);
-		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/add/"]', 'Add a new user');
-		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/mass-add/"]', 'Add users in bulk');
-		test_text	('#filter_form a[href="?display=1"]', 'Display suspended users');
-		test_count	('form#filter_form[action="."] :input', 1);
-		test_text	('select#tag_selected option:eq(0)[selected][value="0"]', '- All -', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(0)[selected][value="-1"]', '- Bulk Actions -', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(1)[value="disable"]', 'Suspend access', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(2)[value="enable"]', 'Enable access', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(3)[value="role_1"]', 'Change role to Manager', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(4)[value="role_2"]', 'Change role to Editor', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(5)[value="role_3"]', 'Change role to Moderator', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(6)[value="role_4"]', 'Change role to Commentator', C.HIDDEN);
-		test_text	('select#bulk_actions option:eq(7)[value="role_5"]', 'Change role to Observer', C.HIDDEN);
-		test_val	('form#user_form input#apply[type=button][disabled]', 'Apply');
-		test_match  ('#paginator', /\s1-4 of 4\s/m);
-		test_count	('table.large_table:eq(1) th', 6);
-		test_val	('table.large_table:eq(1) th:eq(0) input#all_check[type="checkbox"]', 'on');
-		test_text	('table.large_table:eq(1) th:eq(1) a[href="?order=user__username"]', 'User');
-		test_text	('table.large_table:eq(1) th:eq(2) a[href="?order=user__email"]', 'Email');
-		test_text	('table.large_table:eq(1) th:eq(3) a[href="?order=-user__date_joined"]', 'Date joined');
-		test_text	('table.large_table:eq(1) th:eq(4) a[href="?order=role__name"]', 'Role');
-		test_text	('table.large_table:eq(1) th:eq(5)', 'Last week activity');
-		test_text	('table.large_table:eq(1) tr:last a[href="/user/-/edit/"]', 'Anonymous users');
-		test_text	('table.large_table:eq(1) a.main_object_title[href="/profile/"]', C.W.USER_ADMIN);
-		test_text	('table.large_table:eq(1) div.hidden-user-actions a[href="/profile/"]', 'Your profile');
-		test_val	('form#user_form input#save[type="submit"][disabled]', 'Save');
-		test_exist	('#user_form tr:eq(1) td:eq(4) select[disabled]');
-		test_count	('#user_form tr:eq(1) td:eq(4) select[disabled] option', 6);
-		test_text	('#user_form tr:eq(1) td:eq(4) select option:eq(0)[value=""][selected]', '---------', C.H);
-		test_text	('#user_form tr:eq(1) td:eq(4) select[disabled] option:eq(1)[value="1"]', 'Manager', C.H);
-		test_text	('#user_form tr:eq(1) td:eq(4) select[disabled] option:eq(2)[value="2"]', 'Editor', C.H);
-		test_text	('#user_form tr:eq(1) td:eq(4) select[disabled] option:eq(3)[value="3"]', 'Moderator', C.H);
-		test_text	('#user_form tr:eq(1) td:eq(4) select[disabled] option:eq(4)[value="4"]', 'Commentator', C.H);
-		test_text	('#user_form tr:eq(1) td:eq(4) select[disabled] option:eq(5)[value="5"]', 'Observer', C.H);
-		test_val	('#user_form tr:eq(2) td:eq(4) select', '5'); // this is a bug should be 4
-		test_val	('#user_form tr:eq(3) td:eq(4) select', '5'); // this is a bug should be 2
-		test_val	('#user_form tr:eq(4) td:eq(4) select', '5');
-		test_exist	('#user_form tr:eq(6) td:eq(4) select');
-		test_count	('#user_form tr:eq(6) td:eq(4) select option', 3);
-		test_text	('#user_form tr:eq(6) td:eq(4) select option:eq(0)[value=""][selected]', '---------', C.H);
-		test_text	('#user_form tr:eq(6) td:eq(4) select option:eq(1)[value="4"]', 'Commentator', C.H);
-		test_text	('#user_form tr:eq(6) td:eq(4) select option:eq(2)[value="5"]', 'Observer', C.H);
-		test_exist	('#user_form tr:eq(1) td:eq(0) input[type=checkbox][disabled]');
-		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(0)[href^="/user/"][href$="/edit/"]', 'Edit');
-		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(1)[href^="/use"][href$="ontact/"]', 'Contact');
-		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(2)[id^="user-suspend-"]', 'Suspend access');
-		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(3)[id^="user-resen"]', '(Re-)send invitation');
-		test_comt_unlogged_footer ();
-	});
-
-	suite ('check user number', function () {
-		test_page_loading	('/user/?display=1', 'People\' list\n - '+C['#id_workspace_name']);
-		test_count	('#user_form :input', 6 + (test_comt.user_nb % 10) * 2);
-		test_match	('#paginator', new RegExp ('\\s\\d+-\\d+ of '+test_comt.user_nb+'\\s','m'));
-	});
-
-	suite ('Reset fixture user roles', function () {
-		test        ('set user-com Commentator', dsl(function () {
-			input ('#user_form tr:eq(2) td:eq(4) select').option ('4');
-			input ('#user_form tr:eq(3) td:eq(4) select').option ('2');
-			input ('#user_form tr:eq(4) td:eq(4) select').option ('5');
-			input ('#save').prop ('disabled', false);
-		}));
-		test_click	('#save', C.WAIT_PAGE_LOAD);
-		test_page_loading ('/user/', 'People\' list\n - '+C['#id_workspace_name']);
-		test_val	('#user_form tr:eq(2) td:eq(4) select option:selected', '4');
-		test_val	('#user_form tr:eq(3) td:eq(4) select option:selected', '2');
-		test_val	('#user_form tr:eq(4) td:eq(4) select option:selected', '5');
-
-
-		// TOTEST roles of users
-		// TOTEST : filter by tag -> commentator user should be tagged commentator (to change in fixture)
-		// TOTEST : pagination
-		// TOTEST : Bulk Actions -> Apply does enable
-		// TOTEST display suspended users
-	});
 
 	suite ('add a user page conformity', function () {
 		test_page_loading	('/user/add/', 'Add a new user\n - '+C['#id_workspace_name']);
@@ -282,7 +201,6 @@
 		test_text	('select#id_role option:eq(5)[value="5"]', 'Observer', C.HIDDEN);
 		test_val	('#user :input:eq(4)[type=submit]', 'Add users');
 		test_val	('#user :input:eq(5)#cancel_button[type=button]', 'Cancel');
-		// X TOTEST add users (pending) -> can't be deleted
 		test_comt_unlogged_footer ();
 		test_click	('#user input[type="submit"]', C.WAIT_PAGE_LOAD);
 		test_count	('div.help_text span.error-text', 1);
@@ -290,6 +208,55 @@
 		test_match	('#user div.help_text:eq(0) span.error-text:eq(0)', /This field is required/m);
 	});
 
+	suite ('edit anonymous user page conformity', function () {
+		test_page_loading	('/user/-/edit/', 'Edit anonymous users\n - '+C['#id_workspace_name']);
+		test_comt_logged_header	(C.W.USER_ADMIN);
+		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
+		test_count	('#user ul.sub_list:eq(0) a', 2);
+		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/"]', 'Users\' list');
+		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/add/"]', 'Add a new user');
+		test_count	('#user form[action="."] :input', 3);
+		test_field	('user', 'id_role', 'select', 0, 'Role');
+		test_count	('#user form[action="."] select option', 3);
+		test_text	('#user form[action="."] select option:eq(0)[value=""][selected]', '---------', C.H);
+		test_text	('#user form[action="."] select option:eq(1)[value="4"]', 'Commentator', C.H);
+		test_text	('#user form[action="."] select option:eq(2)[value="5"]', 'Observer', C.H);
+		test_val	('#user :input:eq(1)[type=submit]', 'Save');
+		test_val	('#user :input:eq(2)#cancel_button[type=button]', 'Cancel');
+		test_comt_unlogged_footer ();
+	});
+
+	suite ('edit user-com page conformity', function () {
+		test_page_loading	('/user/3sh3WZqNzXs/edit/', 'Edit user user-com\n - '+C['#id_workspace_name']);
+		test_comt_logged_header (C.W.USER_ADMIN);
+		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
+		test_count	('#user ul.sub_list:eq(0) a', 2);
+		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/"]', 'Users\' list');
+		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/add/"]', 'Add a new user');
+		test_count	('#user form[action="."] :input', 8);
+		test_field	('user', 'id_email',		'text',		0, 'E-mail address', true);
+		test_field	('user', 'id_first_name',	'text',		1, 'First name');
+		test_field	('user', 'id_last_name', 	'text',		2, 'Last name');
+		test_field	('user', 'id_is_suspended',	'checkbox',	3, 'Suspended access');
+		test_field	('user', 'id_tags',			'text',		4, 'Tags');
+		test_field	('user', 'id_role',			'select',	5, 'Workspace level role');
+		test_count	('select#id_role option', 6);
+		test_text	('select#id_role option:eq(0)[value]', '---------', C.HIDDEN);
+		test_text	('select#id_role option:eq(1)[value="1"]', 'Manager', C.HIDDEN);
+		test_text	('select#id_role option:eq(2)[value="2"]', 'Editor', C.HIDDEN);
+		test_text	('select#id_role option:eq(3)[value="3"]', 'Moderator', C.HIDDEN);
+		test_text	('select#id_role option:eq(4)[value="4"]', 'Commentator', C.HIDDEN);
+		test_text	('select#id_role option:eq(5)[value="5"][selected]', 'Observer', C.HIDDEN);
+		test_val	('#user :input:eq(6)[type=submit]', 'Save');
+		test_val	('#user :input:eq(7)#cancel_button[type=button]', 'Cancel');
+		test_comt_unlogged_footer ();
+		test_fill_field	('#id_email', {'#id_email': ''});
+		test_click	('#user input[type="submit"]', C.WAIT_PAGE_LOAD);
+		test_count	('div.help_text span.error-text', 1);
+		test_field	('user div.error', 'id_email', 'text', 0, 'E-mail address', true);
+		test_match	('#user div.help_text:eq(0) span.error-text:eq(0)', /This field is required/m);
+	});
+
 	suite ('settings page conformity', function () {
 		test_page_loading	('/settings/', 'Settings - '+C['#id_workspace_name']);
 		test_comt_logged_header	(C.W.USER_ADMIN);
@@ -302,16 +269,15 @@
 		test_field	('settings', 'id_workspace_registration', 'checkbox', 2, 'Workspace registration');
 		test_field	('settings', 'id_workspace_registration_moderation', 'checkbox', 3, 'Workspace registration moderation');
 		test_field	('settings', 'id_workspace_role_model', 'select', 4, 'Role model');
-		test_text	('select#id_workspace_role_model option:eq(0)[selected][value="generic"]', 'Generic', C.HIDDEN);
-		test_text	('select#id_workspace_role_model option:eq(1)[value="teacher"]', 'Class (education)', C.HIDDEN);
-		test_field	('settings', 'id_workspace_category_1', 'text', 5, 'Label for the first category of comments');
-		test_field	('settings', 'id_workspace_category_2', 'text', 6, 'Label for the second category of comments');
-		test_field	('settings', 'id_workspace_category_3', 'text', 7, 'Label for the third category of comments');
-		test_field	('settings', 'id_workspace_category_4', 'text', 8, 'Label for the fourth category of comments');
-		test_field	('settings', 'id_workspace_category_5', 'text', 9, 'Label for the fifth category of comments');
+		test_text	('select#id_workspace_role_model option:eq(0)[selected][value="generic"]', 'Generic', C.H);
+		test_text	('select#id_workspace_role_model option:eq(1)[value="teacher"]', 'Class (education)', C.H);
+		test_field	('settings', 'id_workspace_category_1','text',5,'Label for the first category of comments');
+		test_field	('settings', 'id_workspace_category_2','text',6,'Label for the second category of comments');
+		test_field	('settings', 'id_workspace_category_3','text',7,'Label for the third category of comments');
+		test_field	('settings', 'id_workspace_category_4','text',8,'Label for the fourth category of comments');
+		test_field	('settings', 'id_workspace_category_5','text',9,'Label for the fifth category of comments');
 		test_val	('#settings :input:eq(10)[type=submit]', 'Save');
 		test_val	('#settings :input:eq(11)#cancel_button[type=button]', 'Cancel');
-		// TOTEST Workspace registration feature (with newly accessible page)
 		test_comt_unlogged_footer ();
 	});
 
@@ -340,13 +306,16 @@
 		test_match	('#followup a:eq(1)[href$="/feed/"]', new RegExp (C.W.WORKSPACE_URL+'feed/', 'm'));
 		test_text	('#followup a:eq(2)[href="/help/#public_private_feed"]', '?');
 		test_count	('form#followup_form[action="."] :input', 3);
-		test_val	('form#followup_form input[type=submit]', '(Activate private feed|Reset private feed url)');
-		test_val	('form#followup_form input#workspace_notify_check[type=checkbox]', 'on');
-		test_val	('form#followup_form input#own_notify_check[type=checkbox]', 'on');
-	
-		// X TOTEST qu'une fois cliqué, le bouton a le nvo label, et qu'une adresse est disponible
-		// X TOTEST que si on reclique l'adresse est changée
-
+		test_val	('form#followup_form input#activate[type=submit]', 'Activate private feed');
+		test_click	('#activate', C.WAIT_PAGE_LOAD);
+		test_match	('#followup a:eq(3)[href^="/feed/"]', new RegExp (C.W.WORKSPACE_URL+'feed/(\\d|\\w)+/', 'm'));
+		test_val	('form#followup_form input#reset[type=submit]', 'Reset private feed url');
+		test_exist	('form#followup_form input#workspace_notify_check[type=checkbox]:not(:checked)');
+		test_exist	('form#followup_form input#own_notify_check:not(:checked)');
+		test_click	('#workspace_notify_check');
+		test_exist	('form#followup_form input#workspace_notify_check[type=checkbox]:checked');
+		test_exist	('form#followup_form input#own_notify_check:not(:visible)');
+		test_click	('#workspace_notify_check');
 		test_comt_unlogged_footer ();
 	});
 
--- a/test-suite/tests/012_comt-admin-text-list.js	Mon May 05 11:17:48 2014 +0200
+++ b/test-suite/tests/012_comt-admin-text-list.js	Mon May 05 11:36:41 2014 +0200
@@ -4,31 +4,6 @@
 // set softtabstop=4      " as above
 // set shiftwidth=4       " as above
 
-var long_text = '';
-
-for (var i = 20; i--;)
-    long_text += 'Contenu du troisième texte.<br/>Sur <b>plusieurs</b> lignes<br/>';
-
-const ctexts = [ 
-    { 
-        '#id_title':    'Text One Sopinspace-Test éléguant', 
-        '#id_format':   'markdown', 
-        '#id_content':  'Contenu du premier texte.\nSur plusieurs lignes\nPour tester un cas réaliste', 
-        '#id_tags':     'test_text, Text Premier' 
-    }, 
-    { 
-        '#id_title':    'Text Two Sopinspace-Test éléguant', 
-        '#id_format':   'rst', 
-        '#id_content':  'Contenu du deuxième texte.\nSur plusieurs lignes aussi\nPour tester un cas réaliste', 
-        '#id_tags':     'test_text, Text Second' 
-    }, 
-    { 
-        '#id_title':    'Text Three Sopinspace-Test éléguant', 
-        '#id_format':   'html', 
-        '#id_content':  long_text, 
-        '#id_tags':     'test_text, Text Troisième' 
-    } 
-];
 
 suite ('comt admin text list', function () {
 
@@ -49,7 +24,7 @@
     suite ('create texts', function () {
         for (var j=4; j--;)
             for (var i=3; i--;)
-                 test_comt_create_text (ctexts[i]);
+                 test_comt_create_text (C.TEXTS[i]);
     });
 
     suite ('texts list page conformity', function () {
@@ -81,7 +56,7 @@
         test_match  ('#paginator', /\s1-4 of 4\s/m);
 
         for (var i=4; i--;) {
-            test_text   ('a.main_object_title:eq('+i+')', ctexts[2]['#id_title']);
+            test_text   ('a.main_object_title:eq('+i+')', C.TEXTS[2]['#id_title']);
             test_match  ('.tag_list:eq('+i+')', /tags: test_text Text Troisième /);
             test_text   ('.tag_list:eq('+i+') a:eq(0)[href="?tag_selected=test_text"]', 'test_text');
             test_text   ('.tag_list:eq('+i+') a:eq(1)[href="?tag_selected=Text+Troisi%C3%A8me"]','Text Troisième');
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/013_comt-admin-user-list.js	Mon May 05 11:36:41 2014 +0200
@@ -0,0 +1,148 @@
+
+suite ('comt logged admin user list', function () {
+
+	this.timeout(20000);
+
+	suite ('people list page conformity', function () {
+		test_page_loading	('/user/', 'People\' list\n - '+C['#id_workspace_name']);
+		test_comt_logged_header (C.W.USER_ADMIN);
+		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
+		test_count	('#user ul.sub_list:eq(0) a', 2);
+		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/add/"]', 'Add a new user');
+		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/mass-add/"]', 'Add users in bulk');
+		test_text	('#filter_form a[href="?display=1"]', 'Display suspended users');
+		test_count	('form#filter_form[action="."] :input', 1);
+		test_text	('select#tag_selected option:eq(0)[selected][value="0"]', '- All -', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(0)[selected][value="-1"]', '- Bulk Actions -', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(1)[value="disable"]', 'Suspend access', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(2)[value="enable"]', 'Enable access', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(3)[value="role_1"]', 'Change role to Manager', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(4)[value="role_2"]', 'Change role to Editor', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(5)[value="role_3"]', 'Change role to Moderator', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(6)[value="role_4"]', 'Change role to Commentator', C.HIDDEN);
+		test_text	('select#bulk_actions option:eq(7)[value="role_5"]', 'Change role to Observer', C.HIDDEN);
+		test_val	('form#user_form input#apply[type=button][disabled]', 'Apply');
+		test_match	('#paginator', /\s1-4 of 4\s/m);
+		test_count	('table.large_table:eq(1) th', 6);
+		test_val	('table.large_table:eq(1) th:eq(0) input#all_check[type="checkbox"]', 'on');
+		test_text	('table.large_table:eq(1) th:eq(1) a[href="?order=user__username"]', 'User');
+		test_text	('table.large_table:eq(1) th:eq(2) a[href="?order=user__email"]', 'Email');
+		test_text	('table.large_table:eq(1) th:eq(3) a[href="?order=-user__date_joined"]', 'Date joined');
+		test_text	('table.large_table:eq(1) th:eq(4) a[href="?order=role__name"]', 'Role');
+		test_text	('table.large_table:eq(1) th:eq(5)', 'Last week activity');
+		test_text	('table.large_table:eq(1) tr:last a[href="/user/-/edit/"]', 'Anonymous users');
+		test_text	('table.large_table:eq(1) a.main_object_title[href="/profile/"]', C.W.USER_ADMIN);
+		test_text	('table.large_table:eq(1) div.hidden-user-actions a[href="/profile/"]', 'Your profile');
+		test_val	('form#user_form input#save[type="submit"][disabled]', 'Save');
+		test_exist	('#user_form tr:eq(1) td:eq(4) select[disabled]');
+		test_exist	('#user_form tr:eq(1) td:eq(0) input[type=checkbox][disabled]');
+
+		for (var i=1; i < 5; i++) {
+			test_text	('#user_form tr:eq('+i+') td:eq(1) a.main_object_title', C.USERS[i].name);
+			test_text	('#user_form tr:eq('+i+') td:eq(2) a[href="mailto:'+C.USERS[i].email+'"]', C.USERS[i].email);
+			test_text	('#user_form tr:eq('+i+') td:eq(3)', C.USERS[i].date);
+			test_count	('#user_form tr:eq('+i+') td:eq(4) select option', 6);
+			test_text	('#user_form tr:eq('+i+') td:eq(4) select option:eq(0)[value=""]', '---------', C.H);
+			test_text	('#user_form tr:eq('+i+') td:eq(4) select option:eq(1)[value="1"]', 'Manager', C.H);
+			test_text	('#user_form tr:eq('+i+') td:eq(4) select option:eq(2)[value="2"]', 'Editor', C.H);
+			test_text	('#user_form tr:eq('+i+') td:eq(4) select option:eq(3)[value="3"]', 'Moderator', C.H);
+			test_text	('#user_form tr:eq('+i+') td:eq(4) select option:eq(4)[value="4"]', 'Commentator', C.H);
+			test_text	('#user_form tr:eq('+i+') td:eq(4) select option:eq(5)[value="5"]', 'Observer', C.H);
+			test_val	('#user_form tr:eq('+i+') td:eq(4) select', C.USERS[i].role);
+		}
+
+		test_text	('#user_form tr:eq(6) td:eq(1) a.main_object_title[href="/user/-/edit/"]', 'Anonymous users');
+		test_text	('#user_form tr:eq(6) td:eq(2)', '-');
+		test_text	('#user_form tr:eq(6) td:eq(3)', '-');
+		test_exist	('#user_form tr:eq(6) td:eq(4) select');
+		test_count	('#user_form tr:eq(6) td:eq(4) select option', 3);
+		test_text	('#user_form tr:eq(6) td:eq(4) select option:eq(0)[value=""][selected]', '---------', C.H);
+		test_text	('#user_form tr:eq(6) td:eq(4) select option:eq(1)[value="4"]', 'Commentator', C.H);
+		test_text	('#user_form tr:eq(6) td:eq(4) select option:eq(2)[value="5"]', 'Observer', C.H);
+		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(0)[href^="/user/"][href$="/edit/"]', 'Edit');
+		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(1)[href^="/use"][href$="ontact/"]','Contact');
+		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(2)[id^="user-suspend-"]', 'Suspend access');
+		test_text	('#user_form div.hidden-user-actions:eq(1) a:eq(3)[id^="user-resen"]','(Re-)send invitation');
+		test_comt_unlogged_footer ();
+	});
+
+	suite_check_user_nb (1);
+
+	suite ('Reset fixture user roles', function () {
+		test		('set user-com Commentator', dsl(function () {
+			input ('#user_form tr:eq(2) td:eq(4) select').option ('4');
+			input ('#user_form tr:eq(3) td:eq(4) select').option ('2');
+			input ('#user_form tr:eq(4) td:eq(4) select').option ('5');
+			input ('#save').prop ('disabled', false);
+		}));
+		test_click	('#save', C.WAIT_PAGE_LOAD);
+		test_page_loading ('/user/', 'People\' list\n - '+C['#id_workspace_name']);
+		test_val	('#user_form tr:eq(2) td:eq(4) select option:selected', '4');
+		test_val	('#user_form tr:eq(3) td:eq(4) select option:selected', '2');
+		test_val	('#user_form tr:eq(4) td:eq(4) select option:selected', '5');
+	});
+
+	suite ('Add a single user', function () {
+		test_comt_create_user (C.USERS[5]);
+	});
+
+	suite_check_user_nb (2);
+
+	suite ('Add users in bulk', function () {
+		test_page_loading ('/user/mass-add/', 'Add users in bulk\n - '+C['#id_workspace_name']);
+	    test ('fill emails', dsl(function (){
+	        elt ('#id_email').val ('uc2@t.co,uc3@t.co,uc4@t.co,uc5@t.co,uc6@t.co,uc7@t.co');
+	    }));
+		test_fill_field	('#id_tags', {'#id_tags': 'tag_ucs, other_tag' });
+		// TOTEST fill note field
+		test_click  ('#user input[type="submit"]', C.WAIT_PAGE_LOAD);
+		test_comt.user_nb += 6;
+	});
+
+	suite_check_user_nb (3);
+
+    suite ('users list pagination conformity', function () {
+		test_page_loading	('/user/', 'People\' list\n - '+C['#id_workspace_name']);
+        test_count  ('#user_form :input', 6 + (test_comt.user_nb < 10 ? test_comt.user_nb : 10) * 2);
+        test_match  ('#paginator', new RegExp ('\\s1-10 of '+test_comt.user_nb+'\\s','m'));
+        test_text   ('#paginator a:eq(0)[href="?page=2"]', '»');
+        test_text   ('#paginator a:eq(1)[href="?paginate=0"]', 'all');
+        test_click  ('#paginator a:eq(0)[href="?page=2"]');
+        test_match  ('#paginator', new RegExp ('\\s11-11 of '+test_comt.user_nb+'\\s','m'));
+        test_count  ('#user_form :input', test_comt.user_nb % 10 * 2 + 6);
+        test_click  ('#paginator a:eq(0)[href="?page=1"]');
+        test_match  ('#paginator', new RegExp ('\\s1-10 of '+test_comt.user_nb+'\\s','m'));
+        test_count  ('#user_form :input', (test_comt.user_nb < 10 ? test_comt.user_nb : 10) * 2 + 6);
+        test_click  ('#paginator a:eq(1)[href="?paginate=0&page=1"]');
+        test_match  ('#paginator', /\s\(paginate\)\s/m);
+        test_count  ('#user_form :input', test_comt.user_nb * 2 + 6);
+        test_click  ('#paginator a:eq(0)[href="?paginate=&page=1"]');
+        test_count  ('#user_form :input', (test_comt.user_nb < 10 ? test_comt.user_nb : 10) * 2 + 6);
+        test_match  ('#paginator', new RegExp ('\\s1-10 of '+test_comt.user_nb+'\\s','m'));
+    });
+
+    suite ('users list filter by tag conformity', function () {
+		test_page_loading ('/user/?tag_selected=tag_ucs', 'People\' list\n - '+C['#id_workspace_name']);
+		test_count	('#user_form :input', 6 + 6 * 2);
+		test_match	('#paginator', new RegExp ('\\s1-6 of 6\\s','m'));
+		
+    });
+
+	// TOTEST : filter by tag -> commentator user should be tagged commentator (to change in fixture)
+	// TOTEST : Bulk Actions -> Apply does enable
+	// suspend users
+	// TOTEST display suspended users
+	// TOTEST user édition
+
+	// TOTEST suspended user can't login anymore
+	// TOTEST roles of users
+	// TOTEST si les users anonymes ont droits, ils ont droits…
+});
+
+function suite_check_user_nb (n) {
+	suite ('check user number #'+n, function () {
+		test_page_loading	('/user/?display=1', 'People\' list\n - '+C['#id_workspace_name']);
+		test_count	('#user_form :input', 6 + (test_comt.user_nb < 10 ? test_comt.user_nb : 10) * 2);
+		test_match	('#paginator', new RegExp ('\\s\\d+-\\d+ of '+test_comt.user_nb+'\\s','m'));
+	});
+}