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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
|
# RestfulDB testing
---
## Versions
* RestfulDB: 0.10.0
* Database: 0.3.0
---
## Creating new entries
[ ] **TC-0001**
Creates "sample" record.
Go to `https://<restful_url>/<database>/sample/new`.
Enter input:
```
sample:
SolsaID: TC-0001-0001,
acquisition_data: 2019-03-11,
kind: natural,
preparation_conditions: grinding
```
Press "Save".
---
[ ] **TC-0002**
Creates "sample" with related "experiment_epma" record.
Go to `https://<restful_url>/<database>/sample/new`.
Enter input:
```
sample:
SolsaID: TC-0001-0002,
kind: mixed,
specimen_type: rock
```
Below "sample" card, choose "experiment_epma" and press "Add table".
Enter input:
```
experiment_epma:
measurement_date: <Insert>,
diffracting_crystal_type: TAP,PET
```
Press "Save".
---
[ ] **TC-0003**
Creates "sample" with both "file" and "phase" records.
Go to `https://<restful_url>/<database>/sample/new`.
Enter input:
```
sample:
SolsaID: TC-0001-0003
special_details: yet another test
```
Below "sample" card, choose "file" and press "Add table".
Enter input:
```
file:
content: <Browse..>
```
Below "sample" card, choose "phase" and press "Add table".
Enter input:
```
phase:
percentage: 10
```
Below "phase" card, press "Add entry".
Enter input:
```
phase:
percentage: 20
```
Press "Save".
---
[ ] **TC-0004**
Creates "sample" with both related "related_sample (primary_sample_id)" and "related_sample (related_sample_id)" records.
Go to `https://<restful_url>/<database>/sample/new`.
Enter input:
```
sample:
SolsaID: TC-0001-0004
```
Below "sample" card, choose "related_sample (primary_sample_id)" and press "Add table".
Below "sample" card, choose "related_sample (related_sample_id)" and press "Add table".
Enter input:
```
related_sample (primary_sample_id):
related_sample: TC-0001-0001
```
Enter input:
```
related_sample (related_sample_id):
primary_sample: TC-0001-0002
```
Below "related_sample (related_sample_id)" card, press "Add entry".
Enter input:
```
related_sample (related_sample_id):
primary_sample: TC-0001-0003
```
Press "Save".
---
[ ] **TC-0005**
Creates "sample" with two related "experiment_epma" records.
Go to `https://<restful_url>/<database>/sample/new`.
Enter input:
```
sample:
SolsaID: TC-0001-0005
```
Below "sample" card, choose "experiment_epma" and press "Add table".
Enter input:
```
experiment_epma:
measurement_date: <Insert>,
spectrometer_type: WDS,
diffracting_crystal_type: TAP,LIF,PET
```
Below "experiment_epma" card, press "Add entry".
Note: secondarily added table should not have any information.
Enter input for second "experiment_epma" card:
```
experiment_epma:
laboratory: 'France, Trappes, Eramet Ideas'
```
Below second "experiment_epma" card, choose "epma_mineral" and press "Add table".
Below "epma_mineral" card, press "Add entry".
Enter inputs for both cards:
```
epma_mineral:
name: A
epma_mineral:
name: B
```
Below the second "epma_mineral" card, choose "epma_content" and press "Add table".
Enter input:
```
epma_content:
component: C
```
Below "epma_content" table, press "Add entry" two times.
Enter input for second and third cards:
```
epma_content:
component: D
epma_content:
component: E
```
Press "Save".
---
[ ] **TC-0006**
Creates "sample" with two related "lithology" and their related "lithology_img" records.
Go to `https://<restful_url>/<database>/sample/new`.
Enter input:
```
sample:
SolsaID: TC-0001-0006
```
Below "sample" card, choose "lithology" and press "Add table".
Enter input for "lithology" card:
```
lithology:
material_identification: rock
```
Below "lithology" card, choose "lithology_img" and press "Add table".
Enter input for "lithology_img":
```
lithology_img:
image: <Browse...>
```
Below "lithology" card, press "Add entry".
Enter input for second "lithology" card:
```
lithology:
material_identification: rock
```
Below the second "lithology" card, enter input for "lithology_img":
```
lithology_img:
image: <Browse...>
```
Press "Save".
---
## Editing entries
[ ] **TC-0007**
Edits "sample" record data.
Go to `https://<restful_url>/<database>/sample/TC-0001-0003`.
Press "Edit".
Edit record information:
```
sample:
kind: natural,
specimen_type: powder
file:
name: new file,
content: <Browse...>,
phase:
percentage: 50
phase:
percentage: 60
related_sample(primary_sample_id):
related_sample: TC-0001-0001
```
Press "Update".
---
[ ] **TC-0008**
Empties out certain "sample" record data.
Go to `https://<restful_url>/<database>/sample/TC-0001-0005`.
Press "Edit"
Edit record information:
```
experiment_epma:
spectrometer_type: None,
diffracting_crystal_type:
epma_mineral (first):
name:
epma_content (third):
component:
```
Press "Update".
|