nobbie-wx-preview 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,59 @@
1
+ class TestType < Test::Unit::TestCase
2
+ include NobbieTestCase
3
+
4
+ def test_type_with_text_ctrl
5
+ #todo: this doesnt seem to work in windows or osx .. but it should ... see KNOWN ISSUES
6
+ assert_equal 'text_ctrl', text(component('text_ctrl'))
7
+ type '123', :in => 'text_ctrl'
8
+ assert_equal '123', text(component('text_ctrl'))
9
+ assert_events ['text_ctrl: ', 'text_ctrl: 1', 'text_ctrl: 12', 'text_ctrl: 123']
10
+ end
11
+
12
+ def test_type_with_combo_box
13
+ #todo: this doesnt seem to work in osx .. but it should ... see KNOWN ISSUES
14
+ assert_equal 'combo_box', text(component('combo_box'))
15
+ type '456', :in => 'combo_box'
16
+ assert_equal '456', text(component('combo_box'))
17
+ assert_events ['combo_box: ', 'combo_box: 4', 'combo_box: 45', 'combo_box: 456']
18
+ end
19
+
20
+ def test_type_with_empty_string
21
+ type 'a', :in => 'text_ctrl'
22
+ clear_events
23
+ type '', :in => 'text_ctrl'
24
+ assert_equal '', text(component('text_ctrl'))
25
+ assert_events 'text_ctrl: '
26
+ end
27
+
28
+ def test_type_with_readonly_text_ctrl
29
+ assert_exception ComponentReadOnlyException do type 'readonly_text_ctrl_value', :in => 'readonly_text_ctrl' end
30
+ assert_equal 'readonly_text_ctrl', text(component('readonly_text_ctrl'))
31
+ end
32
+
33
+ def test_type_with_readonly_combo_box
34
+ #todo: this won't currently work on windows ... see KNOWN ISSUES
35
+ assert_exception ComponentReadOnlyException do type 'readonly_combo_box_value', :in => 'readonly_combo_box' end
36
+ assert_equal 'readonly_combo_box', text(component('readonly_combo_box'))
37
+ end
38
+
39
+ def test_type_with_disabled_text_ctrl
40
+ assert_equal 'disabled_text_ctrl', text(component('disabled_text_ctrl'))
41
+ assert_exception ComponentDisabledException do type 'disabled_text_ctrl_value', :in => 'disabled_text_ctrl' end
42
+ assert_equal 'disabled_text_ctrl', text(component('disabled_text_ctrl'))
43
+ end
44
+
45
+ def test_type_with_disabled_combo_box
46
+ #todo: this doesnt seem to work in osx .. but it should ... see KNOWN ISSUES
47
+ assert_equal 'disabled_combo_box', text(component('disabled_combo_box'))
48
+ assert_exception ComponentDisabledException do type 'disabled_combo_box_value', :in => 'disabled_combo_box' end
49
+ assert_equal 'disabled_combo_box', text(component('disabled_combo_box'))
50
+ end
51
+
52
+ def test_type_with_component_not_found
53
+ assert_exception ComponentNotFoundException do type 'missing_value', :in => 'missing' end
54
+ end
55
+
56
+ def test_type_with_unsupported_operation_for_component
57
+ assert_exception UnsupportedOperationForComponentException do type 'button_value', :in => 'button' end
58
+ end
59
+ end
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: nobbie-wx-preview
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.0.1
7
+ date: 2007-03-28 00:00:00 +01:00
8
+ summary: ""
9
+ require_paths:
10
+ - lib
11
+ email: ""
12
+ homepage: ""
13
+ rubyforge_project:
14
+ description:
15
+ autorequire: nobbie/wx/acceptance_test
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Paul Allton
31
+ files:
32
+ - lib/nobbie
33
+ - lib/nobbie/wx
34
+ - lib/nobbie/wx/acceptance_test.rb
35
+ - lib/nobbie/wx/command
36
+ - lib/nobbie/wx/command.rb
37
+ - lib/nobbie/wx/command_executor.rb
38
+ - lib/nobbie/wx/command_factory.rb
39
+ - lib/nobbie/wx/driven.rb
40
+ - lib/nobbie/wx/impl
41
+ - lib/nobbie/wx/launcher.rb
42
+ - lib/nobbie/wx/operation
43
+ - lib/nobbie/wx/operations.rb
44
+ - lib/nobbie/wx/platform.rb
45
+ - lib/nobbie/wx/command/choose.rb
46
+ - lib/nobbie/wx/command/click_on.rb
47
+ - lib/nobbie/wx/command/get_component.rb
48
+ - lib/nobbie/wx/command/get_selected_values.rb
49
+ - lib/nobbie/wx/command/is_chosen.rb
50
+ - lib/nobbie/wx/command/is_enabled.rb
51
+ - lib/nobbie/wx/command/select.rb
52
+ - lib/nobbie/wx/command/type_into.rb
53
+ - lib/nobbie/wx/impl/element
54
+ - lib/nobbie/wx/impl/operation
55
+ - lib/nobbie/wx/impl/element/element_path_builder.rb
56
+ - lib/nobbie/wx/impl/operation/choosable.rb
57
+ - lib/nobbie/wx/impl/operation/select.rb
58
+ - test/all_tests.rb
59
+ - test/suite
60
+ - test/suite/app.rb
61
+ - test/suite/nobbie_test_case.rb
62
+ - test/suite/test_choose.rb
63
+ - test/suite/test_click.rb
64
+ - test/suite/test_enabled.rb
65
+ - test/suite/test_launcher.rb
66
+ - test/suite/test_operations.rb
67
+ - test/suite/test_selection.rb
68
+ - test/suite/test_type.rb
69
+ - README
70
+ - KNOWN ISSUES
71
+ test_files: []
72
+
73
+ rdoc_options: []
74
+
75
+ extra_rdoc_files:
76
+ - README
77
+ - KNOWN ISSUES
78
+ executables: []
79
+
80
+ extensions: []
81
+
82
+ requirements: []
83
+
84
+ dependencies:
85
+ - !ruby/object:Gem::Dependency
86
+ name: wxruby2-preview
87
+ version_requirement:
88
+ version_requirements: !ruby/object:Gem::Version::Requirement
89
+ requirements:
90
+ - - "="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.0.39
93
+ version:
94
+ - !ruby/object:Gem::Dependency
95
+ name: wx_sugar
96
+ version_requirement:
97
+ version_requirements: !ruby/object:Gem::Version::Requirement
98
+ requirements:
99
+ - - "="
100
+ - !ruby/object:Gem::Version
101
+ version: 0.1.14
102
+ version: