Module: Osaka::OsakaExpectations
- Defined in:
- lib/osaka/osakaexpectations.rb
Instance Method Summary collapse
- #expect_activate ⇒ Object
- #expect_click(location) ⇒ Object
- #expect_click!(location) ⇒ Object
- #expect_click_menu_bar(menu_item, menu_name) ⇒ Object
- #expect_clone ⇒ Object
- #expect_current_window_name ⇒ Object
- #expect_execute_osascript(command = nil) ⇒ Object
- #expect_exists?(location) ⇒ Boolean
- #expect_focus ⇒ Object
- #expect_focus! ⇒ Object
- #expect_get!(element, location) ⇒ Object
- #expect_get_app!(element) ⇒ Object
- #expect_keystroke(key, modifier = []) ⇒ Object
- #expect_keystroke!(key, modifier = []) ⇒ Object
- #expect_launch ⇒ Object
- #expect_mac_version_before(version_name) ⇒ Object
- #expect_not_exists?(location) ⇒ Boolean
- #expect_quit ⇒ Object
- #expect_running? ⇒ Boolean
- #expect_set(element, location, value) ⇒ Object
- #expect_set!(element, location, value) ⇒ Object
- #expect_set_current_window(name) ⇒ Object
- #expect_standard_window_list ⇒ Object
- #expect_system_event(event) ⇒ Object
- #expect_system_event!(event) ⇒ Object
- #expect_tell(do_this) ⇒ Object
- #expect_until_not_exists!(element) ⇒ Object
- #expect_wait_until_exists(*location) ⇒ Object
- #expect_wait_until_exists!(*location) ⇒ Object
- #expect_wait_until_not_exists(location) ⇒ Object
- #expect_wait_until_not_exists!(location, action) ⇒ Object
- #expect_window_list ⇒ Object
- #simulate_mac_version(version) ⇒ Object
Instance Method Details
#expect_activate ⇒ Object
18 19 20 |
# File 'lib/osaka/osakaexpectations.rb', line 18 def expect_activate expect(control).to receive(:activate) end |
#expect_click(location) ⇒ Object
84 85 86 |
# File 'lib/osaka/osakaexpectations.rb', line 84 def expect_click(location) expect(control).to receive(:click).with(location).and_return(control) end |
#expect_click!(location) ⇒ Object
80 81 82 |
# File 'lib/osaka/osakaexpectations.rb', line 80 def expect_click!(location) expect(control).to receive(:click!).with(location).and_return(control) end |
#expect_click_menu_bar(menu_item, menu_name) ⇒ Object
88 89 90 |
# File 'lib/osaka/osakaexpectations.rb', line 88 def (, ) expect(control).to receive(:click_menu_bar).with(, ).and_return(control) end |
#expect_clone ⇒ Object
14 15 16 |
# File 'lib/osaka/osakaexpectations.rb', line 14 def expect_clone expect(control).to receive(:clone) end |
#expect_current_window_name ⇒ Object
54 55 56 |
# File 'lib/osaka/osakaexpectations.rb', line 54 def expect_current_window_name expect(control).to receive(:current_window_name) end |
#expect_execute_osascript(command = nil) ⇒ Object
9 10 11 12 |
# File 'lib/osaka/osakaexpectations.rb', line 9 def expect_execute_osascript(command = nil) return expect(Osaka::ScriptRunner).to receive(:execute).with(command) unless command.nil? expect(Osaka::ScriptRunner).to receive(:execute) end |
#expect_exists?(location) ⇒ Boolean
108 109 110 |
# File 'lib/osaka/osakaexpectations.rb', line 108 def expect_exists?(location) expect(control).to receive(:exists?).with(location) end |
#expect_focus ⇒ Object
26 27 28 |
# File 'lib/osaka/osakaexpectations.rb', line 26 def expect_focus expect(control).to receive(:focus) end |
#expect_focus! ⇒ Object
30 31 32 |
# File 'lib/osaka/osakaexpectations.rb', line 30 def expect_focus! expect(control).to receive(:focus!) end |
#expect_get!(element, location) ⇒ Object
92 93 94 |
# File 'lib/osaka/osakaexpectations.rb', line 92 def expect_get!(element, location) expect(control).to receive(:get!).with(element, location) end |
#expect_get_app!(element) ⇒ Object
66 67 68 |
# File 'lib/osaka/osakaexpectations.rb', line 66 def expect_get_app!(element) expect(control).to receive(:get_app!).with(element) end |
#expect_keystroke(key, modifier = []) ⇒ Object
70 71 72 73 |
# File 'lib/osaka/osakaexpectations.rb', line 70 def expect_keystroke(key, modifier = []) expect(control).to receive(:keystroke).with(key, modifier).and_return(control) unless modifier.empty? expect(control).to receive(:keystroke).with(key).and_return(control) if modifier.empty? end |
#expect_keystroke!(key, modifier = []) ⇒ Object
75 76 77 78 |
# File 'lib/osaka/osakaexpectations.rb', line 75 def expect_keystroke!(key, modifier = []) expect(control).to receive(:keystroke!).with(key, modifier).and_return(control) unless modifier.empty? expect(control).to receive(:keystroke!).with(key).and_return(control) if modifier.empty? end |
#expect_launch ⇒ Object
22 23 24 |
# File 'lib/osaka/osakaexpectations.rb', line 22 def expect_launch expect(control).to receive(:launch) end |
#expect_mac_version_before(version_name) ⇒ Object
136 137 138 |
# File 'lib/osaka/osakaexpectations.rb', line 136 def expect_mac_version_before(version_name) expect(control).to receive(:mac_version_before).with(version_name) end |
#expect_not_exists?(location) ⇒ Boolean
112 113 114 |
# File 'lib/osaka/osakaexpectations.rb', line 112 def expect_not_exists?(location) expect(control).to receive(:not_exists?).with(location) end |
#expect_quit ⇒ Object
42 43 44 |
# File 'lib/osaka/osakaexpectations.rb', line 42 def expect_quit expect(control).to receive(:quit) end |
#expect_running? ⇒ Boolean
38 39 40 |
# File 'lib/osaka/osakaexpectations.rb', line 38 def expect_running? expect(control).to receive(:running?) end |
#expect_set(element, location, value) ⇒ Object
58 59 60 |
# File 'lib/osaka/osakaexpectations.rb', line 58 def expect_set(element, location, value) expect(control).to receive(:set).with(element, location, value) end |
#expect_set!(element, location, value) ⇒ Object
62 63 64 |
# File 'lib/osaka/osakaexpectations.rb', line 62 def expect_set!(element, location, value) expect(control).to receive(:set!).with(element, location, value) end |
#expect_set_current_window(name) ⇒ Object
34 35 36 |
# File 'lib/osaka/osakaexpectations.rb', line 34 def expect_set_current_window(name) expect(control).to receive(:set_current_window).with(name) end |
#expect_standard_window_list ⇒ Object
50 51 52 |
# File 'lib/osaka/osakaexpectations.rb', line 50 def expect_standard_window_list expect(control).to receive(:standard_window_list) end |
#expect_system_event(event) ⇒ Object
100 101 102 |
# File 'lib/osaka/osakaexpectations.rb', line 100 def expect_system_event(event) expect(control).to receive(:system_event).with(event) end |
#expect_system_event!(event) ⇒ Object
104 105 106 |
# File 'lib/osaka/osakaexpectations.rb', line 104 def expect_system_event!(event) expect(control).to receive(:system_event!).with(event) end |
#expect_tell(do_this) ⇒ Object
96 97 98 |
# File 'lib/osaka/osakaexpectations.rb', line 96 def expect_tell(do_this) expect(control).to receive(:tell).with(do_this) end |
#expect_until_not_exists!(element) ⇒ Object
132 133 134 |
# File 'lib/osaka/osakaexpectations.rb', line 132 def expect_until_not_exists!(element) expect(control).to receive(:until_not_exists!).with(element).and_yield end |
#expect_wait_until_exists(*location) ⇒ Object
116 117 118 |
# File 'lib/osaka/osakaexpectations.rb', line 116 def expect_wait_until_exists(*location) expect(control).to receive(:wait_until_exists).with(*location) end |
#expect_wait_until_exists!(*location) ⇒ Object
120 121 122 |
# File 'lib/osaka/osakaexpectations.rb', line 120 def expect_wait_until_exists!(*location) expect(control).to receive(:wait_until_exists!).with(*location) end |
#expect_wait_until_not_exists(location) ⇒ Object
124 125 126 |
# File 'lib/osaka/osakaexpectations.rb', line 124 def expect_wait_until_not_exists(location) expect(control).to receive(:wait_until_not_exists).with(location) end |
#expect_wait_until_not_exists!(location, action) ⇒ Object
128 129 130 |
# File 'lib/osaka/osakaexpectations.rb', line 128 def expect_wait_until_not_exists!(location, action) expect(control).to receive(:wait_until_not_exists!).with(location) end |
#expect_window_list ⇒ Object
46 47 48 |
# File 'lib/osaka/osakaexpectations.rb', line 46 def expect_window_list expect(control).to receive(:window_list) end |
#simulate_mac_version(version) ⇒ Object
5 6 7 |
# File 'lib/osaka/osakaexpectations.rb', line 5 def simulate_mac_version(version) expect(control).to receive(:mac_version).and_return(version) end |