Merge branch 'release/1.2'

This commit is contained in:
Jonathan Abbett 2017-01-05 13:44:35 -05:00
commit a676cbf717
8 changed files with 24 additions and 1 deletions

4
.gitignore vendored
View File

@ -3,8 +3,12 @@ capybara-*.html
.rspec
/log
/tmp
/test/dummy/log
/test/dummy/tmp
/db/*.sqlite3
/db/*.sqlite3-journal
/test/dummy/db/*.sqlite3
/test/dummy/db/*.sqlite3-journal
/public/system
/coverage/
/spec/tmp

View File

@ -32,6 +32,10 @@
text: "<%= step['text'] %>",
<% if step.key?('attachTo') %>
attachTo: { element: "<%= step['attachTo']['element'] %>", on: "<%= step['attachTo']['placement'] %>" },
showOn: function() {
// Only display this step if its selector is present
return document.querySelector("<%= step['attachTo']['element'] %>") ? true : false
},
<% end %>
buttons: [
<% if index == 0 %>

View File

@ -1,4 +1,4 @@
# frozen_string_literal: true
module Abraham
VERSION = '1.1.1'
VERSION = '1.2'
end

View File

@ -6,6 +6,12 @@ intro:
title: "ENGLISH This step has a title"
text: "ENGLISH This intermediate step has some text"
3:
title: "ENGLISH A missing step"
text: "ENGLISH Refers to an element that won't exist on the page, should skip to 4"
attachTo:
element: "#i-dont-exist"
position: "right"
4:
title: "ENGLISH The final step"
text: "ENGLISH Some text here too, and it's attached to the right"
attachTo:

View File

@ -6,6 +6,12 @@ intro:
title: "SPANISH This step has a title"
text: "This intermediate step has some text"
3:
title: "SPANISH A missing step"
text: "Refers to an element that won't exist on the page, should skip to 4"
attachTo:
element: "#i-dont-exist"
position: "right"
4:
title: "SPANISH The final step"
text: "Some text here too, and it's attached to the right"
attachTo:

Binary file not shown.

Binary file not shown.

View File

@ -31,6 +31,9 @@ class DashboardControllerTest < ActionDispatch::IntegrationTest
assert element.text.include? 'step-1'
assert element.text.include? 'step-2'
assert element.text.include? 'step-3'
assert element.text.include? 'step-4'
# Generates a showOn option
assert element.text.include? 'showOn:'
# it will post the right completion information
assert element.text.include? "controller_name: 'dashboard'"
assert element.text.include? "action_name: 'home'"