rformspec 0.4-x86-mingw32 → 0.5.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,33 +1,33 @@
1
- require File.join(File.dirname(__FILE__), 'calc_helper')
2
-
3
- describe 'Simple Calculation' do
4
- include CalcSpecHelper
5
-
6
- before (:all) do
7
- start_calc
8
- end
9
-
10
- after(:all) do
11
- exit_calc
12
- end
13
-
14
- it "can do adding" do
15
- click_3
16
- click_add
17
- click_7
18
- click_equals
19
- result.should == "10. "
20
- end
21
-
22
- it "can do muliply" do
23
- click_3
24
- click_multiply
25
- click_7
26
- click_equals
27
- result.should == "21. "
28
- end
29
-
30
- it "if you think above is good, we can make it more readable" do
31
- perform(%w(3 + 7 =)).should == "10. "
32
- end
33
- end
1
+ require File.join(File.dirname(__FILE__), 'calc_helper')
2
+
3
+ describe 'Simple Calculation' do
4
+ include CalcSpecHelper
5
+
6
+ before (:all) do
7
+ start_calc
8
+ end
9
+
10
+ after(:all) do
11
+ exit_calc
12
+ end
13
+
14
+ it "can do adding" do
15
+ click_3
16
+ click_add
17
+ click_7
18
+ click_equals
19
+ result.should == "10. "
20
+ end
21
+
22
+ it "can do muliply" do
23
+ click_3
24
+ click_multiply
25
+ click_7
26
+ click_equals
27
+ result.should == "21. "
28
+ end
29
+
30
+ it "if you think above is good, we can make it more readable" do
31
+ perform(%w(3 + 7 =)).should == "10. "
32
+ end
33
+ end
@@ -1,27 +1,27 @@
1
- <?xml version="1.1" encoding="US-ASCII"?>
2
- <project>
3
- <name>Calculator</name>
4
- <default_browser></default_browser>
5
- <test_framework>Watir</test_framework>
6
- <syntax_framework>RWebSpec</syntax_framework>
7
- <environments>
8
- </environments>
9
- <exclude_dirs></exclude_dirs>
10
- <exclude_files></exclude_files>
11
- <test_named_as>specification</test_named_as>
12
- <spec_template></spec_template>
13
- <page_template></page_template>
14
- <storywise_url></storywise_url>
15
- <jira_url></jira_url>
16
- <jira_project></jira_project>
17
- <jira_login></jira_login>
18
- <jira_password></jira_password>
19
- <heart_beat>
20
- <spec_suite></spec_suite>
21
- <environment></environment>
22
- <start_time></start_time>
23
- <repeat></repeat>
24
- <end_repeat></end_repeat>
25
- <emails></emails>
26
- </heart_beat>
27
- </project>
1
+ <?xml version="1.1" encoding="US-ASCII"?>
2
+ <project>
3
+ <name>Calculator</name>
4
+ <default_browser></default_browser>
5
+ <test_framework>Watir</test_framework>
6
+ <syntax_framework>RWebSpec</syntax_framework>
7
+ <environments>
8
+ </environments>
9
+ <exclude_dirs></exclude_dirs>
10
+ <exclude_files></exclude_files>
11
+ <test_named_as>specification</test_named_as>
12
+ <spec_template></spec_template>
13
+ <page_template></page_template>
14
+ <storywise_url></storywise_url>
15
+ <jira_url></jira_url>
16
+ <jira_project></jira_project>
17
+ <jira_login></jira_login>
18
+ <jira_password></jira_password>
19
+ <heart_beat>
20
+ <spec_suite></spec_suite>
21
+ <environment></environment>
22
+ <start_time></start_time>
23
+ <repeat></repeat>
24
+ <end_repeat></end_repeat>
25
+ <emails></emails>
26
+ </heart_beat>
27
+ </project>
@@ -1,13 +1,13 @@
1
- <?xml version="1.1" encoding="US-ASCII"?>
2
- <workspace>
3
- <project_name>Calculator</project_name>
4
- <project_file>C:\work\testwise\samples\form_calculator\calculator.tpr</project_file>
5
- <opened_files>
6
- <entry name="$PROJECT_DIR$/calc_spec.rb"/>
7
- </opened_files>
8
- <recent_files>
9
- <entry name="$PROJECT_DIR$/calc_spec.rb"/>
10
- </recent_files>
11
- <test_suites>
12
- </test_suites>
13
- </workspace>
1
+ <?xml version="1.1" encoding="US-ASCII"?>
2
+ <workspace>
3
+ <project_name>Calculator</project_name>
4
+ <project_file>C:\work\testwise\samples\form_calculator\calculator.tpr</project_file>
5
+ <opened_files>
6
+ <entry name="$PROJECT_DIR$/calc_spec.rb"/>
7
+ </opened_files>
8
+ <recent_files>
9
+ <entry name="$PROJECT_DIR$/calc_spec.rb"/>
10
+ </recent_files>
11
+ <test_suites>
12
+ </test_suites>
13
+ </workspace>
data/sample/mouse.rb CHANGED
@@ -1,19 +1,19 @@
1
- require 'rubygems'
2
- require 'rformspec'
3
-
4
- RFormSpec::AutoIt.set_option("WinSearchChildren", 1)
5
-
6
- class TextWiseWindow < RFormSpec::Window
7
- def initialize(title = "TextWise", text = "", opts = {})
8
- super(title, text, opts)
9
- wait_and_focus_window(title)
10
- end
11
-
12
- end
13
-
14
-
15
- win = TextWiseWindow.new("TextWise", "", :present => true)
16
- win.mouse_move(90, 30)
17
- #win.mouse_click(241, 645)
18
- win.mouse_click(220, 640)
19
- #RFormSpec::Mouse.move_to(200, 40)
1
+ require 'rubygems'
2
+ require 'rformspec'
3
+
4
+ RFormSpec::AutoIt.set_option("WinSearchChildren", 1)
5
+
6
+ class TextWiseWindow < RFormSpec::Window
7
+ def initialize(title = "TextWise", text = "", opts = {})
8
+ super(title, text, opts)
9
+ wait_and_focus_window(title)
10
+ end
11
+
12
+ end
13
+
14
+
15
+ win = TextWiseWindow.new("TextWise", "", :present => true)
16
+ win.mouse_move(90, 30)
17
+ #win.mouse_click(241, 645)
18
+ win.mouse_click(220, 640)
19
+ #RFormSpec::Mouse.move_to(200, 40)
data/sample/notepad.rb CHANGED
@@ -1,19 +1,19 @@
1
- require 'rformspec'
2
-
3
- include RFormSpec::Driver
4
-
5
- RFormSpec::Process.run("C:\\WINDOWS\\NOTEPAD.EXE")
6
- notepad_win = RFormSpec::Window.new('Untitled - Notepad', "", :wait_timeout => 2)
7
- RFormSpec::Keyboard.type("Hello, Missing No. 5.{ENTER}1 2 3 4 6 7 8 9 10{ENTER}")
8
- RFormSpec::Keyboard.press("+{UP 2}")
9
-
10
- # move cursor up and insert the missing number
11
- RFormSpec::Mouse.move_to(70, 65)
12
- RFormSpec::Mouse.click
13
- RFormSpec::Keyboard.type("5 ")
14
-
15
- notepad_win.close
16
-
17
- notepad_confirm_dialog = RFormSpec::Window.new('Notepad', 'The text')
18
- notepad_confirm_dialog.focus
19
- RFormSpec::Button.new(notepad_confirm_dialog, "7").click
1
+ require 'rformspec'
2
+
3
+ include RFormSpec::Driver
4
+
5
+ RFormSpec::Process.run("C:\\WINDOWS\\NOTEPAD.EXE")
6
+ notepad_win = RFormSpec::Window.new('Untitled - Notepad', "", :wait_timeout => 2)
7
+ RFormSpec::Keyboard.type("Hello, Missing No. 5.{ENTER}1 2 3 4 6 7 8 9 10{ENTER}")
8
+ RFormSpec::Keyboard.press("+{UP 2}")
9
+
10
+ # move cursor up and insert the missing number
11
+ RFormSpec::Mouse.move_to(70, 65)
12
+ RFormSpec::Mouse.click
13
+ RFormSpec::Keyboard.type("5 ")
14
+
15
+ notepad_win.close
16
+
17
+ notepad_confirm_dialog = RFormSpec::Window.new('Notepad', 'The text')
18
+ notepad_confirm_dialog.focus
19
+ RFormSpec::Button.new(notepad_confirm_dialog, "7").click
data/sample/notepad1.rb CHANGED
@@ -1,14 +1,14 @@
1
- require 'rformspec'
2
-
3
- include RFormSpec::Driver
4
-
5
- RFormSpec::Process.run("C:\\WINDOWS\\NOTEPAD.EXE")
6
- notepad_win = RFormSpec::Window.new('Untitled - Notepad', "", :wait_timeout => 2)
7
- RFormSpec::Keyboard.type("Hello from Notepad, {ENTER}1 2 3 4 5 6 7 8 9 10{ENTER}")
8
- sleep(0.5)
9
- RFormSpec::Keyboard.press("+{UP 2}")
10
- sleep(0.5)
11
- notepad_win.close
12
-
13
- notepad_confirm_dialog = RFormSpec::Window.new('Notepad', 'No', :wait_timeout => 1)
14
- notepad_confirm_dialog.click_button('&No')
1
+ require 'rformspec'
2
+
3
+ include RFormSpec::Driver
4
+
5
+ RFormSpec::Process.run("C:\\WINDOWS\\NOTEPAD.EXE")
6
+ notepad_win = RFormSpec::Window.new('Untitled - Notepad', "", :wait_timeout => 2)
7
+ RFormSpec::Keyboard.type("Hello from Notepad, {ENTER}1 2 3 4 5 6 7 8 9 10{ENTER}")
8
+ sleep(0.5)
9
+ RFormSpec::Keyboard.press("+{UP 2}")
10
+ sleep(0.5)
11
+ notepad_win.close
12
+
13
+ notepad_confirm_dialog = RFormSpec::Window.new('Notepad', 'No', :wait_timeout => 1)
14
+ notepad_confirm_dialog.click_button('&No')
data/sample/test_calc.rb CHANGED
@@ -1,33 +1,33 @@
1
- require 'rformspec'
2
-
3
- class CalcTest < RFormSpec::FormTestCase
4
- include RFormSpec::Driver
5
-
6
- def setup
7
- RFormSpec::AutoIt.init
8
-
9
- if window_exists?("Calculator")
10
- focus_window('Calculator')
11
- RFormSpec::Window.new('Calculator')
12
- else
13
- RFormSpec::Process.run("calc.exe")
14
- end
15
-
16
- @calc_win = RFormSpec::Window.new('Calculator', "", :wait_timeout => 2)
17
- end
18
-
19
- def teardown
20
- # @calc_win.close
21
- end
22
-
23
- def test_multiple
24
- @calc_win.click_button('127') #3
25
- @calc_win.click_button('91') #*
26
- @calc_win.click_button('131') #7
27
- @calc_win.click_button('112') #=
28
- sleep 1
29
- assert_equal "21. ", @calc_win.get_control_text('403')
30
-
31
- end
32
-
33
- end
1
+ require 'rformspec'
2
+
3
+ class CalcTest < RFormSpec::FormTestCase
4
+ include RFormSpec::Driver
5
+
6
+ def setup
7
+ RFormSpec::AutoIt.init
8
+
9
+ if window_exists?("Calculator")
10
+ focus_window('Calculator')
11
+ RFormSpec::Window.new('Calculator')
12
+ else
13
+ RFormSpec::Process.run("calc.exe")
14
+ end
15
+
16
+ @calc_win = RFormSpec::Window.new('Calculator', "", :wait_timeout => 2)
17
+ end
18
+
19
+ def teardown
20
+ # @calc_win.close
21
+ end
22
+
23
+ def test_multiple
24
+ @calc_win.click_button('127') #3
25
+ @calc_win.click_button('91') #*
26
+ @calc_win.click_button('131') #7
27
+ @calc_win.click_button('112') #=
28
+ sleep 1
29
+ assert_equal "21. ", @calc_win.get_control_text('403')
30
+
31
+ end
32
+
33
+ end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rformspec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 4
9
- version: "0.4"
8
+ - 5
9
+ - 1
10
+ version: 0.5.1
10
11
  platform: x86-mingw32
11
12
  authors:
12
13
  - Zhimin Zhan
@@ -14,7 +15,7 @@ autorequire: rformspec
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-10-07 00:00:00 Z
18
+ date: 2013-01-18 00:00:00 Z
18
19
  dependencies: []
19
20
 
20
21
  description:
@@ -39,12 +40,13 @@ files:
39
40
  - lib/rformspec/open_file_dialog.rb
40
41
  - lib/rformspec/process.rb
41
42
  - lib/rformspec/saveas_file_dialog.rb
43
+ - lib/rformspec/testwise_plugin.rb
42
44
  - lib/rformspec/window.rb
43
45
  - lib/rformspec.rb
44
- - sample/form_calculator/calculator.tpr
45
- - sample/form_calculator/calculator.tws
46
46
  - sample/form_calculator/calc_helper.rb
47
47
  - sample/form_calculator/calc_spec.rb
48
+ - sample/form_calculator/calculator.tpr
49
+ - sample/form_calculator/calculator.tws
48
50
  - sample/mouse.rb
49
51
  - sample/notepad.rb
50
52
  - sample/notepad1.rb
@@ -79,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
81
  requirements:
80
82
  - none
81
83
  rubyforge_project:
82
- rubygems_version: 1.7.2
84
+ rubygems_version: 1.8.24
83
85
  signing_key:
84
86
  specification_version: 3
85
87
  summary: An wrap of AUTOIT3 for functional testing of Windows form applications