test-suite/tests/011_comt-logged-admin.js
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Fri, 09 May 2014 16:49:53 +0200
changeset 650 2a07f8bda874
parent 646 24067001082c
permissions -rw-r--r--
increase timeout for dev env which is a little bit slower when creating user in bulk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     1
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     2
// " Vim settings
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     3
// set tabstop=4		  " number of spaces in a tab
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     4
// set softtabstop=4	  " as above
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     5
// set shiftwidth=4		  " as above
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     6
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     7
suite ('comt logged admin', function () {
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     8
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents: 636
diff changeset
     9
	this.timeout(20000);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    10
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    11
	suite ('logs as an admin', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    12
		test_comt_login (C.W.USER_ADMIN, C.W.PASS_ADMIN);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    13
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    14
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    15
	suite ('setting settings to test-values', function () {
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    16
		test_page_loading ('/settings/', 'Settings');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    17
		test_comt_fill_settings (C);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    18
		test_val	('#id_workspace_name', C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    19
		test_click	('#settings input[type="submit"]', C.WAIT_PAGE_LOAD);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    20
		test_page_loading	('/settings/', 'Settings');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    21
		test_text	('#content h1.main_title a[href="/"]', C['#id_workspace_name']);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    22
		test_page_loading	('/settings/design/', 'Settings');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    23
		test_comt_fill_design (C);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    24
		test_click	('#settings input[type="submit"]', C.WAIT_PAGE_LOAD);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    25
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    26
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    27
	suite ('admin dashboard page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    28
		test_page_loading ('/', 'Dashboard\n - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    29
		test_comt_logged_header (C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    30
		test_comt_default_tabs (test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    31
		test_count	('table.dash_table', 5);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    32
		test_text	('table.dash_table th:eq(0)', 'Actions');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    33
		test_match	('table.dash_table:eq(0) a:eq(0)[href="/create/content/"]', /\sCreate a text/);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    34
		test_text	('table.dash_table:eq(0) a:eq(1).tip[href="#"]', '\xa0');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    35
		test_match	('table.dash_table:eq(0) a:eq(2)[href="/create/upload/"]', /\sUpload a text/);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    36
		test_text	('table.dash_table:eq(0) a:eq(3).tip[href="#"]', '\xa0');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    37
		test_match	('table.dash_table:eq(0) a:eq(4)[href="/create/import/"]', /\sImport a co-mented text/);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    38
		test_text	('table.dash_table:eq(0) a:eq(5).tip[href="#"]', '\xa0');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    39
		test_match	('table.dash_table:eq(0) a:eq(6)[href="/user/add/"]', /\sInvite user/);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    40
		test_match	('table.dash_table:eq(0) a:eq(7)[href="/profile/"]', /\sEdit your profile/);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    41
		test_match	('table.dash_table:eq(0) a:eq(8)[href="/text/"]', /\sView text list/);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    42
		test_match	('table.dash_table:eq(0) a:eq(9)[href="/settings/"]', /\sConfigure workspace/);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    43
		test_text	('table.dash_table th:eq(1)', 'Recent texts (all)');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    44
		test_text	('table.dash_table:eq(1) a:eq(0)[href="/text/"]', 'all');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    45
		test_text	('table.dash_table th:eq(2)', 'Recent comments');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    46
		test_match	('table.dash_table th:eq(3)', /^Workspace activity\n\s+\(month\/week\/24 hours\)$/m);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    47
		test_text	('table.dash_table:eq(3) a:eq(0)[href="?span=month"]', 'month');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    48
		test_text	('table.dash_table:eq(3) a:eq(1)[href="?span=day"]', '24 hours');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    49
		test_text	('table.dash_table th:eq(4) span.em', 'Activities');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    50
		test_comt_unlogged_footer ();
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    51
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    52
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    53
	suite ('create a text page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    54
		test_page_loading	('/create/content/', 'Create a text - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    55
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    56
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    57
		test_count	('#text ul.sub_list:eq(0) a', 3);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    58
		test_text	('#text ul.sub_list:eq(0) a:eq(0)[href="/text/"]', 'Text list');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    59
		test_text	('#text ul.sub_list:eq(0) a:eq(1)[href="/create/upload/"]', 'Upload a text');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    60
		test_text	('#text ul.sub_list:eq(0) a:eq(2)[href="/create/import/"]', 'Import a co-mented text');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    61
		test_count	('#text form[action="."]:eq(0) :input', 6);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    62
		test_field	('text', 'id_title',	'text', 0, 'Title', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    63
		test_field	('text', 'id_format',	'select', 1, 'Format', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    64
		test_field	('text', 'id_content',	'textarea', 2, 'Content', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    65
		test_field	('text', 'id_tags',		'text', 3, 'Tags');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    66
		test_val	('#text :input:eq(4)[type=submit]', 'Save');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    67
		test_val	('#text :input:eq(5)#cancel_button[type=button]', 'Cancel');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    68
		test_count	('select#id_format option', 3);
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    69
		test_text	('select#id_format option:eq(0)[value="markdown"][selected]', 'markdown', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    70
		test_text	('select#id_format option:eq(1)[value="rst"]', 'rst', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    71
		test_text	('select#id_format option:eq(2)[value="html"]', 'html', C.HIDDEN);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    72
		test_count	('.markdown #markItUpId_content li', 20); // How many buttons in the WYSIWYG editor toolbar ?
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    73
		test_comt_unlogged_footer ();
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    74
		test_click	('#text input[type="submit"]', C.WAIT_PAGE_LOAD);
636
a8ab808d33c3 Test bulk text deletion with new karma-e2e-dsl tweaked version
Simon Descarpentries <sid@sopinspace.com>
parents: 635
diff changeset
    75
		test_count	('div.help_text span.error-text', 2);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    76
		test_field	('text div.error', 'id_title',		'text', 0, 'Title', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    77
		test_field	('text div.error', 'id_content',	'textarea', 1, 'Content', true);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    78
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    79
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    80
	suite ('upload text page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    81
		test_page_loading	('/create/upload/', 'Upload a text - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    82
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    83
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    84
		test_count	('#text ul.sub_list:eq(0) a', 3);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    85
		test_text	('#text ul.sub_list:eq(0) a:eq(0)[href="/text/"]', 'Text list');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    86
		test_text	('#text ul.sub_list:eq(0) a:eq(1)[href="/create/content/"]', 'Create a text');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    87
		test_text	('#text ul.sub_list:eq(0) a:eq(2)[href="/create/import/"]', 'Import a co-mented text');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    88
		test_count	('#text form[action="."]:eq(0) :input', 6);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    89
		test_field	('text', 'id_title',	'text', 0, 'Title');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    90
		test_field	('text', 'id_format',	'select', 1, 'Format', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    91
		test_field	('text', 'id_tags',		'text', 2, 'Tags');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
    92
		test_field	('text', 'id_file',		'file', 3, 'Upload file');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    93
		test_val	('#text :input:eq(4)[type=submit]', 'Save');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    94
		test_val	('#text :input:eq(5)#cancel_button[type=button]', 'Cancel');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    95
		test_count	('select#id_format option', 3);
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    96
		test_text	('select#id_format option:eq(0)[value="markdown"][selected]', 'markdown', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    97
		test_text	('select#id_format option:eq(1)[value="rst"]', 'rst', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    98
		test_text	('select#id_format option:eq(2)[value="html"]', 'html', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    99
		test_comt_unlogged_footer ();
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   100
		test_click	('#text input[type="submit"]', C.WAIT_PAGE_LOAD);
636
a8ab808d33c3 Test bulk text deletion with new karma-e2e-dsl tweaked version
Simon Descarpentries <sid@sopinspace.com>
parents: 635
diff changeset
   101
		test_count	('div.help_text span.error-text', 1);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   102
		test_field	('text div.error', 'id_file',		'file', 0, 'Upload file');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   103
		test_match	('#text div.help_text:eq(3) span.error-text:eq(0)', /You should specify a file to upload/m);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   104
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   105
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   106
	suite ('import a co-mented text page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   107
		test_page_loading	('/create/import/', 'Import a co-mented text - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   108
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   109
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   110
		test_count	('#text ul.sub_list:eq(0) a', 3);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   111
		test_text	('#text ul.sub_list:eq(0) a:eq(0)[href="/text/"]', 'Text list');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   112
		test_text	('#text ul.sub_list:eq(0) a:eq(1)[href="/create/content/"]', 'Create a text');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   113
		test_text	('#text ul.sub_list:eq(0) a:eq(2)[href="/create/upload/"]', 'Upload a text');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   114
		test_count	('#text form[action="."]:eq(0) :input', 3);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   115
		test_field	('text', 'id_file',	'file', 0, 'Upload XML file', true);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   116
		test_val	('#text :input:eq(1)[type=submit]', 'Save');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   117
		test_val	('#text :input:eq(2)#cancel_button[type=button]', 'Cancel');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   118
		test_comt_unlogged_footer ();
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   119
		test_click	('#text input[type="submit"]', C.WAIT_PAGE_LOAD);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   120
		test_count	('div.help_text span.error-text', 1);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   121
		test_field	('text div.error', 'id_file',		'file', 0, 'Upload XML file', true);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   122
		test_match	('#text div.help_text:eq(0) span.error-text:eq(0)', /You should specify a file to upload/m);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   123
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   124
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   125
	suite ('edit profile page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   126
		test_page_loading	('/profile/', 'Your profile \\('+C.W.USER_ADMIN+'\\)\n - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   127
		test_comt_logged_header	(C.W.USER_ADMIN, C.NO_TAGLINE);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   128
		test_count	('#content ul.sub_list:eq(0) a', 1);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   129
		test_text	('#content ul.sub_list:eq(0) a:eq(0)[href="/profile-pw/"]', 'Password');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   130
		test_count	('form#profile[action="."]:eq(0) :input', 5);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   131
		test_field	('profile', 'id_email',		'text', 0, 'E-mail address', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   132
		test_field	('profile', 'id_first_name','text', 1, 'First name');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   133
		test_field	('profile', 'id_last_name',	'text', 2, 'Last name');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   134
		test_field	('profile', 'id_tags',		'text', 3, 'Tags');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   135
		test_val	('#profile :input:eq(4)[type=submit]', 'Save');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   136
		test_comt_unlogged_footer ();
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   137
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   138
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   139
	suite ('edit password page conformity', function () {
646
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   140
		test_page_loading ('/profile-pw/', 'Your profile [(]'+C.W.USER_ADMIN+'[)]\n - '+C['#id_workspace_name']);
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   141
		test_comt_logged_header	(C.W.USER_ADMIN, C.NO_TAGLINE);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   142
		test_count	('#content ul.sub_list:eq(0) a', 1);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   143
		test_text	('#content ul.sub_list:eq(0) a:eq(0)[href="/profile/"]', 'Profile');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   144
		test_count	('form#profile[action="."]:eq(0) :input', 4);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   145
		test_field	('profile', 'id_old_password',	'password', 0, 'Old password', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   146
		test_field	('profile', 'id_new_password1', 'password', 1, 'New password', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   147
		test_field	('profile', 'id_new_password2',	'password', 2, 'New password confirmation', true);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   148
		test_val	('#profile :input:eq(3)[type=submit]', 'Save');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   149
		test_comt_unlogged_footer ();
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   150
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   151
641
8f7dafe42d15 Refine user list tests
Simon Descarpentries <sid@sopinspace.com>
parents: 638
diff changeset
   152
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   153
	suite ('add a user page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   154
		test_page_loading	('/user/add/', 'Add a new user\n - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   155
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   156
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   157
		test_count	('#user ul.sub_list:eq(0) a', 2);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   158
		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/"]', 'Users\' list');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   159
		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/mass-add/"]', 'Add users in bulk');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   160
		test_count	('#user form[action="."]:eq(0) :input', 8);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   161
		test_field	('user', 'id_email',		'text', 0, 'E-mail address', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   162
		test_field	('user', 'id_first_name',	'text', 1, 'First name');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   163
		test_field	('user', 'id_last_name',	'text', 2, 'Last name');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   164
		test_field	('user', 'id_tags',			'text', 3, 'Tags');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   165
		test_field	('user', 'id_role',			'select', 4, 'Workspace level role');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   166
		test_field	('user', 'id_note',			'textarea', 5, 'Note');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   167
		test_count	('select#id_role option', 6);
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   168
		test_text	('select#id_role option:eq(0)[value][selected]', '---------', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   169
		test_text	('select#id_role option:eq(1)[value="1"]', 'Manager', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   170
		test_text	('select#id_role option:eq(2)[value="2"]', 'Editor', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   171
		test_text	('select#id_role option:eq(3)[value="3"]', 'Moderator', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   172
		test_text	('select#id_role option:eq(4)[value="4"]', 'Commentator', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   173
		test_text	('select#id_role option:eq(5)[value="5"]', 'Observer', C.HIDDEN);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   174
		test_val	('#user :input:eq(6)[type=submit]', 'Add user');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   175
		test_val	('#user :input:eq(7)#cancel_button[type=button]', 'Cancel');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   176
		test_comt_unlogged_footer ();
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   177
		test_click	('#user input[type="submit"]', C.WAIT_PAGE_LOAD);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   178
		test_count	('div.help_text span.error-text', 1);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   179
		test_field	('user div.error', 'id_email', 'text', 0, 'E-mail address', true);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   180
		test_match	('#user div.help_text:eq(0) span.error-text:eq(0)', /This field is required/m);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   181
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   182
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   183
	suite ('add-users-in-bulk page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   184
		test_page_loading	('/user/mass-add/', 'Add users in bulk\n - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   185
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   186
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   187
		test_count	('#user ul.sub_list:eq(0) a', 2);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   188
		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/"]', 'Users\' list');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   189
		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/add/"]', 'Add a new user');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   190
		test_count	('#user form[action="."]:eq(0) :input', 6);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   191
		test_field	('user', 'id_email',		'textarea', 0, 'Emails', true);
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   192
		test_field	('user', 'id_tags',			'text',		1, 'Tags');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   193
		test_field	('user', 'id_role',			'select',	2, 'Workspace level role');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   194
		test_field	('user', 'id_note',			'textarea', 3, 'Note');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   195
		test_count	('select#id_role option', 6);
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   196
		test_text	('select#id_role option:eq(0)[value][selected]', '---------', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   197
		test_text	('select#id_role option:eq(1)[value="1"]', 'Manager', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   198
		test_text	('select#id_role option:eq(2)[value="2"]', 'Editor', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   199
		test_text	('select#id_role option:eq(3)[value="3"]', 'Moderator', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   200
		test_text	('select#id_role option:eq(4)[value="4"]', 'Commentator', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   201
		test_text	('select#id_role option:eq(5)[value="5"]', 'Observer', C.HIDDEN);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   202
		test_val	('#user :input:eq(4)[type=submit]', 'Add users');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   203
		test_val	('#user :input:eq(5)#cancel_button[type=button]', 'Cancel');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   204
		test_comt_unlogged_footer ();
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   205
		test_click	('#user input[type="submit"]', C.WAIT_PAGE_LOAD);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   206
		test_count	('div.help_text span.error-text', 1);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   207
		test_field	('user div.error', 'id_email', 'textarea', 0, 'Emails', true);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   208
		test_match	('#user div.help_text:eq(0) span.error-text:eq(0)', /This field is required/m);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   209
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   210
646
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   211
	suite ('edit anonymous user page conformity', function () {
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   212
		test_page_loading	('/user/-/edit/', 'Edit anonymous users\n - '+C['#id_workspace_name']);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   213
		test_comt_logged_header	(C.W.USER_ADMIN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   214
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   215
		test_count	('#user ul.sub_list:eq(0) a', 2);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   216
		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/"]', 'Users\' list');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   217
		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/add/"]', 'Add a new user');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   218
		test_count	('#user form[action="."] :input', 3);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   219
		test_field	('user', 'id_role', 'select', 0, 'Role');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   220
		test_count	('#user form[action="."] select option', 3);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   221
		test_text	('#user form[action="."] select option:eq(0)[value=""][selected]', '---------', C.H);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   222
		test_text	('#user form[action="."] select option:eq(1)[value="4"]', 'Commentator', C.H);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   223
		test_text	('#user form[action="."] select option:eq(2)[value="5"]', 'Observer', C.H);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   224
		test_val	('#user :input:eq(1)[type=submit]', 'Save');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   225
		test_val	('#user :input:eq(2)#cancel_button[type=button]', 'Cancel');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   226
		test_comt_unlogged_footer ();
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   227
	});
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   228
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   229
	suite ('edit user-com page conformity', function () {
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   230
		test_page_loading	('/user/3sh3WZqNzXs/edit/', 'Edit user user-com\n - '+C['#id_workspace_name']);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   231
		test_comt_logged_header (C.W.USER_ADMIN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   232
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   233
		test_count	('#user ul.sub_list:eq(0) a', 2);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   234
		test_text	('#user ul.sub_list:eq(0) a:eq(0)[href="/user/"]', 'Users\' list');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   235
		test_text	('#user ul.sub_list:eq(0) a:eq(1)[href="/user/add/"]', 'Add a new user');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   236
		test_count	('#user form[action="."] :input', 8);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   237
		test_field	('user', 'id_email',		'text',		0, 'E-mail address', true);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   238
		test_field	('user', 'id_first_name',	'text',		1, 'First name');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   239
		test_field	('user', 'id_last_name', 	'text',		2, 'Last name');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   240
		test_field	('user', 'id_is_suspended',	'checkbox',	3, 'Suspended access');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   241
		test_field	('user', 'id_tags',			'text',		4, 'Tags');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   242
		test_field	('user', 'id_role',			'select',	5, 'Workspace level role');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   243
		test_count	('select#id_role option', 6);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   244
		test_text	('select#id_role option:eq(0)[value]', '---------', C.HIDDEN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   245
		test_text	('select#id_role option:eq(1)[value="1"]', 'Manager', C.HIDDEN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   246
		test_text	('select#id_role option:eq(2)[value="2"]', 'Editor', C.HIDDEN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   247
		test_text	('select#id_role option:eq(3)[value="3"]', 'Moderator', C.HIDDEN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   248
		test_text	('select#id_role option:eq(4)[value="4"]', 'Commentator', C.HIDDEN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   249
		test_text	('select#id_role option:eq(5)[value="5"][selected]', 'Observer', C.HIDDEN);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   250
		test_val	('#user :input:eq(6)[type=submit]', 'Save');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   251
		test_val	('#user :input:eq(7)#cancel_button[type=button]', 'Cancel');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   252
		test_comt_unlogged_footer ();
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   253
		test_fill_field	('#id_email', {'#id_email': ''});
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   254
		test_click	('#user input[type="submit"]', C.WAIT_PAGE_LOAD);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   255
		test_count	('div.help_text span.error-text', 1);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   256
		test_field	('user div.error', 'id_email', 'text', 0, 'E-mail address', true);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   257
		test_match	('#user div.help_text:eq(0) span.error-text:eq(0)', /This field is required/m);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   258
	});
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   259
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   260
	suite ('settings page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   261
		test_page_loading	('/settings/', 'Settings - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   262
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   263
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   264
		test_count	('#settings ul.sub_list:eq(0) a', 1);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   265
		test_text	('#settings ul.sub_list:eq(0) a:eq(0)[href="/settings/design/"]', 'Appearance');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   266
		test_count	('#settings form[action="."]:eq(0) :input', 12);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   267
		test_field	('settings', 'id_workspace_name', 'text', 0, 'Workspace name');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   268
		test_field	('settings', 'id_workspace_tagline', 'text', 1, 'Workspace tagline');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   269
		test_field	('settings', 'id_workspace_registration', 'checkbox', 2, 'Workspace registration');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   270
		test_field	('settings', 'id_workspace_registration_moderation', 'checkbox', 3, 'Workspace registration moderation');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   271
		test_field	('settings', 'id_workspace_role_model', 'select', 4, 'Role model');
646
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   272
		test_text	('select#id_workspace_role_model option:eq(0)[selected][value="generic"]', 'Generic', C.H);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   273
		test_text	('select#id_workspace_role_model option:eq(1)[value="teacher"]', 'Class (education)', C.H);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   274
		test_field	('settings', 'id_workspace_category_1','text',5,'Label for the first category of comments');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   275
		test_field	('settings', 'id_workspace_category_2','text',6,'Label for the second category of comments');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   276
		test_field	('settings', 'id_workspace_category_3','text',7,'Label for the third category of comments');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   277
		test_field	('settings', 'id_workspace_category_4','text',8,'Label for the fourth category of comments');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   278
		test_field	('settings', 'id_workspace_category_5','text',9,'Label for the fifth category of comments');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   279
		test_val	('#settings :input:eq(10)[type=submit]', 'Save');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   280
		test_val	('#settings :input:eq(11)#cancel_button[type=button]', 'Cancel');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   281
		test_comt_unlogged_footer ();
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   282
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   283
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   284
	suite ('settings design page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   285
		test_page_loading	('/settings/design/', 'Settings - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   286
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   287
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   288
		test_count	('#settings ul.sub_list:eq(0) a', 1);
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   289
		test_text	('#settings ul.sub_list:eq(0) a:eq(0)[href="/settings/"]', 'General');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   290
		test_count	('#settings form[action="."]:eq(0) :input', 7);
633
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   291
		test_field	('settings', 'id_workspace_logo_file', 'file', 0, 'Workspace logo');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   292
		test_field	('settings', 'id_custom_css', 'textarea', 1, 'Custom CSS rules');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   293
		test_field	('settings', 'id_custom_font', 'text', 2, 'Custom font');
44634d19db32 More text list tests : filter by tag, hidden links…
Simon Descarpentries <sid@sopinspace.com>
parents: 627
diff changeset
   294
		test_field	('settings', 'id_custom_titles_font', 'text', 3, 'Custom font for titles');
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   295
		test_val	('#settings :input:eq(4)[type=submit]', 'Save');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   296
		test_val	('#settings :input:eq(5)#cancel_button[type=button]', 'Cancel');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   297
		test_val	('#settings :input:eq(6)#delete_logo_button[type=submit]', 'Delete logo');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   298
		test_comt_unlogged_footer ();
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   299
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   300
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   301
	suite ('followup page conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   302
		test_page_loading	('/followup/', 'Followup\n - '+C['#id_workspace_name']);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   303
		test_comt_logged_header	(C.W.USER_ADMIN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   304
		test_comt_default_tabs	(test_comt.text_nb, test_comt.user_nb);
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   305
		test_text	('#followup a:eq(0)[href="/help/#public_private_feed"]', '?');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   306
		test_match	('#followup a:eq(1)[href$="/feed/"]', new RegExp (C.W.WORKSPACE_URL+'feed/', 'm'));
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   307
		test_text	('#followup a:eq(2)[href="/help/#public_private_feed"]', '?');
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   308
		test_count	('form#followup_form[action="."] :input', 3);
646
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   309
		test_val	('form#followup_form input#activate[type=submit]', 'Activate private feed');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   310
		test_click	('#activate', C.WAIT_PAGE_LOAD);
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   311
		test_match	('#followup a:eq(3)[href^="/feed/"]', new RegExp (C.W.WORKSPACE_URL+'feed/(\\d|\\w)+/', 'm'));
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   312
		test_val	('form#followup_form input#reset[type=submit]', 'Reset private feed url');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   313
		test_exist	('form#followup_form input#workspace_notify_check[type=checkbox]:not(:checked)');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   314
		test_exist	('form#followup_form input#own_notify_check:not(:checked)');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   315
		test_click	('#workspace_notify_check');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   316
		test_exist	('form#followup_form input#workspace_notify_check[type=checkbox]:checked');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   317
		test_exist	('form#followup_form input#own_notify_check:not(:visible)');
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 641
diff changeset
   318
		test_click	('#workspace_notify_check');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   319
		test_comt_unlogged_footer ();
627
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   320
	});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   321
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   322
});
7d93eccbb565 Move helpers somewhere less trickier, test pagination with 12 texts
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   323