Chrome and Safari seems to be having trouble with the
.css('display').should.be 'block' assertion. The result of
css('display') is an empty string for all occurrences. It works
perfectly in FireFox.
describe 'Animator - Displaying Big Cards when Frame is not visible'
before_each
cards = elements('<div id="cards"/>')
frame = elements('<div id="frame"/>')
animator = new Animator(cards, frame, '../')
end
describe 'bringInBigCards()'
it 'will display the cards placeholder using an animation'
animator.bringInBigCards()
Clock.tick(1000)
cards.css("display").should.be "block"
end
end
end
cards.css('display') return an empty string. What am I doing wrong?
-Mark
--
Mark Nijhof
Cre8ive Thought
m: 0047 95 00 99 37
e: mark....@cre8ivethought.com
w: www.cre8ivethought.com
be_visible : function(actual) {
return jQuery(actual).css('display') != 'none' &&
jQuery(actual).css('visibility') != 'hidden' &&
jQuery(actual).attr('type') != 'hidden'
},
be_hidden : function(actual) {
return !JSpec.does(actual, 'be_visible')
},
-Mark
be_hidden : function(actual) {
return !JSpec.does(actual, 'be_visible') ||
jQuery(actual).css('display') == ''
},
And this works, please let me know if I am cheating too much here.
-Mark
On Mon, Jun 14, 2010 at 2:26 PM, Mark Nijhof
And for example:
will setup the cards placeholder to contain all needed elementsexpected
"<IMG class=BusineesCards alt=\"\"
src=\"http://cre8ivethought.com/images/Cre8iveBusinessCardsPresentation.png\">"
to match
/<img src=".*images\/Cre8iveBusinessCardsPresentation.png" alt=""
class="BusineesCards">/
order of attributes is different.
Anyway IE needs a manual test run either way :)
-Mark
On Mon, Jun 14, 2010 at 2:35 PM, Mark Nijhof