Mercurial > code > home > repos > light9
comparison web/light9-color-picker_test.html @ 2376:4556eebe5d73
topdir reorgs; let pdm have its src/ dir; separate vite area from light9/
author | drewp@bigasterisk.com |
---|---|
date | Sun, 12 May 2024 19:02:10 -0700 |
parents | light9/web/light9-color-picker_test.html@0c54bd6e1630 |
children |
comparison
equal
deleted
inserted
replaced
2375:623836db99af | 2376:4556eebe5d73 |
---|---|
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <title>light9-color-picker test</title> | |
5 <meta charset="utf-8"> | |
6 <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script> | |
7 <script src="/node_modules/mocha/mocha.js"></script> | |
8 <script src="/node_modules/chai/chai.js"></script> | |
9 <link rel="stylesheet" media="all" href="/node_modules/mocha/mocha.css"> | |
10 <link rel="import" href="/lib/polymer/lib/elements/dom-bind.html"> | |
11 | |
12 <link rel="import" href="light9-color-picker.html"> | |
13 </head> | |
14 <body> | |
15 <div id="mocha"><p><a href=".">Index</a></p></div> | |
16 <div id="messages"></div> | |
17 <div id="fixtures"> | |
18 <dom-bind> | |
19 <template> | |
20 <light9-color-picker id="pick" color="{{color}}"></light9-color-picker> | |
21 </template> | |
22 </dom-bind> | |
23 </div> | |
24 | |
25 <script> | |
26 mocha.setup('bdd'); | |
27 const assert = chai.assert; | |
28 | |
29 describe("RainbowCanvas", () => { | |
30 it("loads rainbow", (done) => { | |
31 const rc = new RainbowCanvas('/colorpick_rainbow_large.png', [400, 200]); | |
32 rc.onLoad(() => { | |
33 assert.equal(rc.colorAt([200, 100]), '#ff38eb'); | |
34 done(); | |
35 }); | |
36 }); | |
37 }); | |
38 mocha.run(); | |
39 </script> | |
40 </body> | |
41 </html> |