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

Custom Repeat Captions Support #1615

Merged
merged 4 commits into from
Aug 22, 2024
Merged

Custom Repeat Captions Support #1615

merged 4 commits into from
Aug 22, 2024

Conversation

shubham1g5
Copy link
Contributor

@shubham1g5 shubham1g5 commented Aug 20, 2024

Product Description

https://dimagi.atlassian.net/browse/USH-4710

Adds ability to specify custom captions for repeat groups.

Spec

Safety Assurance

Safety story

Automated test coverage

We have test coverage to check for add captions that this PR changes in accordance to new behaviour.

QA Plan

Not planning

  • This PR can be deployed after merge with no further considerations.
  • This PR can be reverted after deploy with no further considerations.
  • The set of people pinged as reviewers is appropriate for the level of risk of the change.

cross-request: dimagi/commcare-core#1428

@@ -44,7 +44,7 @@ public void testRepeatNonCountedSimple() throws Exception {
assert (tree.length == 2);
QuestionBean dummyNode = tree[1];
assertEquals("false", dummyNode.getExists());
assertEquals("Add a new question3", dummyNode.getAddChoice());
assertEquals("Add Empty Caption Label", dummyNode.getAddChoice());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth adding back a test that checks the default text is correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 3c381eb

@shubham1g5 shubham1g5 marked this pull request as ready for review August 21, 2024 08:22
@@ -131,20 +132,8 @@ public static JSONObject parseQuestionType(FormEntryModel model, JSONObject obj)
}

private static String getRepeatAddText(FormEntryCaption prompt) {
String promptText = prompt.getLongText();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.15%. Comparing base (133bb4d) to head (1835516).
Report is 13 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1615      +/-   ##
============================================
- Coverage     70.34%   70.15%   -0.19%     
+ Complexity     2065     1997      -68     
============================================
  Files           255      254       -1     
  Lines          7968     7878      -90     
  Branches        740      739       -1     
============================================
- Hits           5605     5527      -78     
+ Misses         2078     2069       -9     
+ Partials        285      282       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shubham1g5 shubham1g5 merged commit 3aef186 into master Aug 22, 2024
5 of 6 checks passed
@shubham1g5 shubham1g5 deleted the customRepeatCaptions branch August 22, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants