Skip to content

Commit

Permalink
Disable adaptive menu when running tests, this is what spree_backend …
Browse files Browse the repository at this point in the history
…was doing before
  • Loading branch information
luisramos0 committed Dec 26, 2019
1 parent d39eadf commit 6ee04af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/assets/javascripts/admin/spree/base.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jQuery(function($) {
if (typeof $('.field.checkbox label').vAlign === 'function' )
$('.field.checkbox label').vAlign()

if (typeof Spree !== 'undefined') {
// We activate AdaptiveMenu only if not on webdriver
// Re-adjusting the admin menu during tests causes tests to fail.
if (!navigator.webdriver && typeof Spree !== 'undefined') {
$('.main-menu-wrapper ul').AdaptiveMenu({
text: "<a href='#'><i class='icon-chevron-down'></i> " + Spree.translations.more + "</a>",
klass: "dropdown"
Expand Down

0 comments on commit 6ee04af

Please sign in to comment.