1
HierarchyTest = TestCase("HierarchyTest");
3
HierarchyTest.prototype.testNestingDetection = function(){
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",
27
"people-michaelforrest",
28
"people-michaelforrest-ubuntu-spec-editor",
29
"people-michaelforrest-ubuntu-spec-editor-authentication"
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:[]}]
45
{id:"installer",children:[
46
{id:"partitioner", children: [{
47
id: "when-other-os-installed",
50
}, {id:"setup-process", children: [
56
id: "keyboard-layout",
69
id: "user-account-create",
75
id:"people", children: [
76
{id:"michaelforrest", children: [
77
{id:"ubuntu-spec-editor",children: [ {id:"authentication", children:[] }]}
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");
b'\\ No newline at end of file'