symbiont 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. data/Gemfile.lock +1 -1
  2. data/HISTORY.md +6 -0
  3. data/app/app.rb +48 -0
  4. data/app/public/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png +0 -0
  5. data/app/public/css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png +0 -0
  6. data/app/public/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
  7. data/app/public/css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png +0 -0
  8. data/app/public/css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
  9. data/app/public/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png +0 -0
  10. data/app/public/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png +0 -0
  11. data/app/public/css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png +0 -0
  12. data/app/public/css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
  13. data/app/public/css/cupertino/images/ui-icons_2694e8_256x240.png +0 -0
  14. data/app/public/css/cupertino/images/ui-icons_2e83ff_256x240.png +0 -0
  15. data/app/public/css/cupertino/images/ui-icons_3d80b3_256x240.png +0 -0
  16. data/app/public/css/cupertino/images/ui-icons_72a7cf_256x240.png +0 -0
  17. data/app/public/css/cupertino/images/ui-icons_ffffff_256x240.png +0 -0
  18. data/app/public/css/cupertino/jquery-ui-1.8.16.custom.css +290 -0
  19. data/app/public/css/demo_table_jui.css +471 -0
  20. data/app/public/css/font/ColabLig-webfont.eot +0 -0
  21. data/app/public/css/font/ColabLig-webfont.svg +149 -0
  22. data/app/public/css/font/ColabLig-webfont.ttf +0 -0
  23. data/app/public/css/font/ColabLig-webfont.woff +0 -0
  24. data/app/public/css/font/ColabMed-webfont.eot +0 -0
  25. data/app/public/css/font/ColabMed-webfont.svg +149 -0
  26. data/app/public/css/font/ColabMed-webfont.ttf +0 -0
  27. data/app/public/css/font/ColabMed-webfont.woff +0 -0
  28. data/app/public/css/font/ColabReg-webfont.eot +0 -0
  29. data/app/public/css/font/ColabReg-webfont.svg +149 -0
  30. data/app/public/css/font/ColabReg-webfont.ttf +0 -0
  31. data/app/public/css/font/ColabReg-webfont.woff +0 -0
  32. data/app/public/css/font/ColabThi-webfont.eot +0 -0
  33. data/app/public/css/font/ColabThi-webfont.svg +149 -0
  34. data/app/public/css/font/ColabThi-webfont.ttf +0 -0
  35. data/app/public/css/font/ColabThi-webfont.woff +0 -0
  36. data/app/public/css/normalize.css +376 -0
  37. data/app/public/css/site.css +430 -0
  38. data/app/public/fancybox/blank.gif +0 -0
  39. data/app/public/fancybox/fancy_close.png +0 -0
  40. data/app/public/fancybox/fancy_loading.png +0 -0
  41. data/app/public/fancybox/fancy_nav_left.png +0 -0
  42. data/app/public/fancybox/fancy_nav_right.png +0 -0
  43. data/app/public/fancybox/fancy_shadow_e.png +0 -0
  44. data/app/public/fancybox/fancy_shadow_n.png +0 -0
  45. data/app/public/fancybox/fancy_shadow_ne.png +0 -0
  46. data/app/public/fancybox/fancy_shadow_nw.png +0 -0
  47. data/app/public/fancybox/fancy_shadow_s.png +0 -0
  48. data/app/public/fancybox/fancy_shadow_se.png +0 -0
  49. data/app/public/fancybox/fancy_shadow_sw.png +0 -0
  50. data/app/public/fancybox/fancy_shadow_w.png +0 -0
  51. data/app/public/fancybox/fancy_title_left.png +0 -0
  52. data/app/public/fancybox/fancy_title_main.png +0 -0
  53. data/app/public/fancybox/fancy_title_over.png +0 -0
  54. data/app/public/fancybox/fancy_title_right.png +0 -0
  55. data/app/public/fancybox/fancybox-x.png +0 -0
  56. data/app/public/fancybox/fancybox-y.png +0 -0
  57. data/app/public/fancybox/fancybox.png +0 -0
  58. data/app/public/fancybox/jquery.fancybox-1.3.4.css +359 -0
  59. data/app/public/fancybox/jquery.fancybox-1.3.4.js +1156 -0
  60. data/app/public/fancybox/jquery.fancybox-1.3.4.min.js +1 -0
  61. data/app/public/img/Sorting icons.psd +0 -0
  62. data/app/public/img/back_disabled.png +0 -0
  63. data/app/public/img/back_enabled.png +0 -0
  64. data/app/public/img/back_enabled_hover.png +0 -0
  65. data/app/public/img/close.png +0 -0
  66. data/app/public/img/favicon.ico +0 -0
  67. data/app/public/img/forward_disabled.png +0 -0
  68. data/app/public/img/forward_enabled.png +0 -0
  69. data/app/public/img/forward_enabled_hover.png +0 -0
  70. data/app/public/img/lucid-bg.png +0 -0
  71. data/app/public/img/lucid-ft.png +0 -0
  72. data/app/public/img/open.png +0 -0
  73. data/app/public/img/sort_asc.png +0 -0
  74. data/app/public/img/sort_asc_disabled.png +0 -0
  75. data/app/public/img/sort_both.png +0 -0
  76. data/app/public/img/sort_desc.png +0 -0
  77. data/app/public/img/sort_desc_disabled.png +0 -0
  78. data/app/public/js/comics.js +11 -0
  79. data/app/public/js/signup.js +141 -0
  80. data/app/public/js/site.js +40 -0
  81. data/app/public/js/stardate.js +35 -0
  82. data/app/public/js/vendor/html5shiv.js +5 -0
  83. data/app/public/js/vendor/jquery-1.8.3.min.js +2 -0
  84. data/app/public/js/vendor/jquery.dataTables.min.js +151 -0
  85. data/app/public/js/vendor/jquery.validate.min.js +4 -0
  86. data/app/views/comics.erb +322 -0
  87. data/app/views/index.erb +7 -0
  88. data/app/views/layout.erb +72 -0
  89. data/app/views/layout_small.erb +21 -0
  90. data/app/views/stardate.erb +5 -0
  91. data/app/views/stardate_calc.erb +30 -0
  92. data/app/views/webobject.erb +147 -0
  93. data/lib/symbiont/enclosers.rb +18 -2
  94. data/lib/symbiont/evaluators.rb +1 -4
  95. data/lib/symbiont/generators.rb +22 -56
  96. data/lib/symbiont/locators.rb +10 -10
  97. data/lib/symbiont/platform_watir/platform_object.rb +28 -52
  98. data/lib/symbiont/platform_watir.rb +2 -11
  99. data/lib/symbiont/platforms.rb +8 -20
  100. data/lib/symbiont/version.rb +1 -1
  101. data/lib/symbiont/web_objects/_common.rb +110 -32
  102. data/lib/symbiont/web_objects/button.rb +2 -15
  103. data/lib/symbiont/web_objects/checkbox.rb +11 -17
  104. data/lib/symbiont/web_objects/div.rb +1 -5
  105. data/lib/symbiont/web_objects/link.rb +3 -20
  106. data/lib/symbiont/web_objects/radio.rb +10 -16
  107. data/lib/symbiont/web_objects/select_list.rb +60 -15
  108. data/lib/symbiont/web_objects/span.rb +1 -5
  109. data/lib/symbiont/web_objects/table.rb +22 -12
  110. data/lib/symbiont/web_objects/table_cell.rb +2 -6
  111. data/lib/symbiont/web_objects/table_row.rb +24 -13
  112. data/lib/symbiont/web_objects/text_field.rb +10 -19
  113. data/lib/symbiont/web_objects.rb +2 -2
  114. data/lib/symbiont.rb +13 -3
  115. data/spec/spec_helper.rb +1 -0
  116. data/spec/symbiont/enclosers_spec.rb +3 -0
  117. data/spec/symbiont/evaluators_spec.rb +5 -0
  118. data/spec/symbiont/generators/button_generators_spec.rb +1 -1
  119. data/spec/symbiont/generators/cell_generators_spec.rb +1 -1
  120. data/spec/symbiont/generators/checkbox_generators_spec.rb +1 -1
  121. data/spec/symbiont/generators/div_generators_spec.rb +2 -2
  122. data/spec/symbiont/generators/link_generators_spec.rb +1 -1
  123. data/spec/symbiont/generators/paragraph_generators_spec.rb +52 -0
  124. data/spec/symbiont/generators/radio_generators_spec.rb +1 -2
  125. data/spec/symbiont/generators/select_list_generators_spec.rb +3 -3
  126. data/spec/symbiont/generators/span_generators_spec.rb +1 -1
  127. data/spec/symbiont/generators/table_generators_spec.rb +8 -1
  128. data/spec/symbiont/generators/text_field_generators_spec.rb +1 -1
  129. data/spec/symbiont/symbiont_spec.rb +10 -0
  130. data/spec/symbiont/web_object_spec.rb +71 -10
  131. data/spec/symbiont/web_objects/paragraph_spec.rb +11 -0
  132. data/spec/symbiont/web_objects/radio_spec.rb +17 -1
  133. data/spec/symbiont/web_objects/table_cell_spec.rb +6 -0
  134. data/spec/symbiont/web_objects/table_row_spec.rb +20 -10
  135. metadata +94 -20
  136. data/lib/symbiont/platform_selenium/platform_object.rb +0 -236
  137. data/lib/symbiont/platform_selenium/web_objects/button.rb +0 -13
  138. data/lib/symbiont/platform_selenium/web_objects/checkbox.rb +0 -21
  139. data/lib/symbiont/platform_selenium/web_objects/common.rb +0 -104
  140. data/lib/symbiont/platform_selenium/web_objects/link.rb +0 -13
  141. data/lib/symbiont/platform_selenium/web_objects/radio.rb +0 -21
  142. data/lib/symbiont/platform_selenium/web_objects/select_list.rb +0 -79
  143. data/lib/symbiont/platform_selenium/web_objects/table.rb +0 -40
  144. data/lib/symbiont/platform_selenium/web_objects/table_row.rb +0 -36
  145. data/lib/symbiont/platform_selenium/web_objects/text_field.rb +0 -14
  146. data/lib/symbiont/platform_selenium.rb +0 -18
  147. data/lib/symbiont/platform_watir/web_objects/checkbox.rb +0 -21
  148. data/lib/symbiont/platform_watir/web_objects/common.rb +0 -82
  149. data/lib/symbiont/platform_watir/web_objects/radio.rb +0 -21
  150. data/lib/symbiont/platform_watir/web_objects/select_list.rb +0 -67
  151. data/lib/symbiont/platform_watir/web_objects/table.rb +0 -31
  152. data/lib/symbiont/platform_watir/web_objects/table_row.rb +0 -31
  153. data/lib/symbiont/platform_watir/web_objects/text_field.rb +0 -13
@@ -0,0 +1,322 @@
1
+ <section>
2
+
3
+ <table id="comic-grid" class="display">
4
+ <thead>
5
+ <tr>
6
+ <th>Name</th>
7
+ <th>Identity</th>
8
+ <th>Affiliation</th>
9
+ <th>First Appearance</th>
10
+ <th>Date</th>
11
+ <th>Publisher</th>
12
+ </tr>
13
+ </thead>
14
+ <tbody>
15
+ <tr>
16
+ <td>Scarecrow</td>
17
+ <td>Jonathan Crane</td>
18
+ <td>Villain</td>
19
+ <td>World's Finest Comics #003</td>
20
+ <td>1941 Fall</td>
21
+ <td>DC</td>
22
+ </tr>
23
+ <tr>
24
+ <td>Moon Knight</td>
25
+ <td>Marc Spector</td>
26
+ <td>Hero</td>
27
+ <td>Werewolf by Night #032</td>
28
+ <td>1975 August</td>
29
+ <td>Marvel</td>
30
+ </tr>
31
+ <tr>
32
+ <td>Doctor Strange</td>
33
+ <td>Stephen Vincent Strange</td>
34
+ <td>Hero</td>
35
+ <td>Strange Tales #110</td>
36
+ <td>1963 July</td>
37
+ <td>Marvel</td>
38
+ </tr>
39
+ <tr>
40
+ <td>Parallax</td>
41
+ <td>Hal Jordan</td>
42
+ <td>Villain</td>
43
+ <td>Green Lantern v3 #050</td>
44
+ <td>1994 March</td>
45
+ <td>DC</td>
46
+ </tr>
47
+ <tr>
48
+ <td>Two-Face</td>
49
+ <td>Harvey Dent</td>
50
+ <td>Villain</td>
51
+ <td>Detective Comics #066</td>
52
+ <td>1942 August</td>
53
+ <td>DC</td>
54
+ </tr>
55
+ <tr>
56
+ <td>Nightcrawler</td>
57
+ <td>Kurt Wagner</td>
58
+ <td>Hero</td>
59
+ <td>Giant-Size X-Men #001</td>
60
+ <td>1975 May</td>
61
+ <td>Marvel</td>
62
+ </tr>
63
+ <tr>
64
+ <td>She-Hulk</td>
65
+ <td>Jennifer Walters</td>
66
+ <td>Hero</td>
67
+ <td>Savage She-Hulk #001</td>
68
+ <td>1980 February</td>
69
+ <td>Marvel</td>
70
+ </tr>
71
+ <tr>
72
+ <td>Catwoman</td>
73
+ <td>Selina Kyle</td>
74
+ <td>Villain</td>
75
+ <td>Batman #001</td>
76
+ <td>1940 Spring</td>
77
+ <td>DC</td>
78
+ </tr>
79
+ <tr>
80
+ <td>Man-Thing</td>
81
+ <td>Theodore "Ted" Sallis</td>
82
+ <td>Hero</td>
83
+ <td>Savage Tales #001</td>
84
+ <td>1971 May</td>
85
+ <td>Marvel</td>
86
+ </tr>
87
+ <tr>
88
+ <td>Orpheus</td>
89
+ <td>Gavin King</td>
90
+ <td>Hero</td>
91
+ <td>Batman: Orpheus Rising #001</td>
92
+ <td>2001 October</td>
93
+ <td>DC</td>
94
+ </tr>
95
+ <tr>
96
+ <td>Darkhawk</td>
97
+ <td>Christopher "Chris" Powell</td>
98
+ <td>Hero</td>
99
+ <td>Darkhawk #001</td>
100
+ <td>1991 March</td>
101
+ <td>Marvel</td>
102
+ </tr>
103
+ <tr>
104
+ <td>Scorch</td>
105
+ <td>Aubrey Sparks</td>
106
+ <td>Villain</td>
107
+ <td>Superman v2 #160</td>
108
+ <td>2000 September</td>
109
+ <td>DC</td>
110
+ </tr>
111
+ <tr>
112
+ <td>Black Knight</td>
113
+ <td>Dane Whitman</td>
114
+ <td>Hero</td>
115
+ <td>Avengers #047</td>
116
+ <td>1967 December</td>
117
+ <td>Marvel</td>
118
+ </tr>
119
+ <tr>
120
+ <td>Quicksilver</td>
121
+ <td>Pietro Maximoff</td>
122
+ <td>Hero</td>
123
+ <td>X-Men #004</td>
124
+ <td>1964 March</td>
125
+ <td>Marvel</td>
126
+ </tr>
127
+ <tr>
128
+ <td>Menace</td>
129
+ <td>Lily Hollister</td>
130
+ <td>Villain</td>
131
+ <td>The Amazing Spider-Man #549</td>
132
+ <td>2008 January</td>
133
+ <td>Marvel</td>
134
+ </tr>
135
+ <tr>
136
+ <td>Anarky</td>
137
+ <td>Lonnie Machin</td>
138
+ <td>Villian</td>
139
+ <td>Detective Comics #608</td>
140
+ <td>1989 November</td>
141
+ <td>DC</td>
142
+ </tr>
143
+ <tr>
144
+ <td>Black Cat</td>
145
+ <td>Felicia Hardy</td>
146
+ <td>Hero</td>
147
+ <td>The Amazing Spider-Man #194</td>
148
+ <td>1979 July</td>
149
+ <td>Marvel</td>
150
+ </tr>
151
+ <tr>
152
+ <td>The Hulk</td>
153
+ <td>Robert Bruce Banner</td>
154
+ <td>Hero</td>
155
+ <td>The Incredible Hulk #001</td>
156
+ <td>1962 May</td>
157
+ <td>Marvel</td>
158
+ </tr>
159
+ <tr>
160
+ <td>Darkseid</td>
161
+ <td>Uxas</td>
162
+ <td>Villain</td>
163
+ <td>Forever People #001</td>
164
+ <td>1971 February</td>
165
+ <td>DC</td>
166
+ </tr>
167
+ <tr>
168
+ <td>Doctor Doom</td>
169
+ <td>Victor von Doom</td>
170
+ <td>Villain</td>
171
+ <td>Fantastic Four #005</td>
172
+ <td>1962 July</td>
173
+ <td>Marvel</td>
174
+ </tr>
175
+ <tr>
176
+ <td>Brainiac</td>
177
+ <td>Vril Dox</td>
178
+ <td>Villain</td>
179
+ <td>Action Comics #242</td>
180
+ <td>1958 July</td>
181
+ <td>DC</td>
182
+ </tr>
183
+ <tr>
184
+ <td>Vandal Savage</td>
185
+ <td>Vandar Adg</td>
186
+ <td>Villain</td>
187
+ <td>Green Lantern v1 #010</td>
188
+ <td>1943 Winter</td>
189
+ <td>DC</td>
190
+ </tr>
191
+ <tr>
192
+ <td>Superman</td>
193
+ <td>Clark Kent</td>
194
+ <td>Hero</td>
195
+ <td>Action Comics #001</td>
196
+ <td>1938 April</td>
197
+ <td>DC</td>
198
+ </tr>
199
+ <tr>
200
+ <td>Batman</td>
201
+ <td>Bruce Wayne</td>
202
+ <td>Hero</td>
203
+ <td>Detective Comics #027</td>
204
+ <td>1939 May</td>
205
+ <td>DC</td>
206
+ </tr>
207
+ <tr>
208
+ <td>Doctor Octopus</td>
209
+ <td>Otto Gunther Octavius</td>
210
+ <td>Villain</td>
211
+ <td>The Amazing Spider-Man #003</td>
212
+ <td>1963 July</td>
213
+ <td>Marvel</td>
214
+ </tr>
215
+ <tr>
216
+ <td>Harley Quinn</td>
217
+ <td>Harleen Quinzel</td>
218
+ <td>Villain</td>
219
+ <td>The Batman Adventures #012</td>
220
+ <td>1993 September</td>
221
+ <td>DC</td>
222
+ </tr>
223
+ <tr>
224
+ <td>Mystique</td>
225
+ <td>Raven Darkhölme</td>
226
+ <td>Villain</td>
227
+ <td>Ms. Marvel #017</td>
228
+ <td>1978 June</td>
229
+ <td>Marvel</td>
230
+ </tr>
231
+ <tr>
232
+ <td>Valkyrie</td>
233
+ <td>Brunnhilde</td>
234
+ <td>Hero</td>
235
+ <td>Avengers v1 #083</td>
236
+ <td>1979 December</td>
237
+ <td>Marvel</td>
238
+ </tr>
239
+ <tr>
240
+ <td>Graviton</td>
241
+ <td>Franklin Hall</td>
242
+ <td>Villain</td>
243
+ <td>Avengers #158</td>
244
+ <td>1977 April</td>
245
+ <td>Marvel</td>
246
+ </tr>
247
+ <tr>
248
+ <td>Spider-Man</td>
249
+ <td>Peter Parker</td>
250
+ <td>Hero</td>
251
+ <td>Amazing Fantasy #015</td>
252
+ <td>1962 August</td>
253
+ <td>Marvel</td>
254
+ </tr>
255
+ <tr>
256
+ <td>Wasp</td>
257
+ <td>Janet van Dyne</td>
258
+ <td>Hero</td>
259
+ <td>Tales to Astonish #044</td>
260
+ <td>1963 June</td>
261
+ <td>Marvel</td>
262
+ </tr>
263
+ <tr>
264
+ <td>Anomaly</td>
265
+ <td>Floyd Barstow</td>
266
+ <td>Villain</td>
267
+ <td>Adventures of Superman #539</td>
268
+ <td>1996 October</td>
269
+ <td>DC</td>
270
+ </tr>
271
+ <tr>
272
+ <td>Fatality</td>
273
+ <td>Yrra Cynril</td>
274
+ <td>Villain</td>
275
+ <td>Green Lantern v3 #083</td>
276
+ <td>1997 February</td>
277
+ <td>DC</td>
278
+ </tr>
279
+ <tr>
280
+ <td>Apocalypse</td>
281
+ <td>En Sabah Nur</td>
282
+ <td>Villain</td>
283
+ <td>X-Factor #006</td>
284
+ <td>1986 July</td>
285
+ <td>Marvel</td>
286
+ </tr>
287
+ <tr>
288
+ <td>Carnage</td>
289
+ <td>Cletus Kasady</td>
290
+ <td>Villain</td>
291
+ <td>The Amazing Spider-Man #360</td>
292
+ <td>1992 March</td>
293
+ <td>Marvel</td>
294
+ </tr>
295
+ <tr>
296
+ <td>Venom</td>
297
+ <td>Eddie Brock</td>
298
+ <td>Villain</td>
299
+ <td>The Amazing Spider-Man #299</td>
300
+ <td>1988 April</td>
301
+ <td>Marvel</td>
302
+ </tr>
303
+ <tr>
304
+ <td>Neutron</td>
305
+ <td>Nathaniel Tryon</td>
306
+ <td>Villain</td>
307
+ <td>Action Comics #525</td>
308
+ <td>1981 November</td>
309
+ <td>DC</td>
310
+ </tr>
311
+ <tr>
312
+ <td>Bane</td>
313
+ <td>Dorrance</td>
314
+ <td>Villain</td>
315
+ <td>Batman: Vengeance of Bane #001</td>
316
+ <td>1993 January</td>
317
+ <td>DC</td>
318
+ </tr>
319
+ </tbody>
320
+ </table>
321
+
322
+ </section>
@@ -0,0 +1,7 @@
1
+
2
+ <h1>Symbiote</h1>
3
+ <h2>A Test App for Symbiont</h2>
4
+
5
+ <h3>Purpose</h3>
6
+ <p id="purpose">This is a <em>test application</em> for the <strong>Symbiont</strong> framework.</p>
7
+
@@ -0,0 +1,72 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
+ <title><%= @title + ' | Symbiote' %></title>
7
+ <meta name="viewport" content="width=device-width">
8
+ <link rel="stylesheet" href="css/normalize.css">
9
+ <link rel="stylesheet" href="css/cupertino/jquery-ui-1.8.16.custom.css"/>
10
+ <link rel="stylesheet" href="css/demo_table_jui.css"/>
11
+ <link rel="stylesheet" href="css/demo_table_jui.css"/>
12
+ <link rel="stylesheet" href="fancybox/jquery.fancybox-1.3.4.css">
13
+ <link rel="stylesheet" href="css/site.css">
14
+ <!--if lt IE 9]>
15
+ <script src="js/vendor/html5shiv.js"></script>
16
+ <![endif]-->
17
+ </head>
18
+ <body>
19
+ <!--[if lt IE 7]>
20
+ <p class="chromeframe">You are using an extremely <strong>outdated</strong> browser and you should be ashamed of yourself. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
21
+ <![endif]-->
22
+
23
+ <div id="login">
24
+ <p id="open">Login</p>
25
+ <form>
26
+ <p>
27
+ <label for="username">Username: </label>
28
+ <input type="text" name="username" id="username">
29
+ </p>
30
+ <p>
31
+ <label for="password">Password: </label>
32
+ <input type="text" name="password" id="password">
33
+ </p>
34
+ <p>
35
+ <input type="submit" name="button" id="button" value="Submit" >
36
+ </p>
37
+ </form>
38
+ </div>
39
+
40
+ <header>
41
+ <h1 class="logo">Symbiote <em class="subtitle">Symbiont<br />Testing<br />App</em></h1>
42
+ </header>
43
+
44
+ <article>
45
+ <%= yield %>
46
+ </article>
47
+
48
+ <footer>
49
+ <p>Symbiote - Symbiont Testing App, by <a href="http://testerstories.com/" id="blog">Jeff Nyman</a>. For use with <a href="https://github.com/jnyman/symbiont" id="app">Symbiont</a>.</p>
50
+ </footer>
51
+
52
+ <div id="areas">
53
+ <p id="navlist" class="open">+</p>
54
+ <h2>Pages</h2>
55
+ <ul class="nav">
56
+ <li><a href="/" id="home">Home</a></li>
57
+ <li><a href="webobject" id="webobject">Fun with Web Objects</a></li>
58
+ <li><a href="comics" id="comics">Comic Character Table</a></li>
59
+ <li><a href="stardate" id="stardate">Stardate Calculator</a></li>
60
+ </ul>
61
+ </div>
62
+
63
+ <script src="js/vendor/jquery-1.8.3.min.js"></script>
64
+ <script src="js/vendor/jquery.validate.min.js"></script>
65
+ <script src="js/vendor/jquery.dataTables.min.js"></script>
66
+ <script src="fancybox/jquery.fancybox-1.3.4.min.js"></script>
67
+ <script src="js/site.js"></script>
68
+ <script src="js/signup.js"></script>
69
+ <script src="js/comics.js"></script>
70
+ <script src="js/stardate.js"></script>
71
+ </body>
72
+ </html>
@@ -0,0 +1,21 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
+ <title>Symbiote</title>
7
+ <meta name="viewport" content="width=device-width">
8
+ <link rel="stylesheet" href="css/normalize.css">
9
+ <link rel="stylesheet" href="css/site.css">
10
+ </head>
11
+ <body>
12
+
13
+ <article>
14
+ <%= yield %>
15
+ </article>
16
+
17
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
18
+ <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.3.min.js"><\/script>')</script>
19
+ <script src="js/stardate.js"></script>
20
+ </body>
21
+ </html>
@@ -0,0 +1,5 @@
1
+ <section>
2
+
3
+ <a href="stardate_calc" class="iframe" title="Stardate Calculator">Stardate Calculator</a>
4
+
5
+ </section>
@@ -0,0 +1,30 @@
1
+ <section>
2
+
3
+ <form id="computeTNGStardate" name="computeTNGStardate">
4
+ <fieldset>
5
+ <legend>Stardate (New Era) Calculator</legend>
6
+ <p>Enter five digit stardate:</p>
7
+ <input name="stardateTNGValue" size="15" type="text" value="42353.7">
8
+ <input id="convertTNG" type="button" value="Convert">
9
+ <br/><br/>
10
+ <input name="calendarTNGValue" size="70" type="text">
11
+ </fieldset>
12
+ </form>
13
+
14
+ <form id="computeTOSStardate" name="computeTOSStardate">
15
+ <fieldset>
16
+ <legend>Stardate (Old Era) Calculator</legend>
17
+ <p>Enter four digit stardate:</p>
18
+ <input name="stardateTOSValue" size="15" type="text" value="1533.7">
19
+ <input id="convertTOS" type="button" value="Convert">
20
+ <br/><br/>
21
+ <input name="calendarTOSValue" size="70" type="text">
22
+ </fieldset>
23
+ </form>
24
+
25
+ <input id="tngAlert" type="button" value="TNG Value">
26
+ <input id="tosAlert" type="button" value="TOS Value">
27
+ <input id="sdConfirm" type="button" onclick="this.value = confirm('Is the calculator accurate?')" value="Accurate?">
28
+ <input id="sdPrompt" type="button" onclick='this.value = prompt("Favorite Episode", "All Good Things")' value="Favorite?">
29
+
30
+ </section>
@@ -0,0 +1,147 @@
1
+ <section>
2
+
3
+ <h1>Web Objects</h1>
4
+
5
+ <h2 class="expander">Selector Test</h2>
6
+ <div class="expanded">
7
+ <form name="form1" method="post" action="">
8
+ <div class="results">
9
+ <p>
10
+ <label><strong>Selector:</strong>
11
+ <input type="text" name="selector" id="selector">
12
+ </label>
13
+ <input type="button" name="apply" id="apply" value="Apply">
14
+ <input type="reset" name="resetPage" id="resetPage" value="Reset">
15
+ </p>
16
+ <p><strong>Selector: </strong>$('<span id="jquerySelector">&nbsp;&nbsp;</span>')</p>
17
+ <p><strong>Elements Found:</strong> <span id="numElems"></span></p>
18
+ </div>
19
+ </form>
20
+ </div>
21
+
22
+ <form action="#" method="post" name="signup" id="signup">
23
+ <div>
24
+ <label for="name" class="label">Name</label>
25
+ <input name="name" type="text" class="required" id="name" title="Please type your name.">
26
+ </div>
27
+ <div>
28
+ <label for="email" class="label">E-mail Address</label>
29
+ <input name="email" type="text" id="email">
30
+ </div>
31
+ <div>
32
+ <label for="dob" class="label">Date of Birth</label>
33
+ <input name="dob" type="text" id="dob" class="date" title="Please type your date of birth using this format: 01/19/2000"></input>
34
+ </div>
35
+ <div>
36
+ <label for="password" class="label">Password</label>
37
+ <input name="password" type="password" id="password">
38
+ </div>
39
+ <div>
40
+ <label for="confirm_password" class="label">Confirm Password</label>
41
+ <input name="confirm_password" type="password" id="confirm_password">
42
+ </div>
43
+
44
+ <fieldset>
45
+ <legend>Select Seemingly Meaningless Choices</legend>
46
+ <div class="labelBlock">What Technology Would You Go To Battle With?</div>
47
+ <div class="indent">
48
+ <input type="checkbox" name="camoArmor" id="camoArmor" value="camoArmor" class="required" title="Please check at least one technology." />
49
+ <label for="camoArmor" class="colorLabel">Chameleoflage Armor</label>
50
+ <br />
51
+ <input type="checkbox" name="neuralShunt" id="neuralShunt" value="neuralShunt" />
52
+ <label for="neuralShunt" class="colorLabel">Neural Shunts</label>
53
+ <br />
54
+ <input type="checkbox" name="kineticHarpoon" id="kineticHarpoon" value="kineticHarpoon" />
55
+ <label for="kineticHarpoon" class="colorLabel">Kinetic Harpoons</label>
56
+ <br />
57
+ <input type="checkbox" name="organicCircuitry" id="organicCircuitry" value="organicCircuitry" />
58
+ <label for="organicCircuitry" class="colorLabel">Organic Circuitry</label>
59
+ <br />
60
+ <input type="checkbox" name="eigenstate" id="eigenstate" value="eigenstate" disabled="disabled" />
61
+ <label for="eigenstate" class="colorLabel">Preferential Eigenstate Selector</label> (Initially Disabled)
62
+ <p><input id="toggleAllTech" name="toggleAllTech" type="checkbox"> Enable Disabled Choices</input></p>
63
+ </div>
64
+
65
+ <div class="labelBlock">Select Your Least Favorite Way To Vaporize:</div>
66
+ <div class="indent">
67
+ <input type="radio" id="mtc" name="vaporize" value="mtc" class="required" title="Please select one option." />
68
+ <label for="mtc" class="colorLabel">Multiphasic Temporal Convergence</label>
69
+ <br />
70
+ <input type="radio" id="ups" name="vaporize" value="ups"></input>
71
+ <label for="ups" class="colorLabel">Unstable Dimensional Phase Shift</label>
72
+ <br />
73
+ <input type="radio" id="wcb" name="vaporize" value="wcb" />
74
+ <label for="wcb" class="colorLabel">Warp Core Breach</label>
75
+ <br />
76
+ <input type="radio" id="cme" name="vaporize" value="cme" disabled="disabled" />
77
+ <label for="cme" class="colorLabel">Coronal Mass Ejection</label> (Initially Disabled)
78
+ <p><input id="toggleAllVapo" name="toggleAllVapo" type="checkbox"> Enable Disabled Choices</input></p>
79
+ </div>
80
+
81
+ <div class="labelBlock">Select Your Most Favorite Sith Power:</div>
82
+ <div class="indent">
83
+ <select id="sith" name="sith" disabled="disabled" title="Choose a Sith Power">
84
+ <option value="">--Please Select One--</option>
85
+ <option value="force lightning">Force Lightning</option>
86
+ <option value="sundering assault">Sundering Assault</option>
87
+ <option value="vicious slash">Vicious Slash</option>
88
+ <option value="withering decapitation">Withering Decapitation</option>
89
+ </select>
90
+
91
+ <p><input id="toggleSith" name="toggleSith" type="checkbox"> Enable the Sith Power Select List</input></p>
92
+ </div>
93
+
94
+ <div class="labelBlock">Select Your Areas of Expertise:</div>
95
+ <div class="indent">
96
+ <select id="physics" name="physics" multiple="multiple" class="required" title="Choose areas of expertise.">
97
+ <option value="qe">Quantum Entanglement</option>
98
+ <option value="ta">Tachyonic Antitravel</option>
99
+ <option value="bec">Bose-Einstein Condensates</option>
100
+ <option value="awm">Alcubierre Warp Metrics</option>
101
+ <option value="kt">Krasnikov Tubes</option>
102
+ <option value="ss">Supersymmetric Particle Theory</option>
103
+ <option value="lqg">Loop Quantum Gravity</option>
104
+ <option value="ngs">Noncommutative Geometric Spaces</option>
105
+ </select>
106
+ </div>
107
+ </fieldset>
108
+
109
+ <fieldset>
110
+ <legend>Tell Us What You Read</legend>
111
+ <div>
112
+ <label for="bookTitle" class="label">Book Title:</label>
113
+ <input name="bookTitle" id="bookTitle" size="40" type="text" title="Type your favorite book." />
114
+ </div>
115
+ <div>
116
+ <label for="bookAuthor" class="label">Book Author:</label>
117
+ <input name="bookAuthor" id="bookAuthor" size="40" type="text" title="Type the author of the book." />
118
+ </div>
119
+ <div>
120
+ <label for="bookSummary" class="label">Book Summary:</label>
121
+ <textarea name="bookSummary" id="bookSummary" cols="50" rows="5"></textarea>
122
+ </div>
123
+ <div>
124
+ <input id="bookISBN" size="40" type="hidden" value="0-85131-041-9" />
125
+ </div>
126
+ <div>
127
+ <label for="bookReference" class="label">Reference ID:</label>
128
+ <input name="bookReference" id="bookReference" readonly="readonly" size="40" style="background-color: #000000; color: yellow;" type="text" value="1123456:AF01" /> (Read Only)
129
+ </div>
130
+ <div>
131
+ <label id="bookPublisher" class="label">Publisher ID:</label>
132
+ <input name="bookPublisher" id="bookPublisher" disabled="disabled" size="40" type="text" value="ESC:001678:FNC" /> (Disabled)
133
+ </div>
134
+ </fieldset>
135
+
136
+ <div>
137
+ <input type="submit" name="submit" id="submit" value="Submit The Form"><br />
138
+
139
+ <input id="nostalgic" disabled="disabled" type="button" value="All Your Base Are Belong To Us">
140
+ <br />
141
+ <input id="alertButton" type="button" onclick="alert('Alert Message Received')" value="Alert">
142
+ <input id="confirmButton" type="button" onclick="this.value = confirm('Confirmation Message Received')" value="Confirm">
143
+ <input id="promptButton" type="button" onclick='this.value = prompt("Favorite Sith Lord", "Darth Bane")' value="Prompt">
144
+ </div>
145
+ </form>
146
+
147
+ </section>
@@ -14,7 +14,7 @@ module Symbiont
14
14
  # page.within_window(title: "Report Page")
15
15
  # page.within_window(url: report.html)
16
16
  def within_window(locator, &block)
17
- @platform.within_window(locator, &block)
17
+ platform.within_window(locator, &block)
18
18
  end
19
19
 
20
20
  # Used to identify a web object as existing within an enclosing object
@@ -37,7 +37,23 @@ module Symbiont
37
37
  encloser << locator
38
38
  block.call(encloser)
39
39
  end
40
-
40
+
41
+ # Used to identify a web object as existing within an enclosing object
42
+ # like a modal dialog box. What this does is override the normal call to
43
+ # showModalDialog and opens a window instead. In order to use this new
44
+ # window, you have to attach to it.
45
+ def within_modal(&block)
46
+ convert_modal_to_window = %Q{
47
+ window.showModalDialog = function(sURL, vArguments, sFeatures) {
48
+ window.dialogArguments = vArguments;
49
+ modalWin = window.open(sURL, 'modal', sFeatures);
50
+ return modalWin;
51
+ }
52
+ }
53
+ @browser.execute_script(convert_modal_to_window)
54
+ yield if block_given?
55
+ end
56
+
41
57
  # Provides a context for an action that must succeed within a given time period.
42
58
  # The logic here is simply that the result of the action will be true (meaning
43
59
  # the action was carried out) or false, which means the action did not succeed
@@ -52,10 +52,7 @@ module Symbiont
52
52
  def wait_for_pending_requests(time_limit=30, message_if_timeout=nil)
53
53
  end_time = ::Time.now + time_limit
54
54
  until ::Time.now > end_time
55
- begin
56
- return if browser.execute_script('return jQuery.active') == 0
57
- rescue ReferenceError
58
- end
55
+ return if @browser.execute_script('return jQuery.active') == 0
59
56
  sleep 0.5
60
57
  end
61
58
  message = "Pending jQuery requests never indicated completion." unless message_if_timeout