|
1 | 1 | core = require "core.coffee" |
2 | | -_u = require "jquery.ext.coffee" |
| 2 | +pos = require "position.coffee" |
3 | 3 | utils = require "./jasmine-utils.coffee" |
4 | 4 | SequenceDiagramLayout = require "SequenceDiagramLayout.coffee" |
5 | 5 | SequenceDiagram = require "SequenceDiagram.coffee" |
@@ -39,8 +39,8 @@ describe "SequenceDiagramLayout", -> |
39 | 39 | div.append diag |
40 | 40 | @layout.layout diag |
41 | 41 | diag.css "border":"1px solid #008000" |
42 | | - a = _u.min diag.find("*"), f = (e)-> $(e).offset().top |
43 | | - b = _u.max diag.find("*"), g = (e)-> $(e).offset().top + $(e).outerHeight() |
| 42 | + a = pos.min diag.find("*"), f = (e)-> $(e).offset().top |
| 43 | + b = pos.max diag.find("*"), g = (e)-> $(e).offset().top + $(e).outerHeight() |
44 | 44 | expect(diag.height()).toBe Math.round(b - a) |
45 | 45 |
|
46 | 46 | describe "including .ref", -> |
@@ -78,7 +78,7 @@ describe "SequenceDiagramLayout", -> |
78 | 78 | @layout.layout diag |
79 | 79 |
|
80 | 80 | it "is longer than the sum of all ones", -> |
81 | | - expect(utils.bottom @diagram).toBe (_u.max @diagram.find("*"), (e)-> utils.bottom $(e)) |
| 81 | + expect(utils.bottom @diagram).toBe (pos.max @diagram.find("*"), (e)-> utils.bottom $(e)) |
82 | 82 |
|
83 | 83 | describe "width", -> |
84 | 84 | beforeEach -> |
@@ -193,8 +193,8 @@ describe "SequenceDiagramLayout", -> |
193 | 193 | lines = @diagram.find ".lifeline" |
194 | 194 | occurs = @diagram.find ".occurrence" |
195 | 195 | g = (e)-> utils.bottom $(e) |
196 | | - a = _u.max lines, g |
197 | | - b = _u.max occurs, g |
| 196 | + a = pos.max lines, g |
| 197 | + b = pos.max occurs, g |
198 | 198 | expect(a).toBeGreaterThan b |
199 | 199 |
|
200 | 200 | describe "for two top interactions", -> |
@@ -761,8 +761,8 @@ describe "SequenceDiagramLayout", -> |
761 | 761 | obj0 = diag.find ".participant:eq(0)" |
762 | 762 | obj1 = diag.find ".participant:eq(1)" |
763 | 763 | obj2 = diag.find ".participant:eq(2)" |
764 | | - expect(_u.outerBottom(obj0)).toBeLessThan obj1.offset().top |
765 | | - expect(_u.outerBottom(obj1)).toBeLessThan obj2.offset().top |
| 764 | + expect(pos.outerBottom(obj0)).toBeLessThan obj1.offset().top |
| 765 | + expect(pos.outerBottom(obj1)).toBeLessThan obj2.offset().top |
766 | 766 |
|
767 | 767 | describe "lifeline", -> |
768 | 768 | describe "top", -> |
|
0 commit comments