mohawk 0.2.1 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/Changelog +5 -0
  2. data/lib/mohawk/accessors.rb +16 -0
  3. data/lib/mohawk/adapters/uia/text_box.rb +5 -1
  4. data/lib/mohawk/adapters/uia/window.rb +12 -7
  5. data/lib/mohawk/version.rb +1 -1
  6. data/mohawk.gemspec +2 -2
  7. data/spec/lib/mohawk/button_spec.rb +14 -0
  8. data/spec/lib/mohawk/checkbox_spec.rb +23 -0
  9. data/spec/lib/mohawk/combo_box_spec.rb +52 -0
  10. data/spec/lib/mohawk/control_spec.rb +17 -0
  11. data/spec/lib/mohawk/label_spec.rb +8 -0
  12. data/spec/lib/mohawk/link_spec.rb +16 -0
  13. data/spec/lib/mohawk/menu_spec.rb +20 -0
  14. data/spec/lib/mohawk/navigation_spec.rb +25 -0
  15. data/spec/lib/mohawk/radio_spec.rb +22 -0
  16. data/spec/lib/mohawk/spinner_spec.rb +31 -0
  17. data/spec/lib/mohawk/text_spec.rb +40 -0
  18. data/spec/lib/mohawk/tree_view_spec.rb +54 -0
  19. data/spec/lib/mohawk/window_spec.rb +84 -0
  20. data/spec/lib/mohawk_spec.rb +25 -0
  21. data/spec/screens/about.rb +7 -0
  22. data/spec/screens/data_entry_form.rb +4 -0
  23. data/spec/screens/main_form.rb +32 -0
  24. data/spec/spec_helper.rb +19 -1
  25. data/spec/tabs_spec.rb +26 -0
  26. metadata +44 -68
  27. data/features/button.feature +0 -10
  28. data/features/checkbox.feature +0 -12
  29. data/features/combo_box.feature +0 -44
  30. data/features/control.feature +0 -9
  31. data/features/label.feature +0 -4
  32. data/features/link.feature +0 -9
  33. data/features/menu.feature +0 -13
  34. data/features/mohawk.feature +0 -25
  35. data/features/navigation.feature +0 -9
  36. data/features/radio.feature +0 -5
  37. data/features/spinner.feature +0 -12
  38. data/features/step_definitions/button_steps.rb +0 -15
  39. data/features/step_definitions/checkbox_steps.rb +0 -19
  40. data/features/step_definitions/combo_box_steps.rb +0 -48
  41. data/features/step_definitions/control_steps.rb +0 -11
  42. data/features/step_definitions/label_steps.rb +0 -3
  43. data/features/step_definitions/link_steps.rb +0 -3
  44. data/features/step_definitions/menu_steps.rb +0 -10
  45. data/features/step_definitions/mohawk_steps.rb +0 -35
  46. data/features/step_definitions/navigation_steps.rb +0 -15
  47. data/features/step_definitions/radio_steps.rb +0 -7
  48. data/features/step_definitions/spinner_steps.rb +0 -18
  49. data/features/step_definitions/tabs_steps.rb +0 -23
  50. data/features/step_definitions/text_steps.rb +0 -15
  51. data/features/step_definitions/tree_view_steps.rb +0 -35
  52. data/features/tabs.feature +0 -22
  53. data/features/text.feature +0 -18
  54. data/features/tree_view.feature +0 -52
  55. data/spec/ffi_stub.rb +0 -16
@@ -1,22 +0,0 @@
1
- Feature: Working with tab controls
2
-
3
- Background:
4
- Given we are looking at the about screen
5
-
6
- Scenario: Getting the currently selected tab
7
- Then we know that the currently selected tab is "Info"
8
-
9
- Scenario: Getting the available tabs
10
- Then we know that the available tabs are "Info, Other Info"
11
-
12
- Scenario: Selecting tabs by index
13
- When we select the tab at index "1"
14
- Then we know that the currently selected tab is "Other Info"
15
-
16
- Scenario: Selecting tabs by their values
17
- When we select the tab with the text "Other Info"
18
- Then we know that the currently selected tab is "Other Info"
19
-
20
- Scenario: Selecting tabs by a regex
21
- When we select the tab with the regex "[Oo]ther?\sInfo$"
22
- Then we know that the currently selected tab is "Other Info"
@@ -1,18 +0,0 @@
1
- Feature: Working with text controls
2
-
3
- Scenario: Setting and getting text
4
- When I set the "text field" to the value "Some text"
5
- Then the "text field" should be "Some text"
6
-
7
- Scenario: Setting and getting text from a text box control
8
- When I set the "text box field" to the value "Some text"
9
- Then the "text box field" should be "Some text"
10
-
11
- Scenario: Clearing text
12
- When I set the "text field" to the value "Text to be cleared"
13
- And I clear the "text field"
14
- Then the "text field" should be ""
15
-
16
- Scenario: Entering text
17
- When I enter into "masked text field" the values "abc12345willnotgoin6789"
18
- Then the "masked text field" should be "123-45-6789"
@@ -1,52 +0,0 @@
1
- Feature: Working with TreeView controls
2
-
3
- Scenario: Selecting an item by index
4
- When I select the item with index "1" in the TreeView
5
- Then the selected TreeView value should be "Parent Two"
6
-
7
- Scenario: Selecting an item by value
8
- When I select the item "Parent Two" in the TreeView
9
- Then the selected TreeView value should be "Parent Two"
10
-
11
- Scenario: Can reveal the available items
12
- Then the available tree items should be:
13
- | Tree Items |
14
- | Parent One |
15
- | Parent Two |
16
-
17
- Scenario: Expanding items by index
18
- When I expand the tree item with index "0"
19
- Then the available tree items should be:
20
- | Tree Items |
21
- | Parent One |
22
- | Child 1 |
23
- | Child 2 |
24
- | Parent Two |
25
-
26
- Scenario: Expanding items by value
27
- When I expand the tree item "Parent One"
28
- Then the available tree items should be:
29
- | Tree Items |
30
- | Parent One |
31
- | Child 1 |
32
- | Child 2 |
33
- | Parent Two |
34
-
35
- Scenario: Collapsing items by index
36
- When I expand the tree item "Parent One"
37
- And I collapse the tree item with index "0"
38
- Then the available tree items should be:
39
- | Tree Items |
40
- | Parent One |
41
- | Parent Two |
42
-
43
- Scenario: Collapsing items by value
44
- When I expand the tree item "Parent One"
45
- And I collapse the tree item "Parent One"
46
- Then the available tree items should be:
47
- | Tree Items |
48
- | Parent One |
49
- | Parent Two |
50
-
51
- Scenario: Working with the raw view
52
- Then I am able to interact with the raw tree view
data/spec/ffi_stub.rb DELETED
@@ -1,16 +0,0 @@
1
- require 'ffi'
2
-
3
- module FFI
4
- module Library
5
- def ffi_lib(*names)
6
- end
7
-
8
- def ffi_libraries
9
- end
10
-
11
- def attach_function(name, func, args, returns = nil, options = nil)
12
- define_singleton_method(name) {|*the_args|}
13
- end
14
- end
15
- end
16
-