Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tbh 749 dev implement phase 1 cap 2 250 7 day cutoff #630

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions go-app-ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,6 @@ go.app = function () {
.post(self.im.config.healthcheck.url + "/v1/tbactivationstatus", payload)
.then(
function (response) {
console.log("Response: ", response);
// Get activation status
var is_active = response.data.is_activation_active;

Expand Down Expand Up @@ -1577,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
3 changes: 1 addition & 2 deletions src/ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,6 @@ go.app = function () {
.post(self.im.config.healthcheck.url + "/v1/tbactivationstatus", payload)
.then(
function (response) {
console.log("Response: ", response);
// Get activation status
var is_active = response.data.is_activation_active;

Expand Down Expand Up @@ -1460,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