Sha256: 6e93d1d8f8fb72be8098eb4380ac9fe031cae5f3a8a0632272eded1a8e49405f
Contents?: true
Size: 1.09 KB
Versions: 63
Compression:
Stored size: 1.09 KB
Contents
describe "ActiveAdmin.TableCheckboxToggler", -> beforeEach -> loadFixtures('table_checkboxes.html'); @collection = $("#collection") @toggle_all = @collection.find(".toggle_all") @checkboxes = @collection.find(":checkbox").not(@toggle_all) new ActiveAdmin.TableCheckboxToggler({}, @collection) describe "'selected' class for table row", -> it "should add the class 'selected' to rows when their checkbox is checked ", -> checkbox = $("#item_1") checkbox.attr("checked", "checked") checkbox.trigger("change") expect(checkbox.parents("tr")).toHaveAttr("class", "selected") it "should remove the class 'selected' from rows when their checkbox is unchecked ", -> checkbox = $("#item_1") checkbox.trigger("change") expect(checkbox.parents("tr")).not.toHaveAttr("class", "selected") describe "clicking a cell", -> it "should toggle the checkbox when a cell is clicked", -> checkbox = $("#item_1") row = checkbox.parents("td") $(row).trigger("click") expect(checkbox).toHaveAttr("checked", "checked")
Version data entries
63 entries across 63 versions & 8 rubygems