Mercurial > code > home > repos > light9
view web/light9-color-picker_test.html @ 2405:69ca2b2fc133
overcomplicated attempt at persisting the pane layout in the rdf graph
this was hard because we have to somehow wait for the graph to load before config'ing the panes
author | drewp@bigasterisk.com |
---|---|
date | Fri, 17 May 2024 16:58:26 -0700 |
parents | 4556eebe5d73 |
children |
line wrap: on
line source
<!doctype html> <html> <head> <title>light9-color-picker test</title> <meta charset="utf-8"> <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script> <script src="/node_modules/mocha/mocha.js"></script> <script src="/node_modules/chai/chai.js"></script> <link rel="stylesheet" media="all" href="/node_modules/mocha/mocha.css"> <link rel="import" href="/lib/polymer/lib/elements/dom-bind.html"> <link rel="import" href="light9-color-picker.html"> </head> <body> <div id="mocha"><p><a href=".">Index</a></p></div> <div id="messages"></div> <div id="fixtures"> <dom-bind> <template> <light9-color-picker id="pick" color="{{color}}"></light9-color-picker> </template> </dom-bind> </div> <script> mocha.setup('bdd'); const assert = chai.assert; describe("RainbowCanvas", () => { it("loads rainbow", (done) => { const rc = new RainbowCanvas('/colorpick_rainbow_large.png', [400, 200]); rc.onLoad(() => { assert.equal(rc.colorAt([200, 100]), '#ff38eb'); done(); }); }); }); mocha.run(); </script> </body> </html>