dom-class-test.js revision fdfbb58f76522ce41b2c8af7f0a9274dcf82cd4a
ArrayAssert = Y.ArrayAssert;
name: 'Y.DOM.hasClass',
'should return true with className match': function() {
val = 'foo';
},
'should return false with no className': function() {
val = 'foo';
},
'should return false with no className match': function() {
val = 'foo';
}
}));
name: 'Y.DOM.addClass',
'should add the class to the node': function() {
val = 'foo';
},
'should add the class to the node and preserve existing': function() {
},
'should not add if existing': function() {
},
'should ltrim the class and add to the node': function() {
val = ' foo';
},
'should rtrim the class and add to the node': function() {
val = 'foo ';
},
'should trim the class and add to the node': function() {
val = ' foo ';
},
'should handle bad input': function() {
}
}));
name: 'Y.DOM.removeClass',
'should remove the class from the node': function() {
val = 'foo';
},
'should leave the className as is': function() {
val = 'foo';
},
'should remove the class from the node and preserve existing': function() {
val = 'foo bar';
}
}));
name: 'Y.DOM.replaceClass',
'should replace the class with the given string': function() {
val = 'foo';
},
'should replace the class with and preserve existing': function() {
val = 'foo';
// TODO: should this be strict?
},
'should leave the className as is': function() {
val = 'foo';
}
}));
name: 'Y.DOM.toggleClass',
'should remove the given class': function() {
val = 'foo';
},
'should remove the given class and preserve existing': function() {
val = 'foo bar';
},
'should add the given class': function() {
val = 'foo';
},
'should add the given class and preserve existing': function() {
val = 'bar';
}
}));