Skip to content

Commit b11211f

Browse files
committed
Update SeleniumBase tours that use the bootstrap-tour library
1 parent e7a1b2d commit b11211f

File tree

5 files changed

+47
-33
lines changed

5 files changed

+47
-33
lines changed

seleniumbase/core/style_sheet.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,11 @@
101101
bt_backdrop_style = (
102102
'''
103103
.tour-tour-element {
104-
box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.20);
105104
pointer-events: none !important;
106-
z-index: 9999;
107105
}
108-
109106
:not(.tour-tour-element) .orphan.tour-tour {
110-
box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.20);
111-
}
112-
113-
.tour-tour {
114-
pointer-events: auto;
115-
z-index: 9999;
107+
box-shadow: 0 0 0 88422px rgba(0, 0, 0, 0.42);
108+
pointer-events: auto !important;
116109
}
117110
''')
118111

seleniumbase/fixtures/base_case.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4763,6 +4763,15 @@ def create_bootstrap_tour(self, name=None):
47634763
"""
47644764
// Bootstrap Tour
47654765
var tour = new Tour({
4766+
container: 'body',
4767+
animation: true,
4768+
keyboard: true,
4769+
orphan: true,
4770+
smartPlacement: true,
4771+
autoscroll: true,
4772+
backdrop: true,
4773+
backdropContainer: 'body',
4774+
backdropPadding: 3,
47664775
});
47674776
tour.addSteps([
47684777
""")
@@ -4990,15 +4999,21 @@ def __add_bootstrap_tour_step(self, message, selector=None, name=None,
49904999
else:
49915000
duration = str(float(duration) * 1000.0)
49925001

5002+
bd = "backdrop: true,"
5003+
if selector == "html":
5004+
bd = "backdrop: false,"
5005+
49935006
step = ("""{
49945007
%s
49955008
title: '%s',
49965009
content: '%s',
49975010
orphan: true,
5011+
autoscroll: true,
5012+
%s
49985013
placement: 'auto %s',
49995014
smartPlacement: true,
50005015
duration: %s,
5001-
},""" % (element_row, title, message, alignment, duration))
5016+
},""" % (element_row, title, message, bd, alignment, duration))
50025017

50035018
self._tour_steps[name].append(step)
50045019

seleniumbase/fixtures/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class HighCharts:
155155

156156

157157
class BootstrapTour:
158-
VER = "0.11.0"
158+
VER = "0.12.0"
159159
MIN_CSS = ("https://cdnjs.cloudflare.com/ajax/libs/"
160160
"bootstrap-tour/%s/css/bootstrap-tour-standalone.min.css" % VER)
161161
MIN_JS = ("https://cdnjs.cloudflare.com/ajax/libs/"

0 commit comments

Comments
 (0)