-
Notifications
You must be signed in to change notification settings - Fork 10
Osaka mostly working for Mavericks. #9
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| osaka.tmproj | ||
| osaka*.gem | ||
| Gemfile.lock | ||
| .DS_Store |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,8 +114,10 @@ def duplicate | |
| end | ||
|
|
||
| def duplicate_and_close_original | ||
| new_instance = duplicate | ||
| close | ||
| original_window_name = control.current_window_name | ||
| new_instance = duplicate | ||
| control.click_menu_bar_by_name(original_window_name, "Window") | ||
| close | ||
| @control = new_instance.control | ||
| end | ||
|
|
||
|
|
@@ -199,6 +201,24 @@ def select_file_from_open_dialog(filename, dialog_location) | |
| dialog.set_folder(File.dirname(filename)) | ||
| dialog.select_file(File.basename(filename)) | ||
| end | ||
|
|
||
| # jwg add tests | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this comment doesn't belong here, right? |
||
| def template_chooser? | ||
| focus | ||
| current_window_name = control.current_window_name | ||
| current_window_name == "Choose a Theme" || | ||
| current_window_name == "Choose a Template" || | ||
| current_window_name == "Template Chooser" ? true : false | ||
| end | ||
|
|
||
| def close_template_chooser_if_any | ||
| focus | ||
| if template_chooser? | ||
| window = at.window(control.current_window_name) | ||
| close | ||
| control.wait_until_not_exists!(window) | ||
| end | ||
| end | ||
|
|
||
| def raise_error_on_open_standard_windows(error_message) | ||
| raise Osaka::ApplicationWindowsMustBeClosed, error_message if ! control.standard_window_list.empty? | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #/bin/bash | ||
| gem build osaka.gemspec | ||
| gem install osaka-0.4.8.gem | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this shell script should probably be removed... |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| UNIT_TESTS+=" ./spec/calculator_spec.rb" | ||
| UNIT_TESTS+=" ./spec/defaultssystem_spec.rb" | ||
| UNIT_TESTS+=" ./spec/keynote_flows_spec.rb" | ||
| UNIT_TESTS+=" ./spec/keynote_spec.rb" | ||
| UNIT_TESTS+=" ./spec/launchservices_spec.rb" | ||
| UNIT_TESTS+=" ./spec/location_spec.rb" | ||
| UNIT_TESTS+=" ./spec/mailmergeflow_spec.rb" | ||
| UNIT_TESTS+=" ./spec/numbers_spec.rb" | ||
| UNIT_TESTS+=" ./spec/osakaexpectations_spec.rb" | ||
| # UNIT_TESTS+=" ./spec/pages_spec.rb" | ||
| UNIT_TESTS+=" ./spec/preview_spec.rb" | ||
| UNIT_TESTS+=" ./spec/remotecontrol_spec.rb" | ||
| UNIT_TESTS+=" ./spec/scriptrunner_spec.rb" | ||
| UNIT_TESTS+=" ./spec/textedit_spec.rb" | ||
| UNIT_TESTS+=" ./spec/typicalapplication_spec.rb" | ||
| UNIT_TESTS+=" ./spec/typicalfinderdialog_spec.rb" | ||
| UNIT_TESTS+=" ./spec/typicalopendialog_spec.rb" | ||
| UNIT_TESTS+=" ./spec/typicalprintdialog_spec.rb" | ||
| UNIT_TESTS+=" ./spec/typicalsavedialog_spec.rb" | ||
|
|
||
| INTEGRATION_TESTS+=" ./spec/integration_calculator_spec.rb" | ||
| INTEGRATION_TESTS+=" ./spec/integration_keynote_spec.rb" | ||
| INTEGRATION_TESTS+=" ./spec/integration_numbers_spec.rb" | ||
| INTEGRATION_TESTS+=" ./spec/integration_preview_spec.rb" | ||
| INTEGRATION_TESTS+=" ./spec/integration_textedit_spec.rb" | ||
| ## INTEGRATION_TESTS+=" ./spec/integration_pages_numbers_mail_merge_spec.rb" | ||
|
|
||
| export LANG=en_US.UTF-8 | ||
|
|
||
| if [ "$1" == "u" ] ; then | ||
| ruby -S rspec $UNIT_TESTS | ||
|
|
||
| elif [ "$1" == "i" ] ; then | ||
| ruby -S rspec $INTEGRATION_TESTS | ||
| else | ||
| ruby -S rspec $UNIT_TESTS | ||
| ruby -S rspec $INTEGRATION_TESTS | ||
| fi | ||
|
|
||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likewise. You can do these with rake ? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually in higher-level classes, we wouldn't want to use the CommandRunner ? Is it possible to wrap that into a higher level to keep the abstraction good?