Skip to content

Commit

Permalink
test: add test for place input
Browse files Browse the repository at this point in the history
  • Loading branch information
amoncaldas committed Oct 21, 2021
1 parent 357495c commit 32781e0
Show file tree
Hide file tree
Showing 966 changed files with 4,277 additions and 2,667 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
ORSKEY: ${{ secrets.ORSKEY }}
uses: amoncaldas/github-action-webapp-front-end-test@v1.1
with:
target: 'integration'
target: 'test'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test:unit": "cross-env BABEL_ENV=test karma start tests/unit/karma.conf.js",
"test:unit-debug": "cross-env BABEL_ENV=test karma start tests/unit/karma.debug.conf.js",
"test:e2e": "node tests/e2e/runner.js",
"test": "npm run test:integration && npm run test:e2e",
"test": "npm run test:integration && npm run test:unit",
"test:integration": "cross-env BABEL_ENV=test karma start tests/integration/karma.conf.js",
"test:integration-debug": "cross-env BABEL_ENV=test karma start tests/integration/karma.debug.conf.js"
},
Expand Down
4 changes: 4 additions & 0 deletions src/fragments/forms/place-input/place-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ export default {

/**
* Search a place by name
* @emits autocompleted
* @emits showLoading [via eventBus]
*
*/
autocompleteByName () {
Expand All @@ -510,6 +512,7 @@ export default {
} else if (places.length > 1) {
Utils.hideMobileKeyboard()
}
context.$emit('autocompleted')
}).catch(response => {
console.log(response)
context.showError(context.$t('placeInput.unknownSearchPlaceError'))
Expand Down Expand Up @@ -537,6 +540,7 @@ export default {
if (places.length > 1) {
Utils.hideMobileKeyboard()
}
context.$emit('autocompleted')
}).catch(response => {
console.log(response)
}).finally(() => {
Expand Down
1,556 changes: 1,545 additions & 11 deletions tests/integration/coverage/html/index.html

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions tests/integration/coverage/html/src/app-loader.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ <h1>
<span class='fraction'>84/112</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">45.45% </span>
<span class="strong">48.48% </span>
<span class="quiet">Branches</span>
<span class='fraction'>30/66</span>
<span class='fraction'>32/66</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">86.36% </span>
Expand Down Expand Up @@ -457,24 +457,24 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes">15×</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes">10×</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -605,15 +605,15 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">59×</span>
<span class="cline-any cline-yes">16×</span>
<span class="cline-any cline-yes">61×</span>
<span class="cline-any cline-yes">17×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">43×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">43×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -699,7 +699,7 @@ <h1>
*/
setFittingLocale (storedLocale) {
var deviceLocale = window.navigator.language || <span class="branch-1 cbranch-no" title="branch not covered" >window.navigator.userLanguage</span>
let locale = storedLocale || <span class="branch-1 cbranch-no" title="branch not covered" >deviceLocale</span>
let locale = storedLocale || deviceLocale
<span class="missing-if-branch" title="else path not taken" >E</span>if (locale) {
locale = locale.toLowerCase()
}
Expand Down Expand Up @@ -745,7 +745,7 @@ <h1>
var locale = null

// Restore settings stored in local storage, if available
<span class="missing-if-branch" title="else path not taken" >E</span>if (serializedMapSettings) {
if (serializedMapSettings) {
const storedMapSettings = JSON.parse(serializedMapSettings)
for (const key in storedMapSettings) {
if (key === 'locale') {
Expand Down Expand Up @@ -916,7 +916,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/coverage/html/src/app.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes">759×</span>
<span class="cline-any cline-yes">1046×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -283,7 +283,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/coverage/html/src/common/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/coverage/html/src/common/menu-mixin.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ <h1>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">159×</span>
<span class="cline-any cline-yes">66×</span>
<span class="cline-any cline-yes">384×</span>
<span class="cline-any cline-yes">132×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">93×</span>
<span class="cline-any cline-yes">252×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">93×</span>
<span class="cline-any cline-yes">252×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -175,7 +175,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/coverage/html/src/config/hooks.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/coverage/html/src/config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2689,7 +2689,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/coverage/html/src/config/theme.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/coverage/html/src/directives/bg.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
16 changes: 8 additions & 8 deletions tests/integration/coverage/html/src/directives/focus.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ <h1>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-yes"></span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -127,7 +127,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Oct 20 2021 17:35:35 GMT+0200 (Central European Summer Time)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 21 2021 16:51:51 GMT+0200 (Central European Summer Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down

0 comments on commit 32781e0

Please sign in to comment.