Skip to content

Commit

Permalink
Re-add asset identifier to be picked up in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Sep 27, 2023
1 parent f85083d commit fdb9319
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/assets/batch_selection/_asset_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
end
-%>
<div class="batch-selection-asset batch-selection-scope">
<div class="isa-tree batch-selection-asset-row <%= html_classes -%> <%= tree_class %>">
<div class="isa-tree batch-selection-asset-row <%= html_classes -%> <%= tree_class %>" data-asset-id="<%= item_id -%>">
<%= batch_selection_collapse_toggle if children.any? %>
<%= render partial: 'assets/batch_selection/checkbox',
Expand Down
8 changes: 4 additions & 4 deletions test/functional/publishing/single_publishing_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ def setup

# split-button dropdown menu shown for tree branches
should_have_dropdown.each do |asset|
assert_select ".isa-tree.#{asset.class.name}_#{asset.id}", count: 1 do
assert_select '.isa-tree[data-asset-id=?]', "#{asset.class.name}_#{asset.id}", count: 1 do
assert_select '.parent-btn-dropdown', count: 1
assert_select '.dropdown-menu', count: 1 do
assert_select 'li', count: 2 do
assert_select 'a.selectChildren', text: /Select this item and all of its sub-items./, count: 1 do
assert_select 'a.batch-selection-select-children', text: /Select this item and all of its sub-items./, count: 1 do
assert_select 'img[src=?]', '/assets/checkbox_select_all.svg'
end

assert_select 'a.deselectChildren', text: /Deselect this item and all of its sub-items./, count: 1 do
assert_select 'a.batch-selection-deselect-children', text: /Deselect this item and all of its sub-items./, count: 1 do
assert_select 'img[src=?]', '/assets/checkbox_deselect_all.svg'
end
end
Expand All @@ -179,7 +179,7 @@ def setup
end
# split-button dropdown menu not shown for tree leafs
should_not_have_dropdown.each do |asset|
assert_select ".isa-tree.#{asset.class.name}_#{asset.id}", count: 1 do
assert_select '.isa-tree[data-asset-id=?]', "#{asset.class.name}_#{asset.id}", count: 1 do
assert_select '.parent-btn-dropdown', count: 0
assert_select '.dropdown-menu', count: 0
end
Expand Down

0 comments on commit fdb9319

Please sign in to comment.