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

fix(v-model): v-model ended with spaces #7735

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
fix(v-model): adding e2e test that fail without the actual fix
  • Loading branch information
Leocardoso94 committed Mar 3, 2018
commit 8bf451e7757c62a3b46664f54c651c301b466789
41 changes: 41 additions & 0 deletions examples/v-model/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>V-Model test</title>
<!-- Delete ".min" for console warnings in development -->
<script src="../../dist/vue.min.js"></script>
</head>

<body>

<div id="app">

<input ref="input" v-model="obj.value " />

<p>
{{obj.value}}
</p>

<p class="extra-spaces">
{{obj["value "] }}
</p>

</div>


<script>
const vm = new Vue({
el: "#app",
data: {
obj:{
value: 'test'
}
}
});
</script>

</body>

</html>
12 changes: 12 additions & 0 deletions test/e2e/specs/v-model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
'v-model work with extra whitespace properties': function (browser) {
browser
.url('http://localhost:8080/examples/v-model/')
.waitForElementVisible('#app', 1000)
.assert.value('input', 'test')
.setValue('input', '1')
.assert.value('input', 'test1')
.assert.containsText('.extra-spaces', '')
.end()
}
}