Skip to content

Commit

Permalink
fix bug of screen after FAQ sms
Browse files Browse the repository at this point in the history
  • Loading branch information
Buhle79 committed Nov 15, 2023
1 parent 952beab commit 926958f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go-app-ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ go.app = function () {
new Choice("state_end", $("Exit")),
];

if (activation === "tb_study_a"){
if (activation === "tb_study_a" || activation === "tb_study_b" || activation === "tb_study_c"){
choice_list = [
new Choice("state_research_consent", $("Back")),
new Choice("state_end", $("Exit")),
Expand Down
2 changes: 1 addition & 1 deletion src/ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ go.app = function () {
new Choice("state_end", $("Exit")),
];

if (activation === "tb_study_a"){
if (activation === "tb_study_a" || activation === "tb_study_b" || activation === "tb_study_c"){
choice_list = [
new Choice("state_research_consent", $("Back")),
new Choice("state_end", $("Exit")),
Expand Down
21 changes: 21 additions & 0 deletions test/ussd_tb_check.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,27 @@ describe("ussd_tb_check app", function () {
.check.user.state("state_suburb_name")
.run();
});
it("should show state_research_consent for back option", function () {
return tester.setup.user
.state("state_sms_complete")
.inputs({ session_event: "continue", to_addr: "*123*123*3#" })
.check.interaction({
state: "state_sms_complete",
reply:[
"The FAQ has been sent to you by SMS. What would you like to do?",
"1. Back",
"2. Exit"].join("\n"),
char_limit: 160,
})
.run();
});
it("should show state_research_consent for back option", function () {
return tester.setup.user
.state("state_sms_complete")
.inputs("1")
.check.user.state("state_survey_start")
.run();
});
});
describe("state_city", function () {
it("should ask for the city", function () {
Expand Down

0 comments on commit 926958f

Please sign in to comment.