Skip to content

Commit

Permalink
Merge pull request #308 from kobotoolbox/277-additional-fields-export…
Browse files Browse the repository at this point in the history
…s--modified-json--fix-tests

Update tests to match qpath in supplementalData
  • Loading branch information
dorey authored Nov 11, 2022
2 parents c87f93d + 15b2d44 commit 62df5d9
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 19 deletions.
8 changes: 4 additions & 4 deletions tests/fixtures/analysis_form/analysis_form.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,25 @@
"type": "text",
"name": "name_of_clerk/comment",
"path": [
"name_of_clerk",
"clerk_details-name_of_clerk",
"comment"
],
"label": [
"Comment on the name of the clerk"
],
"source": "name_of_clerk"
"source": "clerk_details-name_of_clerk"
},
{
"type": "text",
"name": "name_of_shop/comment",
"path": [
"name_of_shop",
"clerk_details-name_of_shop",
"comment"
],
"label": [
"Comment on the name of the shop"
],
"source": "name_of_shop"
"source": "clerk_details-name_of_shop"
}
],
"translations": [
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/analysis_form/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"acme_timestamp": "2021-11-01Z"
},
"name_of_clerk": {
"clerk_details-name_of_clerk": {
"comment": "Sounds like an interesting person"
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/analysis_form/v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"acme_timestamp": "2021-11-01Z"
},
"name_of_shop": {
"clerk_details-name_of_shop": {
"comment": "Pretty cliche"
}
}
Expand Down
28 changes: 20 additions & 8 deletions tests/fixtures/analysis_form_advanced/analysis_form.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
{
"type": "transcript",
"name": "record_a_note/transcript_en",
"path": ["record_a_note", "transcript_en"],
"source": "record_a_note",
"path": [
"clerk_interactions-record_a_note",
"transcript_en"
],
"source": "clerk_interactions-record_a_note",
"language": "en",
"settings": {
"mode": "auto",
Expand All @@ -20,33 +23,42 @@
"type": "select_multiple",
"select_from_list_name": "record_a_note_tones",
"name": "record_a_note/tone_of_voice",
"path": ["record_a_note", "tone_of_voice"],
"path": [
"clerk_interactions-record_a_note",
"tone_of_voice"
],
"label": [
"How was the tone of the clerk's voice?",
"Kiel estis la tono de la voĉo de la oficisto?"
],
"source": "record_a_note"
"source": "clerk_interactions-record_a_note"
},
{
"type": "text",
"name": "goods_sold/comment",
"path": ["goods_sold", "comment"],
"path": [
"clerk_interactions-goods_sold",
"comment"
],
"label": [
"Comment on the goods sold at the store",
"Komentu la varojn venditajn en la vendejo"
],
"source": "goods_sold"
"source": "clerk_interactions-goods_sold"
},
{
"type": "select_one",
"select_from_list_name": "goods_sold_ratings",
"name": "goods_sold/rating",
"path": ["goods_sold", "rating"],
"path": [
"clerk_interactions-goods_sold",
"rating"
],
"label": [
"Rate the quality of the goods sold at the store",
"Komentu la varojn vendojn en la vendejo"
],
"source": "goods_sold"
"source": "clerk_interactions-goods_sold"
}
],
"additional_choices": [
Expand Down
10 changes: 5 additions & 5 deletions tests/fixtures/analysis_form_advanced/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@
}
],
"_supplementalDetails": {
"record_a_note": {
"clerk_interactions-record_a_note": {
"transcript": {
"value": "Hello how may I help you?",
"languageCode": "en"
},
"tone_of_voice": "excited confused"
},
"goods_sold": {
"clerk_interactions-goods_sold": {
"comment": "Not much diversity",
"rating": "3"
}
Expand All @@ -101,14 +101,14 @@
}
],
"_supplementalDetails": {
"record_a_note": {
"clerk_interactions-record_a_note": {
"transcript": {
"value": "Thank you for your business",
"languageCode": "en"
},
"tone_of_voice": "anxious excited"
},
"goods_sold": {
"clerk_interactions-goods_sold": {
"rating": "2"
}
}
Expand All @@ -123,7 +123,7 @@
}
],
"_supplementalDetails": {
"goods_sold": {
"clerk_interactions-goods_sold": {
"rating": "3"
}
}
Expand Down

0 comments on commit 62df5d9

Please sign in to comment.