Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Simulator reset of contents and settings and german localization of the simulator #65

Merged
merged 3 commits into from Feb 1, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions gem/lib/frank-cucumber/core_frank_steps.rb
Expand Up @@ -276,3 +276,7 @@
When /^I quit the simulator/ do
quit_simulator
end

When /^I reset the simulator/ do
simulator_reset_data
end
11 changes: 11 additions & 0 deletions gem/lib/frank-cucumber/frank_helper.rb
Expand Up @@ -214,6 +214,17 @@ def quit_simulator
APPLESCRIPT}
end

def simulator_reset_data
%x{osascript<<APPLESCRIPT
activate application "iPhone Simulator"
tell application "System Events"
click menu item 5 of menu 1 of menu bar item 2 of menu bar 1 of process "#{Localize.t(:iphone_simulator)}"
delay 0.5
click button 2 of window 1 of process "#{Localize.t(:iphone_simulator)}"
end tell
APPLESCRIPT}
end

#Note this needs to have "Enable access for assistive devices"
#chcked in the Universal Access system preferences
def simulator_hardware_menu_press( menu_label )
Expand Down
2 changes: 2 additions & 0 deletions gem/lib/frank-cucumber/frank_localize.rb
Expand Up @@ -8,6 +8,8 @@ def self.system_locale
case ENV['LANG']
when /^fr_/
:fr
when /^de_/
:de
else
:en
end
Expand Down
13 changes: 12 additions & 1 deletion gem/lib/frank-cucumber/localize.yml
Expand Up @@ -18,4 +18,15 @@ fr:
shake_gesture: Secousse
simulate_memory_warning: Simuler un avertissement de mémoire
toggle_in_call_status_bar: Afficher/Masquer la barre d'état d'appel en cour
simulate_hardware_keyboard: Simuler un clavier matériel
simulate_hardware_keyboard: Simuler un clavier matériel

de:
iphone_simulator: iOS-Simulator
hardware: Hardware
home: Home
rotate_left: Links drehen
rotate_right: Rechts drehen
shake_gesture: Schüttelgeste
simulate_memory_warning: Speicherwarnhinweis simulieren
toggle_in_call_status_bar: Status für eingeh. Anrufe ein/aus
simulate_hardware_keyboard: Hardware-Tastatur simulieren