Created
May 13, 2011 14:55
-
-
Save andreastt/970672 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'operawatir/desktop_helper' | |
describe 'Password Strength' do | |
before :all do | |
browser.open_dialog_with_action('Feature Dialog', 'Set up Sync') | |
browser.quick_button(:name, 'button_Next').change_page_with_click | |
@new_password_edit = browser.quick_editfield(:name, 'new_password_edit') | |
end | |
before :each do | |
@new_password_edit.focus_with_click | |
@new_password_edit.clear | |
end | |
passwords = { | |
'aaaaa' => 'Very weak', | |
'aqplsd' => 'Weak', | |
'aqpl6sdH' => 'Medium', | |
'aqpl6sdHpoAki' => 'Strong', | |
'aqpl6sdHpoAkiK' => 'Very strong' | |
} | |
passwords.each do |password, strength| | |
describe strength do | |
it 'has correct strength level' do | |
@new_password_edit.type_text password | |
browser.quick_button(:text, strength).text.should include strength | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment