Update index style and add a comprehensive test page

This commit is contained in:
Ladd Hoffman 2023-02-02 21:54:13 -06:00
parent 30ebe04db7
commit 50df9efabc
3 changed files with 62 additions and 14 deletions

View File

@ -3,6 +3,7 @@ body {
color: #b6b6b6;
font-family: monospace;
font-size: 8pt;
margin: 1em;
}
a {
color: #c6f4ff;

View File

@ -1,26 +1,27 @@
<!DOCTYPE html>
<head>
<title>Forum Network</title>
<title>Decentralized Governance Framework - Tests</title>
<link type="text/css" rel="stylesheet" href="./index.css" />
</head>
<body>
<h2>Tests</h2>
<h3>Primary</h3>
<h2>DGF Tests</h2>
<ul>
<li><a href="./tests/validation-pool.test.html">Validation Pool</a></li>
<li><a href="./tests/availability.test.html">Availability + Business</a></li>
<li>
Forum
<ul>
<li><a href="./tests/forum1.test.html">Negative citation of a negative citation</a></li>
<li><a href="./tests/forum2.test.html">Negative citation of a weaker negative citation</a></li>
<li><a href="./tests/forum3.test.html">Redistribute power</a></li>
<li><a href="./tests/forum4.test.html">Redistribute power through subsequent support</a></li>
<li><a href="./tests/forum5.test.html"> Destroy a post after it has received positive citations</a></li>
</ul>
</li>
</ul>
<h3>Secondary</h3>
<ul>
<h3>Forum</h3>
<ul>
<li><a href="./tests/forum1.test.html">Negative citation of a negative citation</a></li>
<li><a href="./tests/forum2.test.html">Negative citation of a weaker negative citation</a></li>
<li><a href="./tests/forum3.test.html">Redistribute power</a></li>
<li><a href="./tests/forum4.test.html">Redistribute power through subsequent support</a></li>
<li><a href="./tests/forum5.test.html"> Destroy a post after it has received positive citations</a></li>
</ul>
</ul>
<ul>
<li><a href="./tests/forum-network.test.html">Forum Network</a></li>
</ul>
@ -32,4 +33,7 @@
<li><a href="./tests/flowchart.test.html">Flowchart</a></li>
<li><a href="./tests/mocha.test.html">Mocha</a></li>
</ul>
<ul>
<h4><a href="./tests/all.test.html">All</a></h4>
</ul>
</body>

View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<head>
<title>VM</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/mocha/mocha.css" />
<link type="text/css" rel="stylesheet" href="../index.css" />
</head>
<body>
<h2><a href="../">DGF Tests</a></h2>
<div id="mocha"></div>
<div id="scene"></div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/radash/10.7.0/radash.js"
integrity="sha512-S207zKWG3iqXqe6msO7/Mr8X3DzzF4u8meFlokHjGtBPTGUhgzVo0lpcqEy0GoiMUdcoct+H+SqzoLsxXbynzg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://unpkg.com/mocha/mocha.js"></script>
<script src="https://unpkg.com/chai/chai.js"></script>
<script type="module" src="./scripts/availability.test.js"></script>
<script type="module" src="./scripts/business.test.js"></script>
<script type="module" src="./scripts/forum-network.test.js"></script>
<script type="module" src="./scripts/mocha.test.js"></script>
<script type="module" src="./scripts/validation-pool.test.js"></script>
<script type="module" src="./scripts/vm.test.js"></script>
<script type="module" src="./scripts/wdag.test.js"></script>
<script type="module" src="./scripts/forum/forum1.test.js"></script>
<script type="module" src="./scripts/forum/forum2.test.js"></script>
<script type="module" src="./scripts/forum/forum3.test.js"></script>
<script type="module" src="./scripts/forum/forum4.test.js"></script>
<script type="module" src="./scripts/forum/forum5.test.js"></script>
<script defer class="mocha-init">
mocha.setup({
ui: 'bdd',
globals: ['scene', 'dao', 'experts', 'posts', '__REACT_DEVTOOLS_*'],
});
mocha.checkLeaks();
window.should = chai.should();
</script>
<script defer class="mocha-exec">
// TODO: Weird race condition -- resolve this in a better way
setTimeout(() => mocha.run(), 1000);
</script>