diff options
| author | Igor Minar | 2011-08-14 03:24:09 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-08-19 00:59:44 -0700 |
| commit | 4c8eaa1eb05ba98d30ff83f4420d6fcd69045d99 (patch) | |
| tree | dc2cf6febf4af2dc081e81355451fc728c792e69 /test | |
| parent | 4ba35eb97e8b7b9cf255e556fa0b86c892e76b1b (diff) | |
| download | angular.js-4c8eaa1eb05ba98d30ff83f4420d6fcd69045d99.tar.bz2 | |
refactor(jqLite): remove jqLite show/hide support
it turns out that even with our tricks, jqLite#show is not usable in
practice and definitely not on par with jQuery. so rather than
introducing half-baked apis which introduce issues, I'm removing them.
I also removed show/hide uses from docs, since they are not needed.
Breaks jqLite.hide/jqLite.show which are no longer available.
Diffstat (limited to 'test')
| -rw-r--r-- | test/jqLiteSpec.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index 11b9db93..309fb243 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -511,62 +511,6 @@ describe('jqLite', function(){ }); - describe('hide', function() { - var element; - - afterEach(function() { - if (element) dealoc(element); - }); - - it('should hide the element', function() { - element = jqLite('<div></div>'); - expect(isCssVisible(element)).toBe(true); - element.hide(); - expect(isCssVisible(element)).toBe(false); - }); - }); - - - describe('show', function() { - var element; - - afterEach(function() { - if (element) dealoc(element); - element.remove(); - }); - - - it('should show the element ', function() { - element = jqLite('<div></div>'); - element[0].style.display = 'none'; - expect(isCssVisible(element)).toBe(false); - element.show(); - expect(isCssVisible(element)).toBe(true); - }); - - - it('should show previously hidden element and preserve the display value', function() { - element = jqLite('<div style="display:inline">xx</div>'); - jqLite(document.body).append(element); - element.hide(); - expect(isCssVisible(element)).toBe(false); - element.show(); - expect(element[0].style.display).toBe('inline'); - expect(isCssVisible(element)).toBe(true); - - element[0].style.display = 'block'; - element.hide(); - expect(isCssVisible(element)).toBe(false); - element.show(); - expect(isCssVisible(element)).toBe(true); - - // this totally doesn't make sense, it should be 'block', but jquery (1.4.2+1.6.2) behaves - // this way. - expect(element[0].style.display).toBe('inline'); - }); - }); - - describe('eq', function() { it('should select the nth element ', function() { var element = jqLite('<div><span>aa</span></div><div><span>bb</span></div>'); |
