40 |
zzNodes.viewcontext.setDims(jarray.array( |
zzNodes.viewcontext.setDims(jarray.array( |
41 |
[space.getDim(i) for i in [Ids.d_1, Ids.d_2, Ids.d_3]], gzz.Dim)) |
[space.getDim(i) for i in [Ids.d_1, Ids.d_2, Ids.d_3]], gzz.Dim)) |
42 |
|
|
43 |
|
span = sb.getCurrent().subSpan(0,1).subArea(10, 10, 20, 20) |
44 |
|
|
45 |
# Put a piece of the pagespan into it |
# Put a piece of the pagespan into it |
46 |
cell = space.getHomeCell() |
cell = space.getHomeCell() |
47 |
space.getCellTexter().setEnfilade( |
space.getCellTexter().setEnfilade( |
48 |
cell, pagespanNodes.makeEnf( |
cell, pagespanNodes.makeEnf(span)) |
|
sb.getCurrent().subSpan(0,1).subArea(10, 10, 20, 20))) |
|
49 |
|
|
50 |
|
|
51 |
# Create the buoy view elements |
# Create the buoy view elements |
62 |
testbll = TestBLL() |
testbll = TestBLL() |
63 |
mainNode = adaptor.createMainNode(None, cell, testbll) |
mainNode = adaptor.createMainNode(None, cell, testbll) |
64 |
|
|
65 |
# Now, the real test |
# Now, the real test: render the main view |
66 |
vs = getvs() |
vs = getvs() |
67 |
mainNode.renderMain(vs, 0) |
mainNode.renderMain(vs, 0) |
68 |
|
|
69 |
|
# And check that we did really get a callback |
70 |
|
# for putting a buoy with the scrollblock in it. |
71 |
failUnlessEqual(testbll.calls, 1) |
failUnlessEqual(testbll.calls, 1) |
72 |
|
|
73 |
print testbll.args |
failUnlessEqual(testbll.args[2], scrollblockLinker.pageSpanNodeType) |
74 |
|
failUnlessEqual(testbll.args[4], span) |
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|