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

Inconsistent behaviour of enketo relevant field in cht-production vs harness #78

Closed
kennsippell opened this issue Dec 24, 2020 · 2 comments
Assignees

Comments

@kennsippell
Copy link
Member

Update family_planning_men form for production muso configuration.

For field: visited_contact_uuid set relevant to ${s_reg_how_found} = 'during_home_visit' and calculation to ../inputs/contact/parent/_id.

Run this configuration and test scenario:

  1. Fill in family_planning_men form specifying the visit was a 'house visit'
  2. fields.visited_contact_uuid is set properly

Execute the following test:

  it('home visit', async () => {
    const inputs = familyPlanningForMenScenarios.noCouncil();
    const result = await harness.fillForm(Forms.FAMILY_PLANNING_FOR_MEN, ...inputs);
    expect(result.report.fields.visited_contact_uuid).to.eq(contactId);
  });

Test fails because result.report.fields.visited_contact_uuid is empty.
Workaround is to set calculation value to if(${s_reg_how_found} = 'during_home_visit', ../inputs/contact/parent/_id,’’) which works for both test harness and e2e testing.
https://github.com/medic/config-muso/pull/160#discussion_r548356070

Investigate and correct whatever is causing the difference?

@derickl
Copy link
Member

derickl commented Sep 1, 2021

Related to #133

@kennsippell
Copy link
Member Author

Closing as duplicate of #133.

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

No branches or pull requests

2 participants