sambal-cle 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. data/Gemfile +3 -5
  2. data/Gemfile.lock +6 -9
  3. data/lib/sambal-cle/base_page.rb +21 -3
  4. data/lib/sambal-cle/data_objects/announcement.rb +1 -1
  5. data/lib/sambal-cle/data_objects/assignment.rb +3 -2
  6. data/lib/sambal-cle/data_objects/course.rb +5 -4
  7. data/lib/sambal-cle/data_objects/event.rb +7 -7
  8. data/lib/sambal-cle/data_objects/forum.rb +3 -2
  9. data/lib/sambal-cle/data_objects/lesson.rb +3 -1
  10. data/lib/sambal-cle/data_objects/resource.rb +3 -1
  11. data/lib/sambal-cle/page_objects/account.rb +15 -66
  12. data/lib/sambal-cle/page_objects/aliases.rb +3 -2
  13. data/lib/sambal-cle/page_objects/announcements.rb +16 -31
  14. data/lib/sambal-cle/page_objects/assessments.rb +22 -55
  15. data/lib/sambal-cle/page_objects/assignments.rb +1 -1
  16. data/lib/sambal-cle/page_objects/blogger.rb +21 -77
  17. data/lib/sambal-cle/page_objects/blogs.rb +3 -5
  18. data/lib/sambal-cle/page_objects/calendar.rb +22 -40
  19. data/lib/sambal-cle/page_objects/chat_room.rb +2 -2
  20. data/lib/sambal-cle/page_objects/email_archive.rb +1 -2
  21. data/lib/sambal-cle/page_objects/evaluations.rb +78 -50
  22. data/lib/sambal-cle/page_objects/feedback.rb +1 -5
  23. data/lib/sambal-cle/page_objects/forms.rb +14 -55
  24. data/lib/sambal-cle/page_objects/forums.rb +11 -24
  25. data/lib/sambal-cle/page_objects/glossary.rb +6 -12
  26. data/lib/sambal-cle/page_objects/home.rb +7 -18
  27. data/lib/sambal-cle/page_objects/jforums.rb +60 -197
  28. data/lib/sambal-cle/page_objects/job_scheduler.rb +16 -49
  29. data/lib/sambal-cle/page_objects/lessons.rb +11 -34
  30. data/lib/sambal-cle/page_objects/matrix.rb +12 -14
  31. data/lib/sambal-cle/page_objects/messages.rb +71 -466
  32. data/lib/sambal-cle/page_objects/my_workspace.rb +3 -3
  33. data/lib/sambal-cle/page_objects/podcasts.rb +1 -6
  34. data/lib/sambal-cle/page_objects/polls.rb +5 -5
  35. data/lib/sambal-cle/page_objects/portfolio_templates.rb +16 -66
  36. data/lib/sambal-cle/page_objects/portfolios.rb +17 -67
  37. data/lib/sambal-cle/page_objects/profile.rb +5 -16
  38. data/lib/sambal-cle/page_objects/profile2.rb +51 -119
  39. data/lib/sambal-cle/page_objects/public_search.rb +6 -27
  40. data/lib/sambal-cle/page_objects/realms.rb +2 -2
  41. data/lib/sambal-cle/page_objects/resources.rb +89 -116
  42. data/lib/sambal-cle/page_objects/resources_roster.rb +1 -0
  43. data/lib/sambal-cle/page_objects/rosters.rb +3 -13
  44. data/lib/sambal-cle/page_objects/rwiki.rb +2 -6
  45. data/lib/sambal-cle/page_objects/search.rb +10 -10
  46. data/lib/sambal-cle/page_objects/sections.rb +40 -81
  47. data/lib/sambal-cle/page_objects/site_setup.rb +46 -74
  48. data/lib/sambal-cle/page_objects/sites.rb +24 -110
  49. data/lib/sambal-cle/page_objects/styles.rb +6 -51
  50. data/lib/sambal-cle/page_objects/syllabus.rb +12 -26
  51. data/lib/sambal-cle/page_objects/user_membership.rb +3 -15
  52. data/lib/sambal-cle/page_objects/users.rb +9 -25
  53. data/sambal-cle.gemspec +1 -1
  54. data/test/add_assignment_to_calendar_spec.rb +55 -1
  55. data/test/config.yml +1 -1
  56. data/test/duplicate_site_spec.rb +11 -10
  57. data/test/import_site_content_spec.rb +6 -5
  58. metadata +2 -2
@@ -13,17 +13,18 @@ class SiteSetupBase < BasePage
13
13
  def menu_elements
14
14
  # Clicks the Edit Tools link, then
15
15
  # instantiates the EditSiteTools class.
16
- action(:edit_tools) {|b| b.frm.link(:text=>"Edit Tools").click }
17
-
16
+ #action(:edit_tools) {|b| b.frm.link(:text=>"Edit Tools").click }
17
+ link("Edit Tools")
18
18
  # Clicks the Manage Groups link and
19
19
  # instantiates the Groups Class.
20
- action(:manage_groups) {|b| b.frm.link(:text=>"Manage Groups").click }
21
-
20
+ #action(:manage_groups) {|b| b.frm.link(:text=>"Manage Groups").click }
21
+ link("Manage Groups")
22
22
  # Clicks the Duplicate Site link and instantiates
23
23
  # the DuplicateSite class.
24
- action(:duplicate_site) {|b| b.frm.link(:text=>"Duplicate Site").click }
25
-
26
- action(:add_participants) {|b| b.frm.link(:text=>"Add Participants").click }
24
+ #action(:duplicate_site) {|b| b.frm.link(:text=>"Duplicate Site").click }
25
+ link("Duplicate Site")
26
+ #action(:add_participants) {|b| b.frm.link(:text=>"Add Participants").click }
27
+ link("Add Participants")
27
28
 
28
29
  end
29
30
  end
@@ -82,7 +83,7 @@ class SiteSetup < SiteSetupBase
82
83
  end
83
84
 
84
85
  element(:view) { |b| b.frm.select(:id=>"view").click }
85
- action(:clear_search) { |b| b.frm.button(:value=>"Clear Search").click }
86
+ button "Clear Search"
86
87
  element(:select_page_size) { |b| b.frm.select(:id=>"selectPageSize").click }
87
88
  action(:sort_by_title) { |b| b.frm.link(:text=>"Worksite Title").click }
88
89
  action(:sort_by_type) { |b| b.frm.link(:text=>"Type").click }
@@ -112,14 +113,16 @@ class SiteEditor < SiteSetupBase
112
113
  frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(participant)}/).select(:id=>/role/).select(role)
113
114
  end
114
115
 
115
- action(:update_participants) { |b| b.frm.button(:value=>"Update Participants").click }
116
+ #action(:update_participants) { |b| b.frm.button(:value=>"Update Participants").click }
117
+ button("Update Participants")
116
118
 
117
119
  element(:return_button) { |b| b.frm.button(:name=>"back") }
118
120
 
119
121
  action(:return_to_sites_list) { |p| p.return_button.click }
120
122
 
121
123
  action(:previous) { |b| b.frm.button(:name=>"previous").click }
122
- action(:printable_version) { |b| b.frm.link(:text=>"Printable Version").click }
124
+ #action(:printable_version) { |b| b.frm.link(:text=>"Printable Version").click }
125
+ link("Printable Version")
123
126
 
124
127
  end
125
128
 
@@ -131,10 +134,9 @@ class Groups < SiteSetupBase
131
134
 
132
135
  expected_element :create_new_group_link
133
136
 
134
- element(:create_new_group_link) { |b| b.frm.link(:text=>"Create New Group") }
135
-
136
- action(:create_new_group) { |p| p.create_new_group_link.click }
137
- action(:auto_groups) { |b| b.frm.link(:text=>"Auto Groups").click }
137
+ link("Create New Group")
138
+ link("Auto Groups")
139
+
138
140
  action(:remove_checked) { |b| b.frm.button(:id=>"delete-groups").click }
139
141
 
140
142
  end
@@ -169,20 +171,18 @@ class DuplicateSite < SiteSetupBase
169
171
  end
170
172
 
171
173
  # Returns the site name in the header, for verification.
172
- def site_name
173
- frm.div(:class=>"portletBody").h3.span(:class=>"highlight").text
174
- end
174
+ value(:site_name) { |b| b.frm.div(:class=>"portletBody").h3.span(:class=>"highlight").text }
175
+ element(:site_title) { |b| b.frm.text_field(:id=>"title") }
176
+ element(:academic_term) { |b| b.frm.select(:id=>"selectTerm") }
175
177
 
176
- element(:site_title) { |b| b.frm.text_field(:id=>"title") }
177
- element(:academic_term) { |b| b.frm.select(:id=>"selectTerm") }
178
178
  end
179
179
 
180
180
  # Page for Adding Participants to a Site in Site Setup
181
181
  class SiteSetupAddParticipants < SiteSetupBase
182
182
 
183
183
  menu_elements
184
-
185
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
184
+
185
+ button("Continue")
186
186
 
187
187
  element(:official_participants) { |b| b.frm.text_field(:id=>"content::officialAccountParticipant") }
188
188
  element(:non_official_participants) { |b| b.frm.text_field(:id=>"content::nonOfficialAccountParticipant") }
@@ -194,13 +194,12 @@ class SiteSetupAddParticipants < SiteSetupBase
194
194
 
195
195
  end
196
196
 
197
-
198
197
  # Page for selecting Participant roles individually
199
198
  class SiteSetupChooseRolesIndiv < SiteSetupBase
200
199
 
201
200
  menu_elements
202
201
 
203
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
202
+ button("Continue")
204
203
 
205
204
  action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processDifferentRoleBack").click }
206
205
  #action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acancel&Fast%20track%20action=siteAddParticipantHandler.processCancel").click }
@@ -208,21 +207,18 @@ class SiteSetupChooseRolesIndiv < SiteSetupBase
208
207
 
209
208
  end
210
209
 
211
-
212
210
  # Page for selecting the same role for All. This class is used for
213
211
  # both Course and Portfolio sites.
214
212
  class SiteSetupChooseRole < BasePage
215
213
 
216
214
  frame_element
217
215
 
218
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
216
+ button("Continue")
219
217
 
220
218
  # Use this method for radio buttons that aren't
221
219
  # included in the default list below. Enter the
222
220
  # radio button's label in the UI.
223
- def radio_button(label)
224
- frm.radio(:value=>label)
225
- end
221
+ action(:radio_button) { |label, b| b.frm.radio(:value=>label) }
226
222
 
227
223
  action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processSameRoleBack").click }
228
224
  action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acancel&Fast%20track%20action=siteAddParticipantHandler.processCancel").click }
@@ -243,8 +239,8 @@ end
243
239
  class SiteSetupParticipantEmail < SiteSetupBase
244
240
 
245
241
  menu_elements
246
-
247
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
242
+
243
+ button("Continue")
248
244
  action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acontinue&Fast%20track%20action=siteAddParticipantHandler.processEmailNotiBack").click }
249
245
  #action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acontinue&Fast%20track%20action=siteAddParticipantHandler.processEmailNotiCancel").click }
250
246
  element(:send_now) { |b| b.frm.radio(:id=>"content::noti-row:0:noti-select") }
@@ -258,7 +254,7 @@ class SiteSetupParticipantConfirm < SiteSetupBase
258
254
 
259
255
  menu_elements
260
256
 
261
- action(:finish) { |b| b.frm.button(:value=>"Finish").click }
257
+ button("Finish")
262
258
 
263
259
  # Returns the value of the id field for the specified name.
264
260
  def id(name)
@@ -271,7 +267,6 @@ class SiteSetupParticipantConfirm < SiteSetupBase
271
267
  end
272
268
 
273
269
  action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processConfirmBack").click }
274
- #action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processConfirmCancel").click }
275
270
 
276
271
  end
277
272
 
@@ -282,9 +277,8 @@ class EditSiteTools < SiteSetupBase
282
277
  menu_elements
283
278
 
284
279
  expected_element :all_tools
285
-
286
- # Clicks the Continue button.
287
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
280
+
281
+ button("Continue")
288
282
 
289
283
  # This is a comprehensive list of all checkboxes and
290
284
  # radio buttons for this page,
@@ -377,11 +371,7 @@ class ConfirmSiteToolsEdits < SiteSetupBase
377
371
 
378
372
  expected_element :finish_button
379
373
 
380
- element(:finish_button) { |b| b.frm.button(value: "Finish") }
381
-
382
- # Clicks the Finish button, next is
383
- # the SiteSetupEdit class.
384
- action(:finish) { |b| b.finish_button.click }
374
+ button("Finish")
385
375
 
386
376
  end
387
377
 
@@ -390,9 +380,8 @@ end
390
380
  class DeleteSite < SiteSetupBase
391
381
 
392
382
  menu_elements
393
-
394
- # Clicks the Remove button
395
- action(:remove) { |b| b.frm.button(:value=>"Remove").click }
383
+
384
+ button("Remove")
396
385
 
397
386
  end
398
387
 
@@ -419,9 +408,9 @@ class SiteType < SiteSetupBase
419
408
  element(:academic_term) { |b| b.frm.select(:id=>"selectTerm") }
420
409
  element(:select_template) { |b| b.frm.select(:id=>"templateSiteId") }
421
410
  element(:select_term) { |b| b.frm.select(:id=>"selectTermTemplate") }
422
- #action(:cancel) { |b| b.frm.button(:id=>"cancelCreate").click }
423
411
  element(:copy_users) { |b| b.frm.checkbox(:id=>"copyUsers") }
424
412
  element(:copy_content) { |b| b.frm.checkbox(:id=>"copyContent") }
413
+
425
414
  end
426
415
 
427
416
 
@@ -430,9 +419,8 @@ end
430
419
  class AddMultipleTools < SiteSetupBase
431
420
 
432
421
  menu_elements
433
-
434
- # Clicks the Continue button.
435
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
422
+
423
+ button("Continue")
436
424
 
437
425
  # Note that the text field definitions included here
438
426
  # for the Tools definitions are ONLY for the first
@@ -452,8 +440,7 @@ class AddMultipleTools < SiteSetupBase
452
440
  element(:web_content_title) { |b| b.frm.text_field(:id=>"title_sakai.iframe") }
453
441
  element(:web_content_source) { |b| b.frm.text_field(:id=>"source_sakai.iframe") }
454
442
  element(:more_web_content_tools) { |b| b.frm.select(:id=>"num_sakai.iframe") }
455
- action(:back) { |b| b.frm.button(:name=>"Back").click }
456
-
443
+
457
444
  end
458
445
 
459
446
 
@@ -463,9 +450,7 @@ class CourseSectionInfo < SiteSetupBase
463
450
  menu_elements
464
451
  expected_element :subject
465
452
 
466
- # Clicks the Continue button, then instantiates
467
- # the CourseSiteInfo Class.
468
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
453
+ button("Continue")
469
454
 
470
455
  # Clicks the Done button (or the
471
456
  # "Done - go to Site" button if it
@@ -506,10 +491,8 @@ class SiteAccess < SiteSetupBase
506
491
  #
507
492
  # Example: page.joiner_role_div.visible?
508
493
  element(:joiner_role_div) { |b| b.frm.div(:id=>"joinerrole") }
509
-
510
- # Clicks the Continue button, then
511
- # instantiates the ConfirmCourseSiteSetup class.
512
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
494
+
495
+ button("Continue")
513
496
 
514
497
  element(:publish_site) { |b| b.frm.radio(:id=>"publish") }
515
498
  element(:leave_as_draft) { |b| b.frm.radio(:id=>"unpublish") }
@@ -526,16 +509,8 @@ class ConfirmSiteSetup < BasePage
526
509
 
527
510
  frame_element
528
511
 
529
- element(:request_button) { |b| b.frm.button(:value=>"Request Site") }
530
-
531
- # Clicks the Request Site button, then
532
- # instantiates the SiteSetup Class.
533
- action(:request_site){ |p| p.request_button.click }
534
-
535
- # For portfolio sites...
536
- # Clicks the "Create Site" button and
537
- # instantiates the SiteSetup class.
538
- action(:create_site) { |b| b.frm.button(:value=>"Create Site").click }
512
+ button("Request Site")
513
+ button("Create Site")
539
514
 
540
515
  end
541
516
 
@@ -555,15 +530,12 @@ class CourseSiteInfo < BasePage
555
530
  editor.td(:id, "xEditingArea").frame(:index=>0).send_keys text
556
531
  end
557
532
 
558
- # Clicks the Continue button, next is the
559
- # EditSiteTools Class.
560
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
561
-
533
+ button("Continue")
534
+
562
535
  element(:short_description) { |b| b.frm.text_field(:id=>"short_description") }
563
536
  element(:special_instructions) { |b| b.frm.text_field(:id=>"additional") }
564
537
  element(:site_contact_name) { |b| b.frm.text_field(:id=>"siteContactName") }
565
538
  element(:site_contact_email) { |b| b.frm.text_field(:id=>"siteContactEmail") }
566
- action(:back) { |b| b.frm.button(:name=>"Back").click }
567
539
 
568
540
  end
569
541
 
@@ -582,7 +554,7 @@ class PortfolioSiteInfo < BasePage
582
554
  editor.td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
583
555
  end
584
556
 
585
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
557
+ button("Continue")
586
558
 
587
559
  element(:title) { |b| b.frm.text_field(:id=>"title") }
588
560
  element(:url_alias) { |b| b.frm.text_field(:id=>"alias_0") }
@@ -598,7 +570,7 @@ class PortfolioSiteTools < BasePage
598
570
 
599
571
  frame_element
600
572
 
601
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
573
+ button("Continue")
602
574
 
603
575
  element(:all_tools) { |b| b.frm.checkbox(:id=>"all") }
604
576
  #TODO Add support for individual tool selection
@@ -610,7 +582,7 @@ class PortfolioConfigureToolOptions < BasePage
610
582
 
611
583
  frame_element
612
584
 
613
- action(:continue) { |b| b.frm.button(:value=>"Continue").click }
585
+ button("Continue")
614
586
 
615
587
  element(:email) { |b| b.frm.text_field(:id=>"emailId") }
616
588
 
@@ -22,7 +22,7 @@ class Sites < BasePage
22
22
  frm.link(:text, id).click
23
23
  end
24
24
 
25
- action(:new_site) { |b| b.frm.link(:text, "New Site").click }
25
+ link "New Site"
26
26
 
27
27
  element(:search_field) { |b| b.frm.text_field(:id=>"search") }
28
28
  action(:search_button) { |b| b.frm.link(text=>"Search").click }
@@ -43,60 +43,27 @@ end
43
43
  # Sites section of the Administration Workspace.
44
44
  class EditSiteInfo < BasePage
45
45
 
46
+ include FCKEditor
46
47
  frame_element
47
48
 
48
- # Clicks the Remove Site button, then instantiates
49
- # the RemoveSite page class.
50
- def remove_site
51
- frm.link(:text, "Remove Site").click
52
- RemoveSite.new(@browser)
53
- end
54
-
55
- # Clicks the Save button, then instantiates the Sites
56
- # page class.
57
- def save
58
- frm.button(:value=>"Save").click
59
- Sites.new(@browser)
60
- end
61
-
62
- # Clicks the Save As link, then instantiates
63
- # the SiteSaveAs page class.
64
- def save_as
65
- frm.link(:text, "Save As").click
66
- SiteSaveAs.new(@browser)
67
- end
49
+ link("Remove Site")
50
+ button("Save")
51
+ link("Save As")
68
52
 
69
53
  # Gets the Site ID from the page.
70
- def site_id_read_only
71
- @browser.frame(:index=>0).table(:class=>"itemSummary").td(:class=>"shorttext", :index=>0).text
72
- end
54
+ action(:site_id_read_only) { |b| b.frm.table(:class=>"itemSummary").td(:class=>"shorttext", :index=>0).text }
73
55
 
74
56
  # Enters the specified text string in the text area of
75
57
  # the FCKEditor.
76
58
  def description=(text)
77
- editor.td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
78
- end
79
-
80
- # The FCKEditor object. Use this object for
81
- # wait commands when the site is slow
82
- def editor
83
- @browser.frame(:index=>0).frame(:id, "description___Frame")
59
+ editor.frame(:index=>0).send_keys(text)
84
60
  end
85
61
 
86
- # Clicks the Properties button on the page,
87
- # then instantiates the AddEditSiteProperties
88
- # page class.
89
- def properties
90
- frm.button(:value=>"Properties").click
91
- AddEditSiteProperties.new(@browser)
92
- end
62
+ # The FCKEditor object
63
+ element(:editor) { |b| b.frm.frame(:id, "description___Frame").td(:id, "xEditingArea") }
93
64
 
94
- # Clicks the Pages button, then instantiates
95
- # the AddEditPages page class.
96
- def pages
97
- frm.button(:value=>"Pages").click
98
- AddEditPages.new(@browser)
99
- end
65
+ button("Properties")
66
+ button("Pages")
100
67
 
101
68
  # Non-navigating, interactive page objects go here
102
69
  element(:site_id) { |b| b.frm.text_field(:id=>"id") }
@@ -108,20 +75,13 @@ class EditSiteInfo < BasePage
108
75
  element(:public_view_yes) { |b| b.frm.select_list(:id=>"pubViewtrue") }
109
76
  end
110
77
 
111
-
112
-
113
78
  # The page you come to when editing a Site in Sites
114
79
  # and you click on the Pages button
115
80
  class AddEditPages < BasePage
116
81
 
117
82
  frame_element
118
83
 
119
- # Clicks the link for New Page, then
120
- # instantiates the NewPage page class.
121
- def new_page
122
- frm.link(:text=>"New Page").click
123
- NewPage.new(@browser)
124
- end
84
+ link("New Page")
125
85
 
126
86
  end
127
87
 
@@ -130,12 +90,7 @@ class NewPage < BasePage
130
90
 
131
91
  frame_element
132
92
 
133
- # Clicks the Tools button, then instantiates
134
- # the AddEditTools class.
135
- def tools
136
- frm.button(:value=>"Tools").click
137
- AddEditTools.new(@browser)
138
- end
93
+ button("Tools")
139
94
 
140
95
  # Interactive page objects that do no navigation
141
96
  # or page refreshes go here.
@@ -150,19 +105,8 @@ class AddEditTools < BasePage
150
105
 
151
106
  frame_element
152
107
 
153
- # Clicks the New Tool link, then instantiates
154
- # the NewTool class.
155
- def new_tool
156
- frm.link(:text=>"New Tool").click
157
- NewTool.new(@browser)
158
- end
159
-
160
- # Clicks the Save button, then
161
- # instantiates the AddEditPages class.
162
- def save
163
- frm.button(:value=>"Save").click
164
- AddEditPages.new(@browser)
165
- end
108
+ link("New Tool")
109
+ button("Save")
166
110
 
167
111
  end
168
112
 
@@ -171,12 +115,7 @@ class NewTool < BasePage
171
115
 
172
116
  frame_element
173
117
 
174
- # Clicks the Done button, the instantiates
175
- # The AddEditTools class.
176
- def done
177
- frm.button(:value=>"Done").click
178
- AddEditTools.new(@browser)
179
- end
118
+ button("Done")
180
119
 
181
120
  # Interactive page objects that do no navigation
182
121
  # or page refreshes go here.
@@ -191,28 +130,18 @@ class RemoveSite < BasePage
191
130
 
192
131
  frame_element
193
132
 
194
- # Clicks the Remove button, then
195
- # instantiates the Sites class.
196
- def remove
197
- frm.button(:value=>"Remove").click
198
- Sites.new(@browser)
199
- end
133
+ button("Remove")
200
134
 
135
+ end
201
136
 
202
137
  # Page that appears when you click "Save As" when editing a Site in Sites
203
- class SiteSaveAs < BasePage
138
+ class SiteSaveAs < BasePage
204
139
 
205
140
  frame_element
206
141
 
207
- # Clicks the Save button, then
208
- # instantiates the Sites class.
209
- def save
210
- frm.button(:value, "Save").click
211
- Sites.new(@browser)
212
- end
142
+ button("Save")
213
143
 
214
144
  element(:site_id) { |b| b.frm.text_field(:id=>"id") }
215
- end
216
145
 
217
146
  end
218
147
 
@@ -220,26 +149,11 @@ class AddEditSiteProperties < BasePage
220
149
 
221
150
  frame_element
222
151
 
223
- # Clicks the New Property button
224
- def new_property
225
- frm.button(:value=>"New Property").click
226
- #Class.new(@browser)
227
- end
228
-
229
- # Clicks the Done button, then instantiates
230
- # the EditSiteInfo class.
231
- def done
232
- frm.button(:value=>"Done").click
233
- EditSiteInfo.new(@browser)
234
- end
235
-
236
- # Clicks the Save button, then instantiates
237
- # the Sites page class.
238
- def save
239
- frm.button(:value=>"Save").click
240
- Sites.new(@browser)
241
- end
152
+ button("New Property")
153
+ button("Done")
154
+ button("Save")
242
155
 
243
156
  element(:name) { |b| b.frm.text_field(:id=>"new_name") }
244
157
  element(:value) { |b| b.frm.text_field(:id=>"new_value") }
158
+
245
159
  end