web/data/cubicweb.tabs.js
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 07 Dec 2010 12:18:20 +0100
brancholdstable
changeset 7078 bad26a22fe29
parent 5658 7b9553a9db65
child 6952 7de13eb473e3
permissions -rw-r--r--
[test] New Handling of database for test. This patch adds a new TestDataBaseHandler class. TestDataBaseHandler are in charge of Setup, backup, restore, connection, repository caching and cleanup for database used during the test. TestDataBaseHandler reuse code and logic previously found in cubicweb.devtools functions and devtools.testlib.CubicwebTC. TestDataBaseHandler is an abstract class and must be subclassed to implement functionalities specific to each driver. TestDataBaseHandler can store and restore various database setups. devtools.testlib.CubicwebTC gains a test_db_id class attribute to specify that its TestCase uses a specific database that should be cached. The pre_setup_database class method is used to setup the database that will be cached. The setup_database method is kept uncached. The same TestDataBaseHandler are reused for every test using the same config object. TestDataBaseHandler try to reuse Repository objects as much as possible. All cubicweb test have been updated.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
606
40c7c2cf0797 [tabs] reuse the new set_cookie controller method
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 543
diff changeset
     1
function set_tab(tabname, cookiename) {
543
c0f2b6378f70 simplification of lazy tabs mechanism
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 491
diff changeset
     2
    // set appropriate cookie
5658
7b9553a9db65 [ajax] refactor/cleanup low-level ajax functions
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1419
diff changeset
     3
    loadRemote('json', ajaxFuncArgs('set_cookie', null, cookiename, tabname));
543
c0f2b6378f70 simplification of lazy tabs mechanism
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 491
diff changeset
     4
    // trigger show + tabname event
c0f2b6378f70 simplification of lazy tabs mechanism
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 491
diff changeset
     5
    trigger_load(tabname);
239
5b58fd1aba50 missing file
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     6
}
5658
7b9553a9db65 [ajax] refactor/cleanup low-level ajax functions
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1419
diff changeset
     7