annotate web/edit-choice_test.html @ 2398:87de3fada483

dead code
author drewp@bigasterisk.com
date Thu, 16 May 2024 16:13:18 -0700
parents 4556eebe5d73
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1714
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
1 <!doctype html>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
2 <html>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
3 <head>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
4 <title>edit-choice test</title>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
5 <meta charset="utf-8">
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
6 <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
7 <script src="/node_modules/mocha/mocha.js"></script>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
8 <script src="/node_modules/chai/chai.js"></script>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
9
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
10 <link rel="stylesheet" media="all" href="/node_modules/mocha/mocha.css">
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
11 <link rel="import" href="/lib/polymer/lib/elements/dom-bind.html">
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
12
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
13 <link rel="import" href="rdfdb-synced-graph.html">
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
14 <link rel="import" href="edit-choice.html">
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
15 </head>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
16 <body>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
17 <div id="mocha"><p><a href=".">Index</a></p></div>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
18 <div id="messages"></div>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
19 <div id="fixtures">
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
20 <dom-bind>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
21 <template>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
22 <p>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
23 <rdfdb-synced-graph id="graph" test-graph="true" graph="{{graph}}"></rdfdb-synced-graph>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
24 </p>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
25 <p>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
26 edit-choice: <edit-choice id="ec" graph="{{graph}}" uri="http://example.com/a"></edit-choice>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
27 </p>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
28 </template>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
29 </dom-bind>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
30 </div>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
31
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
32 <script>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
33 mocha.setup('bdd')
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
34 const assert = chai.assert;
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
35
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
36 describe("resource-display", () => {
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
37 let ec;
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
38 let graph;
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
39 beforeEach((done) => {
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
40 ec = document.querySelector("#ec");
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
41 window.ec=ec;
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
42 graph = document.querySelector("#graph");
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
43 graph.graph.clearGraph();
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
44 graph.graph.loadTrig(`
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
45 @prefix : <http://example.com/> .
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
46 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
47 :a rdfs:label "label a" :ctx .
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
48 `, done);
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
49 });
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
50 it("shows the uri as a resource-display");
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
51 it("accepts a drop event and changes the uri");
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
52 it("clears uri when you click unlink");
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
53
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
54 });
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
55 mocha.run();
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
56 </script>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
57 </body>
f2265601ead6 edit-choice/etc fixes and tests
Drew Perttula <drewp@bigasterisk.com>
parents:
diff changeset
58 </html>