Skip to content

Commit

Permalink
test(flicking): Assertion condition update
Browse files Browse the repository at this point in the history
Update to not be erroneous on jQuery 3.

Fix naver#362
Close naver#394
  • Loading branch information
netil authored Oct 28, 2016
1 parent a8b1b33 commit ab119bf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/unit/js/flicking.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,13 @@ QUnit.test("destroy()", function(assert) {

var origPanelStyle = {
wrapper: {
className: $el.attr("class"),
style: $el.attr("style")
className: $el.attr("class") || "",
style: $el.attr("style") || ""
},
list: $panel.map(function(i,v) {
return {
className: $(v).attr("class"),
style: $(v).attr("style")
className: $(v).attr("class") || "",
style: $(v).attr("style") || ""
};
})
};
Expand All @@ -751,14 +751,14 @@ QUnit.test("destroy()", function(assert) {
assert.ok(!isEventFired, "Input action should be disabled.");
assert.ok($el.find("."+ containerClassName).length === 0, "Container element was removed?");

assert.ok($el.attr("class") === origPanelStyle.wrapper.className, "Wrapper element class has been restored?");
assert.ok($el.attr("style") === origPanelStyle.wrapper.style, "Wrapper element style has been restored?");
assert.equal($el.attr("class") || "", origPanelStyle.wrapper.className, "Wrapper element class has been restored?");
assert.equal($el.attr("style") || "", origPanelStyle.wrapper.style, "Wrapper element style has been restored?");

$panel.each(function(i, v) {
var $panelEl = $(v);

assert.ok($panelEl.attr("class") === origPanelStyle.list[i].className, "Panel element class has been restored?");
assert.ok($panelEl.attr("style") === origPanelStyle.list[i].style, "Panel element style has been restored?");
assert.equal($panelEl.attr("class") || "", origPanelStyle.list[i].className, "Panel element class has been restored?");
assert.equal($panelEl.attr("style") || "", origPanelStyle.list[i].style, "Panel element style has been restored?");
});

// check for the resources release
Expand Down Expand Up @@ -1898,4 +1898,4 @@ QUnit.test("Disallow API move calls during touch hold", function(assert) {

done();
});
});
});

0 comments on commit ab119bf

Please sign in to comment.