rwdtinker 1.62 → 1.63

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.txt CHANGED
@@ -227,6 +227,11 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
227
227
  Thanks, Steven Gibson
228
228
 
229
229
  == Changelog
230
+ Version 1.63
231
+ changed handling of application name returned
232
+ added jump seletion options
233
+ added some unit tests
234
+
230
235
  version 1.62
231
236
  improve distro release script
232
237
  code cleanup
@@ -17,6 +17,6 @@ class RwdTinker < RWDialog
17
17
  end
18
18
 
19
19
  def inspect
20
- "Rwdtinker Application "
20
+ "#{$rwdapplicationidentity}"
21
21
  end
22
22
 
@@ -3,7 +3,9 @@ JumpLink = Hash.new { |hh, kk| hh[kk] = "ERROR: link not found: #{kk.inspect}.";
3
3
  locationlink = {
4
4
  :helpscreen=> "runhelpwindow",
5
5
  :tinkerbackwindow=>"runrwdtinkerbackwindow",
6
- :returntomain=>"returntomain"
6
+ :returntomain=>"returntomain",
7
+ :opendocuments=>"runtinkerdocuments",
8
+ :editconfiguration=>"runeditconfiguration"
7
9
  }
8
10
  locationlink.each { |kk, vv| JumpLink[kk] = vv }
9
11
 
@@ -13,18 +15,12 @@ runjumplocation = "#{JumpLink[:"#{@a_jumplinkinput}"]}"
13
15
 
14
16
  self.send(runjumplocation)
15
17
 
16
-
17
-
18
-
19
- end
18
+ end
20
19
 
21
-
22
20
 
23
21
  # list the remote control options on the screen
24
22
  def showjumplinkoptions
25
23
 
26
-
27
-
28
24
  @jumplinkoptions = $rwdjumplink.rwd_options
29
25
 
30
26
  end
@@ -0,0 +1,10 @@
1
+ # Application menu orginally (c) 2004 Steven Gibson under GPL.
2
+ #
3
+ # For more information about see http://www.rubyforge.net/projects/rwdapplications
4
+
5
+ # call the window
6
+ def runtinkerdocuments
7
+ @rwd_window = "main"
8
+ @rwd_tab = "documentsrwdtinkerone"
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+ # Application menu orginally (c) 2004 Steven Gibson under GPL.
2
+ #
3
+ # For more information about see http://www.rubyforge.net/projects/rwdapplications
4
+
5
+ # call the window
6
+ def runeditconfiguration
7
+ @rwd_window = "tinkerbackwindow"
8
+ @rwd_tab = "editconfigurationfile"
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+ # Application menu orginally (c) 2004 Steven Gibson under GPL.
2
+ #
3
+ # For more information about see http://www.rubyforge.net/projects/rwdapplications
4
+
5
+ # call the window
6
+ def runtinkerhelpabout
7
+ @rwd_window = "rwdtinkerhelpwindow"
8
+
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+ # this code is to return to the window back from the help window
2
+ def runselectiontab
3
+
4
+
5
+ @rwd_tab = "selectiontab"
6
+ end
7
+
8
+
9
+
@@ -1,112 +1,106 @@
1
1
  # test harness
2
+
3
+
4
+ require 'test/unit/testcase'
5
+ require 'test/unit/assertions'
6
+ include Test::Unit::Assertions
7
+ include Test::Unit
2
8
  def rwdtinker_all_tests
3
9
  print "in rwdtinker all tests\n"
10
+ $testrwdtinkertestcase = TestSuite.new
4
11
  test_runrwdtinkerbackwindow
5
12
  end
6
13
 
7
14
  def test_runrwdtinkerbackwindow
8
15
 
9
- require 'test/unit'
10
- begin
11
16
 
17
+ begin
18
+ testasserts = 0
19
+ print "Starting rwdtinker tests!\n"
12
20
  runrwdtinkerbackwindow
13
-
14
- raise NotImplementedError, 'Need to write test_runrwdtinkerbackwindow'
15
-
16
- rescue NotImplementedError
21
+
22
+ assert_equal("tinkerbackwindow",@rwd_window) ; testasserts += 1
23
+ runselectiontab
24
+ assert_equal("selectiontab",@rwd_tab) ; testasserts += 1
25
+ showjumplinkoptions
26
+ @a_jumplinkinput = "returntomain"
27
+ runjumplinkcommand
28
+ assert_equal("main",@rwd_window) ; testasserts += 1
29
+ @a_jumplinkinput = "helpscreen"
30
+ runjumplinkcommand
31
+
32
+ assert_equal("rwdtinkerhelpwindow",@rwd_window) ; testasserts += 1
33
+ returntomain
34
+ assert_equal("main",@rwd_window) ; testasserts += 1
35
+ runtinkerdocuments
36
+ assert_equal("documentsrwdtinkerone",@rwd_tab) ; testasserts += 1
37
+ runrwdtinkerbackwindow
38
+
39
+ assert_equal("tinkerbackwindow",@rwd_window) ; testasserts += 1
40
+ @a_installapplet="/usr/src/rwdapplets/rwdtinker/zips/rwdahelloworld-0.5"
41
+ viewgemappletcontents
42
+ assert_not_nil(@appletcontentstext) ; testasserts += 1
43
+ runrwdtinkerwin2version
44
+ assert_equal("applicationversion",@rwd_window) ; testasserts += 1
45
+ returntomain
46
+ assert_equal("main",@rwd_window) ; testasserts += 1
47
+ runrwdtinkerbackwindow
48
+
49
+ assert_equal("tinkerbackwindow",@rwd_window) ; testasserts += 1
50
+ runremotezipsinstall
51
+ assert_equal("superantcomremotezipsinstall",@rwd_tab) ; testasserts += 1
52
+ runeditconfiguration
53
+ assert_equal("editconfigurationfile",@rwd_tab) ; testasserts += 1
54
+
55
+
56
+ $stderr.print "tests completed succesfully!\n"
57
+ $stderr.print testasserts, " asserts performed\n"
58
+
59
+ rescue NotImplementedError, Exception
17
60
  $stderr.print $!
18
61
 
19
62
  end
63
+
20
64
  end
21
65
 
22
66
 
23
67
 
24
- def test_choosenewhelptopic
68
+ def teststobedown
69
+ runtinkerhelpabout
70
+ assert_equal("rwdtinkerhelpwindow",@rwd_tab) ; testasserts += 1
25
71
  raise NotImplementedError, 'Need to write test_choosenewhelptopic'
26
- end
27
-
28
-
29
- def test_listinstalledfiles
30
72
  raise NotImplementedError, 'Need to write test_listinstalledfiles'
31
- end
32
-
33
-
34
- def test_listzipfilestoinstall
35
73
  raise NotImplementedError, 'Need to write test_listzipfilestoinstall'
36
- end
37
-
38
- def test_loadconfigurationrecord
39
74
  raise NotImplementedError, 'Need to write test_loadconfigurationrecord'
40
- end
41
-
42
- def test_loadconfigurationvariables
43
75
  raise NotImplementedError, 'Need to write test_loadconfigurationvariables'
44
- end
45
-
46
76
 
47
-
48
- def test_main
49
77
  raise NotImplementedError, 'Need to write test_main'
50
- end
51
78
 
52
- def test_network_demon
53
79
  raise NotImplementedError, 'Need to write test_network_demon'
54
- end
55
80
 
56
- def test_network_start
57
81
  raise NotImplementedError, 'Need to write test_network_start'
58
- end
59
82
 
60
- def test_openappletname
61
83
  raise NotImplementedError, 'Need to write test_openappletname'
62
- end
63
84
 
64
- def test_removeapplet
65
85
  raise NotImplementedError, 'Need to write test_removeapplet'
66
- end
67
86
 
68
- def test_returntomain
69
87
  raise NotImplementedError, 'Need to write test_returntomain'
70
- end
71
88
 
72
- def test_runcontrolcommand
73
89
  raise NotImplementedError, 'Need to write test_runcontrolcommand'
74
- end
75
-
76
90
 
77
- def test_runhelpwindow
78
91
  raise NotImplementedError, 'Need to write test_runhelpwindow'
79
- end
80
-
81
-
82
92
 
83
-
84
- def test_runrwdtinkerversion
85
93
  raise NotImplementedError, 'Need to write test_runrwdtinkerversion'
86
- end
87
94
 
88
- def test_runrwdtinkerwin2version
89
95
  raise NotImplementedError, 'Need to write test_runrwdtinkerwin2version'
90
- end
91
96
 
92
- def test_runviewplatform
93
97
  raise NotImplementedError, 'Need to write test_runviewplatform'
94
- end
95
98
 
96
- def test_rwdtinkerversiondiagnostic
97
99
  raise NotImplementedError, 'Need to write test_rwdtinkerversiondiagnostic'
98
- end
99
100
 
100
- def test_rwdwindowreturn
101
101
  raise NotImplementedError, 'Need to write test_rwdwindowreturn'
102
- end
103
-
104
- def test_saveconfigurationrecord
105
102
  raise NotImplementedError, 'Need to write test_saveconfigurationrecord'
106
- end
107
-
108
103
 
109
- def test_viewappletcontents
110
104
  raise NotImplementedError, 'Need to write test_viewappletcontents'
111
105
  end
112
106
 
@@ -2,6 +2,7 @@
2
2
  def rwdtest_harness
3
3
 
4
4
  print "in test harness\n"
5
+
5
6
  $testharnessarray.each { |x|
6
7
  print "calling #{x}\n"
7
8
  eval("#{x}")
@@ -0,0 +1,11 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # For information see http://www.rubyforge.net/projects/rwdapplications
4
+
5
+ # call the rwdtinker helpwindow
6
+
7
+ def runremotezipsinstall
8
+ @rwd_window = "tinkerbackwindow"
9
+ @rwd_tab = "superantcomremotezipsinstall"
10
+ end
11
+
@@ -1,3 +1,3 @@
1
- ##VERSION:1.62
1
+ ##VERSION:1.63
2
2
  $rwdapplicationidentity = "rwdtinker main application"
3
3
 
@@ -1,4 +1,4 @@
1
- ##VERSION:1.62
1
+ ##VERSION:1.63
2
2
  ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
3
3
  CodeName = "rwdtinker"
4
4
  CodeNameFile = CodeName + ".rb"
@@ -11,5 +11,5 @@ LangDir = "lang"
11
11
  $prevouswindow ="main"
12
12
  $rwdcontrolports =["13713","13714","13715","13716","13717","13718"]
13
13
  $port = 7705
14
- $rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain"]
15
- RwdTinkerVersion = "1.62"
14
+ $rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain","opendocuments","editconfiguration"]
15
+ RwdTinkerVersion = "1.63"
@@ -1,4 +1,4 @@
1
- ##VERSION:1.62
1
+ ##VERSION:1.63
2
2
  TinkerWin2ConfigurationFileName = "tinkerwin2variables.cnf" # this file name - do not change
3
3
  ##NAME:$zipslocation:0
4
4
  $zipslocation = "zips" # location of applets to add
@@ -227,6 +227,11 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
227
227
  Thanks, Steven Gibson
228
228
 
229
229
  == Changelog
230
+ Version 1.63
231
+ changed handling of application name returned
232
+ added jump seletion options
233
+ added some unit tests
234
+
230
235
  version 1.62
231
236
  improve distro release script
232
237
  code cleanup
data/rwdconfig.dist CHANGED
@@ -1,4 +1,4 @@
1
- ##VERSION:1.62
1
+ ##VERSION:1.63
2
2
  # rwdtinker core configuration file
3
3
  ##NAME: ConfigLocation:0
4
4
  ConfigLocation=""
@@ -7,4 +7,6 @@ ConfigLocation=""
7
7
  ##NAME:$testharnessarray:0
8
8
  $testharnessarray = ["rwdtinker_all_tests"]
9
9
  ##NAME:TestNow:0
10
- TestNow=false
10
+ TestNow=false # turning this on will run the unit tests
11
+ ##NAME:$testharness:0
12
+ $testharness=true
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.8
3
3
  specification_version: 1
4
4
  name: rwdtinker
5
5
  version: !ruby/object:Gem::Version
6
- version: "1.62"
7
- date: 2005-03-30
6
+ version: "1.63"
7
+ date: 2005-04-03
8
8
  summary: rwdtinker application is a framework to program for RubyWebDialogs.
9
9
  require_paths:
10
10
  - "."
@@ -39,6 +39,10 @@ files:
39
39
  - code/01rwdcore/test_cases.rb
40
40
  - code/01rwdcore/test_harness.rb
41
41
  - code/01rwdcore/jumplinkcommand.rb
42
+ - code/01rwdcore/selectiontab.rb
43
+ - code/01rwdcore/rundocuments.rb
44
+ - code/01rwdcore/runhelpabout.rb
45
+ - code/01rwdcore/runeditconfiguration.rb
42
46
  - code/dd0viewphoto/dd0viewphoto.rb
43
47
  - code/superant.com.rwdtinkerbackwindow/controlclient.rb
44
48
  - code/superant.com.rwdtinkerbackwindow/diagnostictab.rb
@@ -62,6 +66,7 @@ files:
62
66
  - code/superant.com.rwdtinkerbackwindow/remotegemlist.rb
63
67
  - code/superant.com.rwdtinkerbackwindow/installremotegem.rb
64
68
  - code/superant.com.rwdtinkerbackwindow/listgemzips.rb
69
+ - code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb
65
70
  - code/zz0applicationend/zz0end.rb
66
71
  - configuration/tinkerwin2variables.dist
67
72
  - configuration/rwdtinker.dist
@@ -136,8 +141,6 @@ files:
136
141
  - rwd_files/rwdindex.html
137
142
  - rwd_files/tinker.png
138
143
  - zips/rwdahelloworld-0.5.zip
139
- - tests/rwdtinkertestEN.rb
140
- - tests/test.result
141
144
  - tests/totranslate.lang
142
145
  - tests/cleancnf.sh
143
146
  - tests/rdep.rb
@@ -1,163 +0,0 @@
1
- #-------------------------------------------------------------------------------------------------------------#
2
- # test with the WATIR controller
3
- #
4
- # Simple test based on Google/watir demo
5
- #
6
- #------------------------------------------------------------------------------------------------------------ #
7
-
8
- #includes
9
- require '../watir' # the controller
10
-
11
- #test::unit includes
12
- require 'test/unit'
13
- require 'test/unit/ui/console/testrunner'
14
- require '../unittests/testUnitAddons'
15
-
16
- #code to set your current path in Windows
17
- $myDir = File.dirname(__FILE__)
18
- $LOAD_PATH << $myDir
19
-
20
- class TC_rwdtinker_suite < Test::Unit::TestCase
21
-
22
-
23
-
24
- def test_a_Open1
25
- #--------------------------------------------------------
26
- # test case that shows basic WATIR functionality:
27
- # * enter text in a field
28
- # * click a button
29
- #
30
-
31
- #variables
32
- testSite = 'http://localhost:7705'
33
-
34
- #open the IE browser
35
- $ie = IE.new
36
-
37
- puts '## Beginning of test: rwdtinker'
38
- puts ' '
39
-
40
-
41
- $ie.goto(testSite)
42
- puts ' Action: entered ' + testSite + 'in the address bar.'
43
- sleep 1
44
-
45
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_help";document.bodyform.submit();').click
46
-
47
- $ie.button(:caption, 'Click for Version').click
48
-
49
- $ie.button(:caption, 'Cancel').click
50
-
51
-
52
-
53
- sleep 1
54
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_selectiontab";document.bodyform.submit();').click
55
-
56
-
57
-
58
- $ie.button(:caption, 'RwdTinker Help Window').click
59
- puts ' Action: clicked the Help Window link'
60
-
61
- end
62
-
63
- def test_b_Buttons1
64
-
65
-
66
- sleep 1
67
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_nexttab";document.bodyform.submit();').click
68
- puts ' Action: clicked the nexttab link'
69
-
70
-
71
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_main";document.bodyform.submit();').click
72
- puts ' Action: clicked the main tab link'
73
-
74
-
75
- $ie.button(:caption, "Cancel").click
76
- puts ' Action: clicked the cancel button'
77
-
78
-
79
-
80
- end
81
-
82
- def test_c_tabs
83
-
84
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_one";document.bodyform.submit();').click
85
- puts ' Action: clicked tab one'
86
-
87
-
88
- end
89
-
90
- def test_d_tabs
91
-
92
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_selectiontab";document.bodyform.submit();').click
93
- puts ' Action: clicked the selectiontab'
94
-
95
-
96
- $ie.button(:caption, 'RwdTinker Back Window').click
97
- puts ' Action: clicked the Help Window link'
98
-
99
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_backone";document.bodyform.submit();').click
100
- puts ' Action: clicked the backone tab'
101
-
102
-
103
- assert($ie.pageContainsText("previous window") )
104
-
105
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_diagnostictab";document.bodyform.submit();').click
106
- puts ' Action: clicked the diagnostictab top link'
107
-
108
-
109
- $ie.button(:caption, "View Ruby Version").click
110
- puts ' Action: clicked Ruby Version button.'
111
-
112
- assert($ie.pageContainsText("Version") )
113
-
114
- $ie.button(:caption, "view platform").click
115
- puts ' Action: clicked platform button.'
116
-
117
- assert($ie.pageContainsText("Platform is") )
118
-
119
- $ie.button(:caption, "View rwdtinker Version").click
120
- puts ' Action: clicked rwdtinker version button.'
121
-
122
- assert($ie.pageContainsText("rwdtinker version") )
123
-
124
- end # end of test_d
125
-
126
- def test_e_tabs
127
-
128
-
129
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_filelister";document.bodyform.submit();').click
130
-
131
-
132
- assert($ie.pageContainsText("View the list") )
133
-
134
- $ie.button(:caption, "List Files").click
135
- puts ' Action: clicked the list files button.'
136
-
137
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="fillappletname/rwdviewlogo-0.4.inf";document.bodyform.submit();').click
138
-
139
-
140
- $ie.button(:caption, "View Install Text").click
141
- puts ' Action: clicked the View Install Text button.'
142
-
143
- assert($ie.pageContainsText("rwdviewlogo") )
144
-
145
-
146
- end
147
-
148
- def test_f_tabs
149
-
150
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="rwd_tab_zipslister";document.bodyform.submit();').click
151
-
152
- assert($ie.pageContainsText("File Name") )
153
-
154
- assert($ie.pageContainsText("view the list of zip files") )
155
-
156
- $ie.button(:caption, "List applets available for installing").click
157
- puts ' Action: clicked the List applets available for installing button.'
158
-
159
- $ie.link(:url, 'javascript:document.bodyform.rwd_action.value="fillziptoinstallname/rwdhelloworld-0.3.zip";document.bodyform.submit();').click
160
-
161
- end
162
-
163
- end #end of class TC_google_suite
data/tests/test.result DELETED
@@ -1,32 +0,0 @@
1
- Loaded suite C:/ruby/sample/watir/examples/rwdtinkertestEN
2
- Started
3
- ## Beginning of test: rwdtinker
4
-
5
- Action: entered http://localhost:7705in the address bar.
6
- Action: clicked the Help Window link
7
- Action: clicked the nexttab link
8
- Action: clicked the main tab link
9
- Action: clicked the cancel button
10
- Action: clicked tab one
11
- Action: clicked the selectiontab
12
- Action: clicked the Help Window link
13
- Action: clicked the backone tab
14
- pageContainsText: Looking for: previous window (string) - found it ok
15
- Action: clicked the diagnostictab top link
16
- Action: clicked Ruby Version button.
17
- pageContainsText: Looking for: Version (string) - found it ok
18
- Action: clicked platform button.
19
- pageContainsText: Looking for: Platform is (string) - found it ok
20
- Action: clicked rwdtinker version button.
21
- pageContainsText: Looking for: rwdtinker version (string) - found it ok
22
- pageContainsText: Looking for: View the list (string) - found it ok
23
- Action: clicked the list files button.
24
- Action: clicked the View Install Text button.
25
- pageContainsText: Looking for: rwdviewlogo (string) - found it ok
26
- pageContainsText: Looking for: File Name (string) - found it ok
27
- pageContainsText: Looking for: view the list of zip files (string) - found it ok
28
- Action: clicked the List applets available for installing button.
29
-
30
- Finished in 32.716 seconds.
31
-
32
- 6 tests, 8 assertions, 0 failures, 0 errors