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

Add Harness.loadContactForm method #174

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
14881f5
cht-core 3.14 support - to-bikram-sambat only
kennsippell Jan 7, 2022
e93eb19
2.4.0-0
kennsippell Jan 7, 2022
ff3be96
2.4.0
kennsippell Jan 7, 2022
6f4b509
2.4.0-beta.0
kennsippell Jan 7, 2022
4c4d651
Call medicExtensions.init
kennsippell Jan 20, 2022
4991d32
Use 3.14.x branch instead of master
kennsippell Mar 18, 2022
23ec917
Load some forms in project explorer without crashing
kennsippell Mar 22, 2022
9a26bf4
Add support for cht widgets
kennsippell Mar 22, 2022
6e8f628
A test has actually passed
kennsippell Mar 23, 2022
4764142
Bump to Josh's latest branch (no enketo)
kennsippell Mar 24, 2022
93f60db
Mocking of time within form-host (via fake-timer library instead of t…
kennsippell Mar 24, 2022
ad028a2
Fix issue with inputs not in resulting report
kennsippell Mar 25, 2022
44ceec1
Bug fixes for tel widget
kennsippell Mar 25, 2022
1b10a35
Bump enketo branch and repair form filler error reporting
kennsippell Mar 28, 2022
cd86a27
enketoFormManager.renderContactForm()
kennsippell Apr 7, 2022
a228fc9
Add support for loading the form xml via dbService getAttachment (#167)
jkuester Apr 7, 2022
dae7c86
Fix project explorer after repeat fix
kennsippell Apr 7, 2022
723ff26
Tests passing with ~7 bugs remaining
kennsippell Apr 7, 2022
10b86b6
Merge branch 'master' into enketo-uplift
kennsippell Apr 7, 2022
aa46f1e
Merge fixup
kennsippell Apr 7, 2022
97b78ac
Move xpathExtension wireup
kennsippell Apr 7, 2022
82e7cd5
Fix for contact summary context in app forms
kennsippell Apr 12, 2022
e25aac7
Latest enketo-services-refactor branch
kennsippell Apr 12, 2022
5406957
Remove pojo2xml
kennsippell Apr 12, 2022
fd2fa0c
Tame the insanity
kennsippell Apr 12, 2022
c798254
Merge branch 'master' into enketo-uplift
kennsippell Apr 12, 2022
a6293c2
Tests passing after merge
kennsippell Apr 12, 2022
e772a31
Tame the chaos
kennsippell Apr 13, 2022
9feb298
Eslint
kennsippell Apr 13, 2022
bb51dec
Remove wireup file
kennsippell Apr 13, 2022
faaf4fc
Prepare formhost for v4.1
kennsippell Apr 13, 2022
f664961
Fix problem with styles.css being deleted during build
kennsippell Apr 13, 2022
f4d9fe0
Somebody call a plumber?
kennsippell Apr 15, 2022
c7562fd
Fix bug using simulated cht-core 4.1
kennsippell Apr 15, 2022
88dc830
Bug filling datapicker on select muso forms
kennsippell Apr 15, 2022
16d1c04
Unload form on harness.clear()
kennsippell Apr 15, 2022
5e18407
Unload before loading new form (not on clear)
kennsippell Apr 16, 2022
3f55417
Add Harness.loadContactForm method
jkuester May 26, 2022
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
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "Build Assets (test collateral)",
"program": "${workspaceFolder}/project-explorer/build-assets.js",
"args": [
"--appSettingPath=${workspaceFolder}/test/collateral/project-without-source",
"--path=${workspaceFolder}/test/collateral/project-without-source",
"--formPath=${workspaceFolder}/test/collateral"
]
},
Expand Down
67 changes: 11 additions & 56 deletions all-chts-bundle.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,15 @@

module.exports = {
'3.9': {
ddocs: require('./build/cht-core-3-9-ddocs.json'),
RegistrationUtils: require('cht-core-3-9/shared-libs/registration-utils'),
CalendarInterval: require('cht-core-3-9/shared-libs/calendar-interval'),
RulesEngineCore: require('cht-core-3-9/shared-libs/rules-engine'),
RulesEmitter: require('cht-core-3-9/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('cht-core-3-9/shared-libs/rules-engine/node_modules/medic-nootils'),
Lineage: require('cht-core-3-9/shared-libs/lineage'),
},
'3.10': {
ddocs: require('./build/cht-core-3-10-ddocs.json'),
RegistrationUtils: require('cht-core-3-10/shared-libs/registration-utils'),
CalendarInterval: require('cht-core-3-10/shared-libs/calendar-interval'),
RulesEngineCore: require('cht-core-3-10/shared-libs/rules-engine'),
RulesEmitter: require('cht-core-3-10/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('cht-core-3-10/shared-libs/rules-engine/node_modules/medic-nootils'),
Lineage: require('cht-core-3-10/shared-libs/lineage'),
},
'3.11': {
ddocs: require('./build/cht-core-3-11-ddocs.json'),
RegistrationUtils: require('cht-core-3-11/shared-libs/registration-utils'),
CalendarInterval: require('cht-core-3-11/shared-libs/calendar-interval'),
RulesEngineCore: require('cht-core-3-11/shared-libs/rules-engine'),
RulesEmitter: require('cht-core-3-11/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('cht-core-3-11/shared-libs/rules-engine/node_modules/medic-nootils'),
Lineage: require('cht-core-3-11/shared-libs/lineage'),
},
'3.12': {
ddocs: require('./build/cht-core-3-12-ddocs.json'),
RegistrationUtils: require('cht-core-3-12/shared-libs/registration-utils'),
CalendarInterval: require('cht-core-3-12/shared-libs/calendar-interval'),
RulesEngineCore: require('cht-core-3-12/shared-libs/rules-engine'),
RulesEmitter: require('cht-core-3-12/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('cht-core-3-12/shared-libs/rules-engine/node_modules/medic-nootils'),
Lineage: require('cht-core-3-12/shared-libs/lineage'),
ChtScriptApi: require('cht-core-3-12/shared-libs/cht-script-api'),
},
'3.13': {
ddocs: require('./build/cht-core-3-13-ddocs.json'),
RegistrationUtils: require('cht-core-3-13/shared-libs/registration-utils'),
CalendarInterval: require('cht-core-3-13/shared-libs/calendar-interval'),
RulesEngineCore: require('cht-core-3-13/shared-libs/rules-engine'),
RulesEmitter: require('cht-core-3-13/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('cht-core-3-13/shared-libs/rules-engine/node_modules/medic-nootils'),
Lineage: require('cht-core-3-13/shared-libs/lineage'),
ChtScriptApi: require('cht-core-3-13/shared-libs/cht-script-api'),
'4.0': {
ddocs: require('./build/cht-core-4-0-ddocs.json'),
RegistrationUtils: require('cht-core-4-0/shared-libs/registration-utils'),
CalendarInterval: require('cht-core-4-0/shared-libs/calendar-interval'),
RulesEngineCore: require('cht-core-4-0/shared-libs/rules-engine'),
RulesEmitter: require('cht-core-4-0/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('cht-core-4-0/shared-libs/rules-engine/node_modules/cht-nootils'),
Lineage: require('cht-core-4-0/shared-libs/lineage'),
ChtScriptApi: require('cht-core-4-0/shared-libs/cht-script-api'),

convertFormXmlToXFormModel: require('cht-core-4-0/api/src/services/generate-xform.js').generate,
},
'3.14': {
ddocs: require('./build/cht-core-3-14-ddocs.json'),
RegistrationUtils: require('cht-core-3-14/shared-libs/registration-utils'),
CalendarInterval: require('cht-core-3-14/shared-libs/calendar-interval'),
RulesEngineCore: require('cht-core-3-14/shared-libs/rules-engine'),
RulesEmitter: require('cht-core-3-14/shared-libs/rules-engine/src/rules-emitter'),
nootils: require('cht-core-3-14/shared-libs/rules-engine/node_modules/cht-nootils'),
Lineage: require('cht-core-3-14/shared-libs/lineage'),
ChtScriptApi: require('cht-core-3-14/shared-libs/cht-script-api'),
}
};
27 changes: 20 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,30 @@ trap exit_on_error EXIT

npm ci
rm -Rf dist build
rm -Rf node_modules/enketo-core/node_modules/
patch -f node_modules/enketo-core/src/js/Form.js < node_modules/cht-core-3-13/webapp/patches/enketo-inputs-always-relevant.patch
patch -f node_modules/enketo-core/src/js/page.js < patches/enketo-handle-no-active-pages.patch
node ./compile-ddocs.js

dirs=($(find node_modules/cht-* -maxdepth 0 -type d))
for dir in "${dirs[@]}"; do
(cd "$dir"/shared-libs/rules-engine && npm ci --production)
(cd "$dir"/webapp && npm ci --production)
(cd "$dir"/api && npm ci --production)
(cd "$dir"/shared-libs/rules-engine && npm ci)
(cd "$dir"/shared-libs/phone-number && npm ci --production)

# patch the daterangepicker for responsiveness
# https://github.com/dangrossman/bootstrap-daterangepicker/pull/437
(cd "$dir" && patch -f webapp/node_modules/bootstrap-daterangepicker/daterangepicker.js < webapp/patches/bootstrap-daterangepicker.patch)

# patch enketo to always mark the /inputs group as relevant
(cd "$dir" && patch -f webapp/node_modules/enketo-core/src/js/form.js < webapp/patches/enketo-inputs-always-relevant_form.patch)
(cd "$dir" && patch -f webapp/node_modules/enketo-core/src/js/relevant.js < webapp/patches/enketo-inputs-always-relevant_relevant.patch)

# patch enketo to fix repeat name collision bug - this should be removed when upgrading to a new version of enketo-core
# https://github.com/enketo/enketo-core/issues/815
(cd "$dir" && patch -f webapp/node_modules/enketo-core/src/js/calculate.js < webapp/patches/enketo-repeat-name-collision.patch)

# patch messageformat to add a default plural function for languages not yet supported by make-plural #5705
(cd "$dir" && patch -f webapp/node_modules/messageformat/lib/plurals.js < webapp/patches/messageformat-default-plurals.patch)
done

npx webpack
cp ext/inbox.css dist

printf "\033[0;32m== BUILD SUCCESSFUL ==\n"
printf "\033[0;32m== BUILD SUCCESSFUL ==\n"
Loading