-
-
Notifications
You must be signed in to change notification settings - Fork 25
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 validation for simple XPaths in form config #486
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
58a8805
Bump to @xmldom/xmldom: 0.7.0
jkuester f84b1fe
Bump to @xmldom/xmldom: 0.8.2
jkuester 9b4228c
Fix reference to @xmldom/xmldom
jkuester c114d42
Add tests for existing form-utils functions
jkuester 74c4f01
Update validate-forms to pass xml doc as param
jkuester 8f986ad
Add XPath functionality to form-utils
jkuester b24ebfc
Add new check-xpaths-exist validation with initial tests
jkuester 5d527e5
Clean things up and add remaining tests
jkuester 29bed75
Update regex check to handle additional edge cases
jkuester f8ef2bc
Refactor formHasInstanceId util function to use XPath
jkuester de8dbac
Fix has-instance-id tests
jkuester 58f475d
Fix instanceID lookup
jkuester File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"eslint": "eslint 'src/**/*.js' test/*.js 'test/**/*.js'", | ||
"docker-start-couchdb": "npm run docker-stop-couchdb && docker run -d -p 6984:5984 --rm --name cht-conf-couchdb couchdb:2.3.1 && sh test/scripts/wait_for_response_code.sh 6984 200 CouchDB", | ||
"docker-stop-couchdb": "docker stop cht-conf-couchdb || true", | ||
"test": "npm run eslint && npm run docker-start-couchdb && npm run clean && mkdir -p build/test && cp -r test/data build/test/data && cd build/test && nyc --reporter=html mocha --forbid-only ../../test/**/*.spec.js && cd ../.. && npm run docker-stop-couchdb", | ||
"test": "npm run eslint && npm run docker-start-couchdb && npm run clean && mkdir -p build/test && cp -r test/data build/test/data && cd build/test && nyc --reporter=html mocha --forbid-only \"../../test/**/*.spec.js\" && cd ../.. && npm run docker-stop-couchdb", | ||
"semantic-release": "semantic-release" | ||
}, | ||
"bin": { | ||
|
@@ -38,6 +38,7 @@ | |
"@hapi/joi": "^16.1.8", | ||
"@medic/translation-checker": "^1.0.1", | ||
"@parcel/watcher": "^2.0.5", | ||
"@xmldom/xmldom": "^0.8.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, |
||
"canonical-json": "0.0.4", | ||
"csv-parse": "^4.16.0", | ||
"dom-compare": "^0.6.0", | ||
|
@@ -67,7 +68,7 @@ | |
"terser-webpack-plugin": "^1.4.3", | ||
"uuid": "^8.3.2", | ||
"webpack": "^4.46.0", | ||
"xmldom": "^0.6.0" | ||
"xpath": "0.0.32" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^13.2.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I needed these extra quotes in here to get mocha to run the tests nested down in
test/lib/validation/form