@quartic/bokehjs
Version:
Interactive, novel data visualization
27 lines (18 loc) • 856 B
text/coffeescript
{expect} = require "chai"
utils = require "../../utils"
{SidePanel} = utils.require("core/layout/side_panel")
{Document} = utils.require "document"
{Annotation} = utils.require("models/annotations/annotation")
describe "Annotation", ->
beforeEach ->
= new Annotation()
.attach_document(new Document())
it "should have a SidePanel after add_panel is called; and panel should have document attached", ->
expect(.panel).to.be.undefined
.add_panel('left')
expect(.panel).to.be.an.instanceOf(SidePanel)
expect(.panel.document).to.be.equal .document
it "should have level of overlay if in side panel", ->
expect(.level).to.be.equal "annotation"
.add_panel('left')
expect(.level).to.be.equal "overlay"