You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/09/19 23:21:24 UTC
[whimsy] branch agenda_on_vue updated: two more tests passing
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch agenda_on_vue
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/agenda_on_vue by this push:
new b94ce4c two more tests passing
b94ce4c is described below
commit b94ce4c92a14ed9a1ebd9d97c3b604dfca058009
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Sep 19 19:21:10 2017 -0400
two more tests passing
---
www/board/agenda/spec/forms_spec.rb | 2 --
www/board/agenda/spec/vue_server.rb | 7 +------
www/board/agenda/views/buttons/commit.js.rb | 14 ++------------
3 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/www/board/agenda/spec/forms_spec.rb b/www/board/agenda/spec/forms_spec.rb
index 835b64b..c406ef4 100644
--- a/www/board/agenda/spec/forms_spec.rb
+++ b/www/board/agenda/spec/forms_spec.rb
@@ -94,8 +94,6 @@ describe "forms", type: :feature, server: :vue do
app = Vue.renderApp(TestPost)
button = app.querySelector('.btn-danger')
button.dispatchEvent(Event.new('click'))
- post_report = app.querySelector('#post-report-text')
- post_report.value = this.state.report
Vue.nextTick { response.end app.outerHTML }
end
diff --git a/www/board/agenda/spec/vue_server.rb b/www/board/agenda/spec/vue_server.rb
index f1f296a..45b5d96 100644
--- a/www/board/agenda/spec/vue_server.rb
+++ b/www/board/agenda/spec/vue_server.rb
@@ -102,7 +102,7 @@ class VueServer
end
# render an app, using client side rendering. Convenience methods are
- # provided to querySelector, extract outerHTML and to dispatch events.
+ # provided to querySelector, and to extract outerHTML.
def Vue.renderApp(component)
outer = document.createElement('div')
inner = document.createElement('span')
@@ -118,11 +118,6 @@ class VueServer
return outer.querySelector(selector)
end
- def app.dispatchEvent(event, element)
- element.dispatchEvent(event)
- app._watcher.run()
- end
-
return app
end
diff --git a/www/board/agenda/views/buttons/commit.js.rb b/www/board/agenda/views/buttons/commit.js.rb
index eacf2f1..9f9d237 100644
--- a/www/board/agenda/views/buttons/commit.js.rb
+++ b/www/board/agenda/views/buttons/commit.js.rb
@@ -34,20 +34,15 @@ class Commit < Vue
end
end
- # set message on initial display
- def componentWillMount()
- self.componentWillReceiveProps()
- end
-
# autofocus on comment text
- def componentDidMount()
+ def mounted()
jQuery('#commit-form').on 'shown.bs.modal' do
~'#commit-text'.focus()
end
end
# update message on re-display
- def componentWillReceiveProps()
+ def created()
pending = @@server.pending
messages = []
@@ -103,11 +98,6 @@ class Commit < Vue
@message = messages.join("\n")
end
- # update message when textarea changes
- def change(event)
- @message = event.target.value
- end
-
# on click, disable the input fields and buttons and submit
def click(event)
@disabled = true
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].