-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyrax 5 upgrade fix a few specs #2101
Conversation
…ady to the gem file and configure them
…amvera/hyku into mr_good_job_its_got_to_be_good
Just found one actor that was overriding Hyrax. This commit will switch it to a decorator.
…sibility 🧹 Fix `./spec/requests/admin_dashboard_spec.rb` spec
🧹 Clean up actors
🎁 Upgrade Redis initializer to Hyrax 5's gen version
Adjust paths and keys to look for labels.
The partials rendered in the tested view assume that we've set a collection type.
Hyrax 5 upgrade spec fixing
…oviders 🐛 Handle missing labels
…d-collections 🧹 Assigning collection_type
…-selectors Fixing nav link selectors to new structure
The only big thing in this commit is the appearance_decorator. I've added to the spec to show that the decorator should be working as intended.
…-selectors Fixing nav link selectors to new structure
🧹 Clean up forms
…-selectors Fixing nav link selectors to new structure
The selector was *very* specific, and with the HTML class changes for Bootstrap 3 to 4, this almost certainly broke. Note, there are still underlying issues with two other specs; there errors are listed below: ``` 1) Admin can select home page theme when a search results theme is selected updates the search results page with the selected layout view Failure/Error: super ActionView::Template::Error: undefined method `with_collection' for nil:NilClass ```
The hyper specific selectors are not durable for CSS framework upgrades.
🧹 Narrow specificity of CSS selector
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var allColorInputs = $("input[name*='color']") | ||
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() | ||
|
||
var allColorInputs = $("input[name*='color']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
}) | ||
|
||
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var input = $("input[name='admin_appearance["+ defaultTarget +"]']") | ||
|
||
input.val(input.data('default-value')) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var defaultTarget = $(e.target).data('default-target') | ||
var input = $("input[name='admin_appearance["+ defaultTarget +"]']") | ||
|
||
input.val(input.data('default-value')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
e.preventDefault() | ||
|
||
var defaultTarget = $(e.target).data('default-target') | ||
var input = $("input[name='admin_appearance["+ defaultTarget +"]']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('div.defaultable-colors a.restore-default-color').click(function(e) { | ||
e.preventDefault() | ||
|
||
var defaultTarget = $(e.target).data('default-target') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
@@ -0,0 +1,20 @@ | |||
$(document).on('turbolinks:load', function() { | |||
$('div.defaultable-colors a.restore-default-color').click(function(e) { | |||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var allColorInputs = $("input[name*='color']") | ||
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() | ||
|
||
var allColorInputs = $("input[name*='color']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
}) | ||
|
||
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var input = $("input[name='admin_appearance["+ defaultTarget +"]']") | ||
|
||
input.val(input.data('default-value')) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var defaultTarget = $(e.target).data('default-target') | ||
var input = $("input[name='admin_appearance["+ defaultTarget +"]']") | ||
|
||
input.val(input.data('default-value')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
e.preventDefault() | ||
|
||
var defaultTarget = $(e.target).data('default-target') | ||
var input = $("input[name='admin_appearance["+ defaultTarget +"]']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('div.defaultable-colors a.restore-default-color').click(function(e) { | ||
e.preventDefault() | ||
|
||
var defaultTarget = $(e.target).data('default-target') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
@@ -0,0 +1,20 @@ | |||
$(document).on('turbolinks:load', function() { | |||
$('div.defaultable-colors a.restore-default-color').click(function(e) { | |||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var allColorInputs = $("input[name*='color']") | ||
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() | ||
|
||
var allColorInputs = $("input[name*='color']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
}) | ||
|
||
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('div.defaultable-colors a.restore-default-color').click(function(e) { | ||
e.preventDefault() | ||
|
||
var defaultTarget = $(e.target).data('default-target') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
@@ -0,0 +1,20 @@ | |||
$(document).on('turbolinks:load', function() { | |||
$('div.defaultable-colors a.restore-default-color').click(function(e) { | |||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
// Grab the data from the ul div | ||
var series_data = new Array(); | ||
var pointer_lookup = new Array(); | ||
var x_ticks = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
if (domDependenciesMet()) { | ||
// Grab the data from the ul div | ||
var series_data = new Array(); | ||
var pointer_lookup = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
//flot loaded? And canvas element supported. | ||
if (domDependenciesMet()) { | ||
// Grab the data from the ul div | ||
var series_data = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var allColorInputs = $("input[name*='color']") | ||
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() | ||
|
||
var allColorInputs = $("input[name*='color']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
}) | ||
|
||
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
@@ -0,0 +1,20 @@ | |||
$(document).on('turbolinks:load', function() { | |||
$('div.defaultable-colors a.restore-default-color').click(function(e) { | |||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
// Grab the data from the ul div | ||
var series_data = new Array(); | ||
var pointer_lookup = new Array(); | ||
var x_ticks = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
if (domDependenciesMet()) { | ||
// Grab the data from the ul div | ||
var series_data = new Array(); | ||
var pointer_lookup = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
//flot loaded? And canvas element supported. | ||
if (domDependenciesMet()) { | ||
// Grab the data from the ul div | ||
var series_data = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
}; | ||
|
||
global.BlacklightRangeLimit = BlacklightRangeLimit; | ||
}(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected an assignment or function call and instead saw an expression.
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var allColorInputs = $("input[name*='color']") | ||
|
||
allColorInputs.each(function() { | ||
$(this).val($(this).data('default-value')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() | ||
|
||
var allColorInputs = $("input[name*='color']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
}) | ||
|
||
$('.panel-footer a.restore-all-default-colors').click(function(e) { | ||
e.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
if (domDependenciesMet()) { | ||
// Grab the data from the ul div | ||
var series_data = new Array(); | ||
var pointer_lookup = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
//flot loaded? And canvas element supported. | ||
if (domDependenciesMet()) { | ||
// Grab the data from the ul div | ||
var series_data = new Array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array literal notation [] is preferable.
}; | ||
|
||
global.BlacklightRangeLimit = BlacklightRangeLimit; | ||
}(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected an assignment or function call and instead saw an expression.
max = BlacklightRangeLimit.parseNum($(range_element).find(".max").first().text()); | ||
} | ||
|
||
return [min, max] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
|
||
|
||
var min = max = BlacklightRangeLimit.parseNum(current_limit.find(".single").text()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
You might be leaking a variable (max) here.
// set as sniffed from HTML. Pass in a DOM element for a div.range | ||
// Will return NaN as min or max in case of error or other weirdness. | ||
function min_max(range_element) { | ||
var current_limit = $(range_element).closest(".limit_content.range_limit").find(".current") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
if (plot && slider_el) { | ||
slider_el.width(plot.width()); | ||
slider_el.css("display", "block") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
placeholder_input.slider("setValue", values); | ||
}); | ||
|
||
end_el.change( function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'end_el' used out of scope.
begin_el.val(min); | ||
end_el.val(max); | ||
|
||
begin_el.change( function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'begin_el' used out of scope.
} | ||
|
||
begin_el.val(min); | ||
end_el.val(max); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'end_el' used out of scope.
}); | ||
} | ||
|
||
begin_el.val(min); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'begin_el' used out of scope.
|
||
// Slider change should update text input values. | ||
var parent = $(this).parent(); | ||
var form = $(parent).closest(".limit_content").find("form.range_limit"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'form' is already defined.
|
||
if (plot && slider_el) { | ||
slider_el.width(plot.width()); | ||
slider_el.css("display", "block") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
if (isInt(min) && isInt(max)) { | ||
$(this).contents().wrapAll('<div style="display:none" />'); | ||
|
||
var range_element = $(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'range_element' is already defined.
🧹 Narrow specificity of CSS selector
cffe41b
The selector was very specific, and with the HTML class changes for
Bootstrap 3 to 4, this almost certainly broke.
Note, there are still underlying issues with two other specs; there
errors are listed below:
🧹 Remove specificity of CSS selectors in test
9c3c46a
The hyper specific selectors are not durable for CSS framework upgrades.