Skip to content

Commit

Permalink
Add more tests for profile pregnancy health
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit Vermeulen committed Nov 7, 2024
1 parent a299acd commit 4ff0908
Show file tree
Hide file tree
Showing 3 changed files with 1,310 additions and 10 deletions.
14 changes: 9 additions & 5 deletions Onboarding/QA/flows/profile-pregnancy-health.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- { section: "e544152f-bf53-4d7c-ae1b-c84314772219", x: 500, y: 48} -->

```stack
trigger(on: "MESSAGE RECEIVED") when has_only_phrase(event.message.text.body, "profile")
Expand Down Expand Up @@ -1053,6 +1055,7 @@ card DisplayTopicStart, then: TopicsStartError do
)
image("@image_data.body.meta.download_url")
selected_topic =
list("Choose a Topic",
ArticleTopic: "item 1",
Expand Down Expand Up @@ -3972,14 +3975,15 @@ end
# TODO display facts
# Text only
card DisplayLoadingComponent01 when contact.data_preference == "text only" do
card DisplayLoadingComponent01 when contact.data_preference == "text only",
then: DisplayLoadingComponent01Error do
buttons(LoadingComponentGoTo: "@button_labels[0]") do
text("@loading_message")
end
end
# Display with image
card DisplayLoadingComponent01 do
card DisplayLoadingComponent01, then: DisplayLoadingComponent01Error do
image_id = content_data.body.body.text.value.image
image_data =
Expand Down Expand Up @@ -4007,19 +4011,19 @@ card LoadingComponentGoTo when selected_topic = "first_trimester", then: FactsFa
end
card LoadingComponentGoTo when selected_topic = "second_trimester", then: FactsFactoid1Trimester2 do
log(" trimester topic")
log("Second trimester topic")
end
card LoadingComponentGoTo when selected_topic = "third_trimester", then: FactsFactoid1Trimester3 do
log(" trimester topic")
log("Third trimester topic")
end
card LoadingComponentGoTo when selected_topic = "general_info", then: LoadingComponent02 do
log("General pregnancy topic")
end
card LoadingComponentGoTo, then: CuriousContentIntro do
log("Skip topic")
log("Skip topic @selected_topic")
end
```
Expand Down
2 changes: 1 addition & 1 deletion Onboarding/QA/flows_json/profile-pregnancy-health.json

Large diffs are not rendered by default.

Loading

0 comments on commit 4ff0908

Please sign in to comment.