~etherpad/etherpad/ubuntu-lucid-backport

« back to all changes in this revision

Viewing changes to etherpad/src/plugins/padHierarchy/test/hierarchyTest.js

  • Committer: James Page
  • Date: 2011-04-13 08:00:43 UTC
  • Revision ID: james.page@canonical.com-20110413080043-eee2nq7y1v7cv2mp
* Refactoring to use native Ubuntu Java libraries. 
* debian/control:
  - use openjdk instead of sun's java
  - update maintainer
* debian/etherpad.init.orig, debian/etherpad.upstart:
  - move the init script out of the way
  - create a basic upstart script
  - note that the open office document conversion daemon was dropped
    from the upstart configuration; if this behavior is desired, please
    create a separate upstart job for it
* debian/rules:
  - just use basic dh_installinit, as it will pick up the new upstart job
* New release
* Changed maintainer to Packaging
* Fixed installation scripts
* Initial Release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
HierarchyTest = TestCase("HierarchyTest");
 
2
 
 
3
HierarchyTest.prototype.testNestingDetection = function(){
 
4
        var titles = [
 
5
                "maverick", 
 
6
                "maverick-installer",
 
7
                "maverick-installer-partitioner",
 
8
                "maverick-installer-partitioner-when-other-os-installed",
 
9
                "maverick-installer-setup-process",
 
10
                "maverick-installer-setup-process-get-ready",
 
11
                "maverick-installer-setup-process-keyboard-layout",
 
12
                "maverick-installer-setup-process-slideshow",
 
13
                "maverick-installer-setup-process-welcome",
 
14
                "maverick-installer-setup-process-wifi-prompt",
 
15
                "maverick-installer-user-account-create",
 
16
                "maverick-software-center",
 
17
                "maverick-software-center-apturl",
 
18
                "maverick-software-center-buy",
 
19
                "maverick-software-center-buying",
 
20
                "maverick-software-center-deauthorizing",
 
21
                "maverick-software-center-department",
 
22
                "maverick-software-center-department-subsection",
 
23
                "maverick-software-center-lobby",
 
24
                "maverick-software-center-reinstalling-previous-purchases",
 
25
                "maverick-software-center-whats-new",
 
26
                "people",
 
27
                "people-michaelforrest",
 
28
                "people-michaelforrest-ubuntu-spec-editor",
 
29
                "people-michaelforrest-ubuntu-spec-editor-authentication"
 
30
        ];
 
31
        
 
32
        var expectation = [
 
33
                {
 
34
                        id:"maverick", children: [
 
35
                                {id:"software-center", children: [
 
36
                                        {id:"lobby", children:[]}, 
 
37
                                        {id:"apturl", children:[]},
 
38
                                        {id:"buy", children:[]} , 
 
39
                                        {id:"buying",children:[]},
 
40
                                        {id:"deauthorizing", children:[]},
 
41
                                        {id:"department", children: [ {id:"subsection", children:[]}]},
 
42
                                        {id:"reinstalling-previous-purchases",children:[]},
 
43
                                        {id:"whats-new",children:[]}]
 
44
                        }, 
 
45
                                {id:"installer",children:[
 
46
                                        {id:"partitioner", children: [{
 
47
                                                id: "when-other-os-installed",
 
48
                                                children: []
 
49
                                        }]
 
50
                                }, {id:"setup-process", children: [
 
51
                                        {
 
52
                                                id: "get-ready",
 
53
                                                children: []
 
54
                                        },
 
55
                                        {
 
56
                                                id: "keyboard-layout",
 
57
                                                children: []
 
58
                                        }, {
 
59
                                                id: "slideshow",
 
60
                                                children: []
 
61
                                        }, {
 
62
                                                id: "welcome",
 
63
                                                children: []
 
64
                                        },{
 
65
                                                id: "wifi-prompt",
 
66
                                                children: []
 
67
                                        }]
 
68
                                }, {
 
69
                                        id: "user-account-create",
 
70
                                        children: []
 
71
                                }]
 
72
                        }]
 
73
                },
 
74
                {
 
75
                        id:"people", children: [
 
76
                                {id:"michaelforrest", children: [
 
77
                                        {id:"ubuntu-spec-editor",children: [ {id:"authentication", children:[] }]}
 
78
                                ]}
 
79
                        ]
 
80
                }
 
81
        ];
 
82
        var result = getHierarchy(titles);
 
83
        assertEquals("should be two children on the root (maverick and people) - result was " + result.children, 2, result.children.length);
 
84
        assertEquals("should be two children under maverick (installer and software center)",2, result.children[0].children.length );
 
85
        //assertEquals("maverick", result[0][0]);
 
86
        //assertEquals(expectation,getHierarchy(titles), "should have right number of top-level structures");
 
87
        
 
88
};
 
89
 
 
90
  
 
91
  
 
 
b'\\ No newline at end of file'