Skip to content

Commit fdb272b

Browse files
author
Tim Berners-Lee
committed
We have an autocomplete field test which works
1 parent c425111 commit fdb272b

5 files changed

Lines changed: 2851 additions & 0 deletions

File tree

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`autocompleteField adds the autocomplete field to the container, if provided 1`] = `
4+
<div>
5+
<div>
6+
<div
7+
class="formFieldName"
8+
style="padding: 0.3em; vertical-align: middle; width:8em;"
9+
>
10+
<a
11+
href="http://www.w3.org/ns/solid/terms#publicId"
12+
style="color: #3B5998; text-decoration: none;"
13+
>
14+
Corporation in wikidata
15+
</a>
16+
</div>
17+
<div
18+
class="formFieldValue"
19+
/>
20+
</div>
21+
</div>
22+
`;
23+
24+
exports[`autocompleteField clickimng on row of gren table then acecpt button saves data 1`] = `
25+
<div>
26+
<div
27+
class="formFieldName"
28+
style="padding: 0.3em; vertical-align: middle; width:8em;"
29+
>
30+
<a
31+
href="http://www.w3.org/ns/solid/terms#publicId"
32+
style="color: #3B5998; text-decoration: none;"
33+
>
34+
Corporation in wikidata
35+
</a>
36+
</div>
37+
<div
38+
class="formFieldValue"
39+
>
40+
<div
41+
style="display: flex; flex-direction: row;"
42+
>
43+
<div
44+
style="display: flex; flex-flow: wrap;"
45+
>
46+
<div>
47+
<table
48+
data-testid="autocomplete-table"
49+
style="max-width: 30em; margin: 0.5em;"
50+
>
51+
<tr
52+
style=""
53+
>
54+
<td>
55+
<input
56+
data-testid="autocomplete-input"
57+
size="60"
58+
style="background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.2em;"
59+
type="text"
60+
/>
61+
</td>
62+
</tr>
63+
</table>
64+
</div>
65+
<button
66+
data-testid="accept-button"
67+
style="background-color: rgb(255, 255, 255); padding: 0.7em; border: .01em solid white; border-radius: 0.2em; font-size: 100%; margin: 0.3em;"
68+
type="button"
69+
>
70+
<img
71+
src="https://solid.github.io/solid-ui/src/icons/noun_1180158.svg"
72+
style="width: 2em; height: 2em;"
73+
title="Continue"
74+
/>
75+
</button>
76+
<button
77+
data-testid="cancel-button"
78+
style="background-color: rgb(255, 255, 255); padding: 0.7em; border: .01em solid white; border-radius: 0.2em; font-size: 100%; margin: 0.3em;"
79+
type="button"
80+
>
81+
<img
82+
src="https://solid.github.io/solid-ui/src/icons/noun_1180156.svg"
83+
style="width: 2em; height: 2em;"
84+
title="Cancel"
85+
/>
86+
</button>
87+
<button
88+
data-testid="edit-button"
89+
style="background-color: rgb(255, 255, 255); padding: 0.7em; border: .01em solid white; border-radius: 0.2em; font-size: 100%; margin: 0.3em; display: none;"
90+
type="button"
91+
>
92+
<img
93+
src="https://solid.github.io/solid-ui/src/icons/noun_253504.svg"
94+
style="width: 2em; height: 2em;"
95+
title="Edit"
96+
/>
97+
</button>
98+
<div />
99+
</div>
100+
</div>
101+
</div>
102+
</div>
103+
`;
104+
105+
exports[`autocompleteField creates a autocomplete field 1`] = `
106+
<div>
107+
<div
108+
class="formFieldName"
109+
style="padding: 0.3em; vertical-align: middle; width:8em;"
110+
>
111+
<a
112+
href="http://www.w3.org/ns/solid/terms#publicId"
113+
style="color: #3B5998; text-decoration: none;"
114+
>
115+
Corporation in wikidata
116+
</a>
117+
</div>
118+
<div
119+
class="formFieldValue"
120+
>
121+
<div
122+
style="display: flex; flex-direction: row;"
123+
>
124+
<div
125+
style="display: flex; flex-flow: wrap;"
126+
>
127+
<div>
128+
<table
129+
data-testid="autocomplete-table"
130+
style="max-width: 30em; margin: 0.5em;"
131+
>
132+
<tr
133+
style=""
134+
>
135+
<td>
136+
<input
137+
data-testid="autocomplete-input"
138+
size="60"
139+
style="background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.2em;"
140+
type="text"
141+
/>
142+
</td>
143+
</tr>
144+
</table>
145+
</div>
146+
<button
147+
data-testid="accept-button"
148+
style="background-color: rgb(255, 255, 255); padding: 0.7em; border: .01em solid white; border-radius: 0.2em; font-size: 100%; margin: 0.3em; display: none;"
149+
type="button"
150+
>
151+
<img
152+
src="https://solid.github.io/solid-ui/src/icons/noun_1180158.svg"
153+
style="width: 2em; height: 2em;"
154+
title="Continue"
155+
/>
156+
</button>
157+
<button
158+
data-testid="cancel-button"
159+
style="background-color: rgb(255, 255, 255); padding: 0.7em; border: .01em solid white; border-radius: 0.2em; font-size: 100%; margin: 0.3em; display: none;"
160+
type="button"
161+
>
162+
<img
163+
src="https://solid.github.io/solid-ui/src/icons/noun_1180156.svg"
164+
style="width: 2em; height: 2em;"
165+
title="Cancel"
166+
/>
167+
</button>
168+
<button
169+
data-testid="edit-button"
170+
style="background-color: rgb(255, 255, 255); padding: 0.7em; border: .01em solid white; border-radius: 0.2em; font-size: 100%; margin: 0.3em; display: none;"
171+
type="button"
172+
>
173+
<img
174+
src="https://solid.github.io/solid-ui/src/icons/noun_253504.svg"
175+
style="width: 2em; height: 2em;"
176+
title="Edit"
177+
/>
178+
</button>
179+
<div />
180+
</div>
181+
</div>
182+
</div>
183+
</div>
184+
`;
185+
186+
exports[`autocompleteField on innpt fetches data (fixing wikidata timeout issue) making green table 1`] = `
187+
<table
188+
data-testid="autocomplete-table"
189+
style="max-width: 30em; margin: 0.5em;"
190+
>
191+
<tr
192+
style=""
193+
>
194+
<td>
195+
<input
196+
data-testid="autocomplete-input"
197+
size="60"
198+
style="background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.2em;"
199+
type="text"
200+
/>
201+
</td>
202+
</tr>
203+
<tr
204+
style="padding: 0.3em; color: rgb(0, 136, 0);"
205+
>
206+
abbazia di San Massimino
207+
</tr>
208+
<tr
209+
style="padding: 0.3em; color: rgb(0, 136, 0);"
210+
>
211+
abbazia di Sant'Angelo in Massa
212+
</tr>
213+
<tr
214+
style="padding: 0.3em; color: rgb(0, 136, 0);"
215+
>
216+
Massillargues-Attuech
217+
</tr>
218+
</table>
219+
`;

0 commit comments

Comments
 (0)