forked from remotestorage/api-test-suite
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
133 lines (103 loc) · 2.83 KB
/
index.html
File metadata and controls
133 lines (103 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>spec-check</title>
<!-- https://stackoverflow.com/questions/1321878/how-to-prevent-favicon-ico-requests -->
<link rel="icon" href="data:;base64,=">
<link rel="stylesheet" href="./node_modules/mocha/mocha.css" />
<link rel="stylesheet" href="style.css" />
<script src="./node_modules/mocha/mocha.js"></script>
<script type="importmap">{
"imports": {
"chai": "./node_modules/chai/index.js",
"path": "./node_modules/path-browserify/index.js",
"node:fs/promises": "./fs.js",
"url": "./url.js",
"dotenv": "./dotenv.js"
}
}</script>
<script type="module" src="./main.js"></script>
<script type="module">
import './api.test.js';
window.runTests = () => mocha.run();
</script>
<script type="module">
import util from './util.js';
window.util = util;
</script>
</head>
<body>
<header>
<h1>
<a aria-hidden="true" href="/">
<img src="./logo.svg">
</a>
<a href="/">spec-check</a>
</h1>
</header>
<p>Validate any server against the remoteStorage API spec <a href="https://datatracker.ietf.org/doc/html/draft-dejong-remotestorage-13">version 13</a>.</p>
<div class="content">
<p>
<label>SERVER_URL</label>
<input id="server" placeholder="https://5apps.com" />
</p>
<p>
<label>ACCOUNT_HANDLE</label>
<input id="account_handle" placeholder="tony" />
</p>
<p>
<label>TOKEN_SCOPE</label>
<input id="scope" placeholder="api-test-suite" />
</p>
<div id="nostate">
<hr>
<button id="webfinger" onclick="mod.webfinger()" disabled>webfinger</button>
<pre id="discover" class="hidden"></pre>
<p>
oauth:
<button id="oauth_read_write" onclick="mod.oauth('rw')" disabled>read-write</button>
<button id="oauth_read_only" onclick="mod.oauth('r')" disabled>read-only</button>
<button id="oauth_global" onclick="mod.oauth('*')" disabled>global</button>
</p>
</div>
<div id="error" class="hidden"></div>
<hr>
<p>
<label>TOKEN_READ_WRITE</label>
<input id="token_read_write" type="password" />
</p>
<p>
<label>TOKEN_READ_ONLY</label>
<input id="token_read_only" type="password" />
</p>
<p>
<label>TOKEN_GLOBAL</label>
<input id="token_global" type="password" />
</p>
<p>
<label>SPEC_VERSION</label>
<input id="spec_version" type="number" />
</p>
<button id="test" onclick="runTests()" disabled>run tests</button>
<div id="mocha"></div>
<script class="mocha-init">
// config options https://github.com/mochajs/mocha/blob/main/example/config/.mocharc.js
mocha.setup({
ui: 'bdd',
timeout: '5000',
});
</script>
<p>
<button id="reveal" onclick="mod.reveal()" disabled>reveal/hide tokens</button>
</p>
<div id="forget"></div>
</div>
<footer>
<p>
<a href="https://github.com/0dataapp/spec-check">open-source</a>
</p>
</footer>
</body>
</html>