Permalink
Browse files

Quick and dirty watir script made to test every avaliable theme aroun…

…d. Needs IE since divs method is no avaliable on Safari
  • Loading branch information...
1 parent 806824c commit 9ca621434a3137b50f70983ea42847dc4c217702 @fdv fdv committed Dec 13, 2009
Showing with 1,236 additions and 337 deletions.
  1. +1,190 −337 CHANGELOG
  2. +46 −0 doc/test_themes.rb
View
View
@@ -0,0 +1,46 @@
+require 'rubygems'
+require 'watir'
+require "test/unit"
+require 'watir/ie'
+
+@browser = Watir::IE.new
+@browser.speed = :slow
+
+TYPO_TEST="http://localhost:3000"
+LOGIN="admin"
+PASSWORD="admin"
+TEXT="My Shiny Weblog!"
+
+@browser.goto("#{TYPO_TEST}/admin")
+Watir::Waiter.wait_until{ @browser.button(:id, 'submit').exists? }
+
+@browser.text_field(:id, 'user_login').set(LOGIN)
+@browser.text_field(:id, 'user_password').set(PASSWORD)
+@browser.button(:id, 'submit').click
+
+Watir::Waiter.wait_until{ @browser.div(:id, 'footer').exists? }
+
+@browser.goto("#{TYPO_TEST}/admin/themes")
+Watir::Waiter.wait_until{ @browser.div(:id, 'footer').exists? }
+
+
+@browser.divs(:class, /theme/).each do |div|
+ div.link(:index, 1).click
+ Watir::Waiter.wait_until{ @browser.div(:id, 'footer').exists? }
+
+ @browser.goto(TYPO_TEST)
+ Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
+
+ @browser.goto("#{TYPO_TEST}/2009/12/13/hello-world")
+ Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
+
+ @browser.goto("#{TYPO_TEST}/pages/about")
+ Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
+
+ @browser.goto("#{TYPO_TEST}/tag/default")
+ Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
+
+ @browser.goto("#{TYPO_TEST}/category/default")
+ Watir::Waiter.wait_until{ @browser.text.downcase.include?("my shiny weblog") }
+
+end

0 comments on commit 9ca6214

Please sign in to comment.