Resolves #26, a bug for Turbolinks users
This commit is contained in:
parent
b73cc23aea
commit
e5e609a907
4
Gemfile
4
Gemfile
@ -32,6 +32,10 @@ gemspec
|
|||||||
# To use a debugger
|
# To use a debugger
|
||||||
# gem 'byebug', group: [:development, :test]
|
# gem 'byebug', group: [:development, :test]
|
||||||
|
|
||||||
|
group :development, :test do
|
||||||
|
gem 'turbolinks'
|
||||||
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
# Adds support for Capybara system testing and selenium driver
|
# Adds support for Capybara system testing and selenium driver
|
||||||
gem 'capybara', '>= 2.15'
|
gem 'capybara', '>= 2.15'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
const tour = new Shepherd.Tour(<%= Rails.configuration.abraham.tour_options.html_safe unless Rails.configuration.abraham.tour_options.nil? %>);
|
var tour = new Shepherd.Tour(<%= Rails.configuration.abraham.tour_options.html_safe unless Rails.configuration.abraham.tour_options.nil? %>);
|
||||||
|
|
||||||
tour.on("complete", function() {
|
tour.on("complete", function() {
|
||||||
// ajax
|
// ajax
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Abraham
|
module Abraham
|
||||||
VERSION = "2.0.0"
|
VERSION = "2.0.2"
|
||||||
end
|
end
|
||||||
|
@ -10,5 +10,6 @@
|
|||||||
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
||||||
// about supported directives.
|
// about supported directives.
|
||||||
//
|
//
|
||||||
|
//= require turbolinks
|
||||||
//= require abraham
|
//= require abraham
|
||||||
//= require_tree .
|
//= require_tree .
|
||||||
|
@ -4,3 +4,5 @@
|
|||||||
<div class="notice-me" style="width:300px;height:300px;background-color:whitesmoke;">
|
<div class="notice-me" style="width:300px;height:300px;background-color:whitesmoke;">
|
||||||
a content element to notice
|
a content element to notice
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%= link_to "Other Page", dashboard_other_url %>
|
@ -63,4 +63,12 @@ class ToursTest < ApplicationSystemTestCase
|
|||||||
visit dashboard_home_url
|
visit dashboard_home_url
|
||||||
assert_selector ".shepherd-element", visible: true
|
assert_selector ".shepherd-element", visible: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "navigate with turbolinks between pages with tours" do
|
||||||
|
visit dashboard_home_url
|
||||||
|
assert_selector ".shepherd-element", visible: true
|
||||||
|
# Navigate to other page
|
||||||
|
find("a").click
|
||||||
|
assert_selector ".shepherd-element", visible: true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user