Sha256: 377a6b8612288a9bf814dd0c3bb93d9f9e2b13a9ae9ff8a6c2281a53ad99225d
Contents?: true
Size: 881 Bytes
Versions: 3
Compression:
Stored size: 881 Bytes
Contents
require File.expand_path('../../watirspec_helper', __FILE__) require 'tmpdir' describe 'Window' do describe '#visual_hash' do before :each do browser.url = fixture('boxes.html') @reference = window.visual_hash end it 'returns a hash' do @reference.should match /^(0x)[a-f0-9]{32}$/ end it 'returns identical hashes for visually identical pages' do browser.url = fixture('boxes.html') window.visual_hash.should == @reference end it 'returns different hashes for visually different pages' do browser.url = fixture('grid.html') window.visual_hash.should_not == @reference end end # This method is deprecated, but must be tested anyway. describe '#eval_js' do it 'works the same way as execute_script' do window.eval_js('1+1').should == window.execute_script('1+1'); end end end
Version data entries
3 entries across 3 versions & 1 rubygems