Sha256: 189ad70bd7a7cce0dd63911a9ddc275dcd9cd7112b1060e2608570b4b9f554ea
Contents?: true
Size: 1.71 KB
Versions: 4
Compression:
Stored size: 1.71 KB
Contents
require 'spec_helper' describe 'javascript warnings', :js => true do it 'warns about excess page content' do visit("http://localhost:#{SERVERPORT}/pages/warnings") find("#fullpagelink").click sleep(0.5) alertmsg = page.driver.browser.switch_to.alert.text alertmsg.should include("EXTRA_CONTENT_DISCARDED") page.driver.browser.switch_to.alert.accept page.should have_content("You are on page 2") end it 'warns about missing dependencies' do visit("http://localhost:#{SERVERPORT}/pages/warnings") find("#disablehistoryjslink").click sleep(0.5) alertmsg = page.driver.browser.switch_to.alert.text alertmsg.should include("MISSING_DEPENDENCIES") page.driver.browser.switch_to.alert.accept page.should have_content("Disabled") end it 'warns about missing reference' do visit("http://localhost:#{SERVERPORT}/pages/warnings") find("#missingreferencelink").click alertmsg = page.driver.browser.switch_to.alert.text alertmsg.should include("MISSING_REFERENCE") page.driver.browser.switch_to.alert.accept end it 'warns about reference to more than one section of same id' do visit("http://localhost:#{SERVERPORT}/pages/warnings") find("#doublesectionlink").click alertmsg = page.driver.browser.switch_to.alert.text alertmsg.should include("UNIQUE_SECTION_NOT_FOUND") page.driver.browser.switch_to.alert.accept end it 'warns about reference to section which does not exist' do visit("http://localhost:#{SERVERPORT}/pages/warnings") find("#nosectionlink").click alertmsg = page.driver.browser.switch_to.alert.text alertmsg.should include("UNIQUE_SECTION_NOT_FOUND") page.driver.browser.switch_to.alert.accept end end
Version data entries
4 entries across 4 versions & 1 rubygems