test-suite/tests/012_comt-admin-text-list.js
author Simon Descarpentries <sid@sopinspace.com>
Tue, 06 May 2014 13:52:01 +0200
changeset 651 9bbc657f6837
parent 646 24067001082c
child 649 fcf5309284df
permissions -rw-r--r--
Replace DISABLE_TRACKING and TRACKING_HTML by a TRACKING_ID variable in configuration files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     1
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     2
// " Vim settings
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     3
// set tabstop=4          " number of spaces in a tab
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     4
// set softtabstop=4      " as above
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     5
// set shiftwidth=4       " as above
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     6
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     7
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     8
suite ('comt admin text list', function () {
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     9
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    10
    this.timeout(200000);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    11
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    12
    suite ('empty texts list 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
    13
        test_page_loading   ('/text/', 'Texts\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
    14
        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
    15
        test_comt_default_tabs   (test_comt.text_nb, test_comt.user_nb);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    16
        test_count  ('#text ul.sub_list:eq(0) a', 3);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    17
        test_text   ('#text ul.sub_list:eq(0) a:eq(0)[href="/create/content/"]', 'Create a text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    18
        test_text   ('#text ul.sub_list:eq(0) a:eq(1)[href="/create/upload/"]', 'Upload a text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    19
        test_text   ('#text ul.sub_list:eq(0) a:eq(2)[href="/create/import/"]', 'Import a co-mented text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    20
        test_match  ('#text', /No texts yet/m);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    21
        test_count  ('#texts_form :input', 0);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    22
    });
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    23
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    24
    suite ('create texts', function () {
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    25
        for (var j=4; j--;)
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    26
            for (var i=3; i--;)
646
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 638
diff changeset
    27
                 test_comt_create_text (C.TEXTS[i]);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    28
    });
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    29
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    30
    suite ('texts list 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
    31
        test_page_loading   ('/text/', 'Texts\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
    32
        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
    33
        test_comt_default_tabs   (test_comt.text_nb, test_comt.user_nb);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    34
        test_count  ('#text ul.sub_list:eq(0) a', 3);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    35
        test_text   ('#text ul.sub_list:eq(0) a:eq(0)[href="/create/content/"]', 'Create a text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    36
        test_text   ('#text ul.sub_list:eq(0) a:eq(1)[href="/create/upload/"]', 'Upload a text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    37
        test_text   ('#text ul.sub_list:eq(0) a:eq(2)[href="/create/import/"]', 'Import a co-mented text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    38
        test_count  ('form#filter_form[action="."] :input', 1);
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    39
        test_text   ('select#tag_selected option:eq(0)[selected][value="0"]', '- All -', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    40
        test_text   ('select#bulk_actions option:eq(0)[selected][value="-1"]', 'Bulk Actions', C.HIDDEN);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    41
        test_text   ('select#bulk_actions option:eq(1)[value="delete"]', 'Delete', C.HIDDEN);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    42
        test_val    ('form#texts_form input#apply[type=button][disabled]', 'Apply');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    43
        test_count  ('table.large_table:eq(1) th', 6);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    44
        test_val    ('table.large_table:eq(1) th:eq(0) input#all_check[type="checkbox"]', 'on');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    45
        test_text   ('table.large_table:eq(1) th:eq(1) a[href="?order=title"]', 'Text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    46
        test_text   ('table.large_table:eq(1) th:eq(2)', 'Author');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    47
        test_text   ('table.large_table:eq(1) th:eq(3) a[href="?order=-modified"]', 'Modified');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    48
        test_text   ('table.large_table:eq(1) th:eq(4)', '# comments');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    49
        test_text   ('table.large_table:eq(1) th:eq(5)', 'Last week activity');
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 ();
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    51
    });
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    52
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    53
    suite ('texts list filter', 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 ('/text/?tag_selected=Text+Troisiรจme', 'Texts\n - '+C['#id_workspace_name']);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    55
        test_count  ('#texts_form :input', 4 + 3);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    56
        test_match  ('#paginator', /\s1-4 of 4\s/m);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    57
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    58
        for (var i=4; i--;) {
646
24067001082c Test user list, creation, filter, and in a separate file
Simon Descarpentries <sid@sopinspace.com>
parents: 638
diff changeset
    59
            test_text   ('a.main_object_title:eq('+i+')', C.TEXTS[2]['#id_title']);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    60
            test_match  ('.tag_list:eq('+i+')', /tags:ย test_textย Text Troisiรจmeย /);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    61
            test_text   ('.tag_list:eq('+i+') a:eq(0)[href="?tag_selected=test_text"]', 'test_text');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    62
            test_text   ('.tag_list:eq('+i+') a:eq(1)[href="?tag_selected=Text+Troisi%C3%A8me"]','Text Troisiรจme');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    63
            test_text   ('#text .hidden-text-actions:eq('+i+') a:eq(0)[href^="/text/"][href$="/view/"]', 'View');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    64
            test_text   ('#text .hidden-text-actions:eq('+i+') a:eq(1)[href^="/text/"][href$="/edit/"]', 'Edit');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    65
            test_text   ('#text .hidden-text-actions:eq('+i+') a:eq(2)[href="#"][id*="text-delete-"]', 'Delete');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    66
            test_text   ('#text .hidden-text-actions:eq('+i+') a:eq(3)[href^="/text/"][href$="/share/"]', 'Users');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    67
            test_text   ('#text .hidden-text-actions:eq('+i+') a:eq(4)[href^="/text/"][href$="/settings/"]', 'Settings');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    68
            test_text   ('#text a[title="Edit user"][href^="/user/"][href$="/edit/"]:eq('+i+')', 'admin');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    69
            test_text   ('#text table[summary="text list"] tr:eq('+(i+1)+') td:eq(4)', '0');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    70
        }
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    71
    });
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    72
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    73
    suite ('texts list pagination conformity', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    74
        test_page_loading ('/text/', 'Texts\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
    75
        test_count  ('#texts_form :input', (test_comt.text_nb < 10 ? test_comt.text_nb : 10) + 3);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    76
        test_match  ('#paginator', new RegExp ('\\s1-10 of '+test_comt.text_nb+'\\s','m'));
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    77
        test_text   ('#paginator a:eq(0)[href="?page=2"]', 'ยป');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    78
        test_text   ('#paginator a:eq(1)[href="?paginate=0"]', 'all');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    79
        test_click  ('#paginator a:eq(0)[href="?page=2"]');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    80
        test_match  ('#paginator', new RegExp ('\\s11-12 of '+test_comt.text_nb+'\\s','m'));
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    81
        test_count  ('#texts_form :input', test_comt.text_nb % 10 + 3);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    82
        test_click  ('#paginator a:eq(0)[href="?page=1"]');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    83
        test_match  ('#paginator', new RegExp ('\\s1-10 of '+test_comt.text_nb+'\\s','m'));
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    84
        test_count  ('#texts_form :input', (test_comt.text_nb < 10 ? test_comt.text_nb : 10) + 3);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    85
        test_click  ('#paginator a:eq(1)[href="?paginate=0&page=1"]');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    86
        test_match  ('#paginator', /\s\(paginate\)\s/m);
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    87
        test_count  ('#texts_form :input', test_comt.text_nb + 3);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    88
        test_click  ('#paginator a:eq(0)[href="?paginate=&page=1"]');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    89
        test_count  ('#texts_form :input', (test_comt.text_nb < 10 ? test_comt.text_nb : 10) + 3);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    90
        test_match  ('#paginator', new RegExp ('\\s1-10 of '+test_comt.text_nb+'\\s','m'));
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    91
    });
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    92
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    93
    suite ('texts list bulk deletion', function () {
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    94
        test_page_loading ('/text/?page=2', 'Texts\n - '+C['#id_workspace_name']);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    95
        test        ('choose bulk action Delete', dsl(function () { input('#bulk_actions').option('delete'); }));
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    96
        test_click  ('#all_check');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
    97
        test_count  ('form#texts_form input:checked', test_comt.text_nb % 10 + 1);
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    98
        test_val    ('form#texts_form input#apply[type=button]:not([disabled])', 'Apply');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    99
        /* test_click   ('#texts_form #apply'); // can't click on the confirm dialog */
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   100
        test_submit ('#texts_form');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   101
        test_page_loading ('/text/', 'Texts\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
   102
        test_comt.text_nb -= 2;
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   103
        test_count  ('form#texts_form :input', test_comt.text_nb + 3);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   104
        test_match  ('#paginator', new RegExp ('\\s1-'+test_comt.text_nb+' of '+test_comt.text_nb+'\\s','m'));
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   105
    });
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   106
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   107
    suite ('texts list single deletion', function () {
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   108
        test        ('choose bulk action Delete', dsl(function () { input('#bulk_actions').option('delete'); }));
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   109
        test_click  ('.text_check:eq(0)');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   110
        test_count  ('form#texts_form input:checked', 1);
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   111
        test_val    ('form#texts_form input#apply[type=button]:not([disabled])', 'Apply');
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   112
        test_submit ('#texts_form');
638
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   113
        test_page_loading ('/text/', 'Texts\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
   114
        test_comt.text_nb -= 1;
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   115
        test_count  ('form#texts_form :input', test_comt.text_nb + 3);
61dc5370b351 start building a COMT test API, automate testserver starting and stopping
Simon Descarpentries <sid@sopinspace.com>
parents: 637
diff changeset
   116
        test_match  ('#paginator', new RegExp ('\\s1-'+test_comt.text_nb+' of '+test_comt.text_nb+'\\s','m'));
637
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   117
    });
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   118
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   119
});
71d87ca43d6a Integration of django testserver start in start-test-suite.sh
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
   120