root/trunk/sumatra/Sumatra.todo

Revision 1, 3.8 KB (checked in by scottvlaminck, 4 years ago)

initial import

Line 
1
2SumatraTestCase:
3
4- TODO: consider changing the js interface
5        - js.functionName(args) ... from: f('functionName')(args)
6        - js.objectInstanceName ... from: getJsObject('objectInstanceName')
7        - js.exec(string) ... from: execJs(string)
8        - js.use { functionName(args); }
9
10
11Plugin:
12       
13- cleanup TestJs.groovy
14        - lots of copy-paste from TestApp.groovy
15                - replace with something like "def remove = GroovySystem.metaClassRegistry.&removeMetaClass; remove(Component);"
16        - override "test-app" target??
17                - add in rhino unit tests to be run
18               
19
20Docs TODO:
21
22- simple example (conference.js with ConferenceTest.groovy):
23        - Discuss
24                - show / discuss js file
25                - show / discuss setUp and load()
26                - show testConferenceObjectAndMethods()
27                        - discuss js builder / create object
28                - call object method
29                - call stand-alone function
30
31- simple browser example
32        - Discuss each test
33               
34- prototype
35        - Discuss each test
36
37- grails plugin
38        - Code
39                - use:
40                        - library('jsFileNameWithoutExtension')
41                        - library('jsFileName.js')
42                        - library('dirName/jsFileNameWithoutExtension')
43                        - library('dirName/jsFileName.js')
44               
45        - Discuss
46                - create-rhino-test
47                - do simple test (similar to simple comparator example)
48                - grails test-rhino
49                - create-rhino-test -browser
50                - create-rhino-test -prototype
51       
52- interactive
53        - Discuss
54
55- load html / gsp / jsp
56        - do simple test (similar to simple comparator example)
57
58- about Sumatra
59
60- how it works
61        - SumatraTestCase.groovy
62        - Rhino.groovy
63        - RhinoJsBuilder.groovy
64        - RhinoJsWrapper.groovy
65
66- FAQs
67        - debugging js:
68                - java.lang.System.out.println('here I am')
69        - stack trace line numbers
70                - seem messed up
71
72
73General:
74
75- unit tests for all groovy code
76
77- add logging support to SumatraTestCase and RhinoJsWrapper (and others)
78
79
80browser.js:
81
82- handle events
83        - window.onLoad(), etc
84                - will support Event.observe()
85
86
87SumatraTestCase:
88
89- mixins: "prototype.*" and "browser.*" so the developer can just call "'$'('el')"
90        - as now, but without extra methods in SumatraTestCase
91
92       
93Middle-Term:   
94
95- RhinoJsWrapper
96        - invokeMethod() line 36: pull js interaction into rhino.callMethod() ... from ScriptableObject.callMethod()
97        - invokeMethod() line 31: pull js interaction into rhino ... from wrapped.call() ... rhino.call()??
98        - retrieveTheWrappedObject() is no longer necessary? ... replace internally with .wrapped
99
100- Plugin targets:
101        - create-rhino-test
102                -  args -browser or -prototype (similar to -unit -integration)
103
104- allow Rhino.load() to accept arbitrary file types
105        - if .js, do normal
106        - if .html, load js within <script></script> elements in head
107                - consider loading js within <script></script> elements in body ... or take a boolean flag
108                - consider creating stub elements for all html elements
109        - else
110                - consider treating as html-type (e.g. gsp, jsp, rhtml)
111                        - but you could end up with weird results, since there's no server processing
112
113- downloads
114        - bin (consider impact of a single jar ... classpath for finding browser.js, etc)
115        - source with examples and binary
116
117- javascript interface
118        - More complete builder support
119                - Set attributes by passing params to builder method
120                - ConferenceTest with nested elements
121        - Figure out how to get rid of this hack: prototype.js: 2505:  // Prototype.BrowserFeatures.ElementExtensions = false
122
123
124Future:
125
126SumatraTestCase
127        - Ability to choose which browser(s) to simulate
128                - static browser = 'Firefox'
129                - static browser = 'Firefox', 'IE6', 'IE7'
130                - or ... withBrowser('IE6', 'IE7', 'Firefox') {}
131
132- Plugin
133        - add js library support for: 
134                - view('StoryList') ... or should it be html('StoryList.html')
135                        - relative to web-app
136        - add js library support for: 
137                - consider:
138                        - view(controller:story, view:'list')
139                                - load file grails-app/views/story/list.gsp
140                        - view('StoryList') ... or should it be html('StoryList.gsp')
141                                - relative to web-app
142
143
Note: See TracBrowser for help on using the browser.