sambal-cle 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -5
- data/Gemfile.lock +6 -9
- data/lib/sambal-cle/base_page.rb +21 -3
- data/lib/sambal-cle/data_objects/announcement.rb +1 -1
- data/lib/sambal-cle/data_objects/assignment.rb +3 -2
- data/lib/sambal-cle/data_objects/course.rb +5 -4
- data/lib/sambal-cle/data_objects/event.rb +7 -7
- data/lib/sambal-cle/data_objects/forum.rb +3 -2
- data/lib/sambal-cle/data_objects/lesson.rb +3 -1
- data/lib/sambal-cle/data_objects/resource.rb +3 -1
- data/lib/sambal-cle/page_objects/account.rb +15 -66
- data/lib/sambal-cle/page_objects/aliases.rb +3 -2
- data/lib/sambal-cle/page_objects/announcements.rb +16 -31
- data/lib/sambal-cle/page_objects/assessments.rb +22 -55
- data/lib/sambal-cle/page_objects/assignments.rb +1 -1
- data/lib/sambal-cle/page_objects/blogger.rb +21 -77
- data/lib/sambal-cle/page_objects/blogs.rb +3 -5
- data/lib/sambal-cle/page_objects/calendar.rb +22 -40
- data/lib/sambal-cle/page_objects/chat_room.rb +2 -2
- data/lib/sambal-cle/page_objects/email_archive.rb +1 -2
- data/lib/sambal-cle/page_objects/evaluations.rb +78 -50
- data/lib/sambal-cle/page_objects/feedback.rb +1 -5
- data/lib/sambal-cle/page_objects/forms.rb +14 -55
- data/lib/sambal-cle/page_objects/forums.rb +11 -24
- data/lib/sambal-cle/page_objects/glossary.rb +6 -12
- data/lib/sambal-cle/page_objects/home.rb +7 -18
- data/lib/sambal-cle/page_objects/jforums.rb +60 -197
- data/lib/sambal-cle/page_objects/job_scheduler.rb +16 -49
- data/lib/sambal-cle/page_objects/lessons.rb +11 -34
- data/lib/sambal-cle/page_objects/matrix.rb +12 -14
- data/lib/sambal-cle/page_objects/messages.rb +71 -466
- data/lib/sambal-cle/page_objects/my_workspace.rb +3 -3
- data/lib/sambal-cle/page_objects/podcasts.rb +1 -6
- data/lib/sambal-cle/page_objects/polls.rb +5 -5
- data/lib/sambal-cle/page_objects/portfolio_templates.rb +16 -66
- data/lib/sambal-cle/page_objects/portfolios.rb +17 -67
- data/lib/sambal-cle/page_objects/profile.rb +5 -16
- data/lib/sambal-cle/page_objects/profile2.rb +51 -119
- data/lib/sambal-cle/page_objects/public_search.rb +6 -27
- data/lib/sambal-cle/page_objects/realms.rb +2 -2
- data/lib/sambal-cle/page_objects/resources.rb +89 -116
- data/lib/sambal-cle/page_objects/resources_roster.rb +1 -0
- data/lib/sambal-cle/page_objects/rosters.rb +3 -13
- data/lib/sambal-cle/page_objects/rwiki.rb +2 -6
- data/lib/sambal-cle/page_objects/search.rb +10 -10
- data/lib/sambal-cle/page_objects/sections.rb +40 -81
- data/lib/sambal-cle/page_objects/site_setup.rb +46 -74
- data/lib/sambal-cle/page_objects/sites.rb +24 -110
- data/lib/sambal-cle/page_objects/styles.rb +6 -51
- data/lib/sambal-cle/page_objects/syllabus.rb +12 -26
- data/lib/sambal-cle/page_objects/user_membership.rb +3 -15
- data/lib/sambal-cle/page_objects/users.rb +9 -25
- data/sambal-cle.gemspec +1 -1
- data/test/add_assignment_to_calendar_spec.rb +55 -1
- data/test/config.yml +1 -1
- data/test/duplicate_site_spec.rb +11 -10
- data/test/import_site_content_spec.rb +6 -5
- metadata +2 -2
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
sambal-cle (0.1.5)
|
5
|
-
test-factory (>= 0.0.1)
|
6
|
-
|
7
1
|
GEM
|
8
2
|
remote: http://rubygems.org/
|
9
3
|
specs:
|
@@ -24,6 +18,9 @@ GEM
|
|
24
18
|
diff-lcs (~> 1.1.3)
|
25
19
|
rspec-mocks (2.9.0)
|
26
20
|
rubyzip (0.9.7)
|
21
|
+
sambal-cle (0.1.3)
|
22
|
+
selenium-webdriver (>= 2.21.2)
|
23
|
+
watir-webdriver (>= 0.5.5)
|
27
24
|
selenium-webdriver (2.25.0)
|
28
25
|
childprocess (>= 0.2.5)
|
29
26
|
libwebsocket (~> 0.1.3)
|
@@ -39,6 +36,6 @@ PLATFORMS
|
|
39
36
|
|
40
37
|
DEPENDENCIES
|
41
38
|
rspec
|
42
|
-
sambal-cle
|
43
|
-
test-factory
|
44
|
-
watir-webdriver
|
39
|
+
sambal-cle
|
40
|
+
test-factory (>= 0.0.2)
|
41
|
+
watir-webdriver (>= 0.6.0)
|
data/lib/sambal-cle/base_page.rb
CHANGED
@@ -11,11 +11,29 @@ class BasePage < PageFactory
|
|
11
11
|
value(:alert_box) { |b| b.frm.div(:class=>"alertMessage").text }
|
12
12
|
# Returns the text of the header.
|
13
13
|
value(:header) { |b| b.frm.div(:class=>"portletBody").h3.text }
|
14
|
-
|
15
|
-
|
14
|
+
button("Cancel")
|
15
|
+
button("Save")
|
16
|
+
button("Back")
|
16
17
|
end
|
17
18
|
|
18
|
-
|
19
|
+
def link(link_text)
|
20
|
+
element(damballa(link_text+"_link")) { |b| b.frm.link(:text=>link_text) }
|
21
|
+
action(damballa(link_text)) { |b| b.frm.link(:text=>link_text).click }
|
22
|
+
end
|
23
|
+
|
24
|
+
def button(button_text)
|
25
|
+
element(damballa(button_text+"_button")) { |b| b.frm.button(:value=>button_text) }
|
26
|
+
action(damballa(button_text)) { |b| b.frm.button(:value=>button_text).click }
|
27
|
+
end
|
28
|
+
|
29
|
+
def damballa(text)
|
30
|
+
text.gsub(/([+=|\\\.~@#'"\?`!\{\}\[\]\$%\^&\*\(\)])/, "").
|
31
|
+
gsub(/([-\/\ ])/,"_").
|
32
|
+
downcase.
|
33
|
+
to_sym
|
34
|
+
end
|
35
|
+
|
36
|
+
# Any additional needed element group defs go here...
|
19
37
|
|
20
38
|
end
|
21
39
|
|
@@ -115,8 +115,9 @@ class AssignmentObject
|
|
115
115
|
edit.enter_source_text edit.editor, opts[:instructions]
|
116
116
|
end
|
117
117
|
edit.grade_scale.fit opts[:grade_scale]
|
118
|
-
edit.max_points.
|
119
|
-
|
118
|
+
#if edit.max_points.enabled?
|
119
|
+
edit.max_points.fit opts[:max_points]
|
120
|
+
#end
|
120
121
|
#TODO: All the rest goes here
|
121
122
|
|
122
123
|
# This should be one of the last items edited...
|
@@ -6,7 +6,7 @@ class CourseSiteObject
|
|
6
6
|
include DateFactory
|
7
7
|
include Workflows
|
8
8
|
|
9
|
-
attr_accessor :name, :id, :subject, :course, :section, :term, :authorizer,
|
9
|
+
attr_accessor :name, :id, :subject, :course, :section, :term, :term_value, :authorizer,
|
10
10
|
:web_content_source, :email, :joiner_role, :creation_date, :web_content_title,
|
11
11
|
:description, :short_description, :site_contact_name, :site_contact_email, :participants
|
12
12
|
|
@@ -42,7 +42,8 @@ class CourseSiteObject
|
|
42
42
|
page.course_site.set
|
43
43
|
# Store the selected term value for use later
|
44
44
|
# TODO: Add logic here in case we want to actually SET the term value instead.
|
45
|
-
@
|
45
|
+
@term_value = page.academic_term.value
|
46
|
+
@term = page.academic_term.selected_options[0].text
|
46
47
|
|
47
48
|
page.continue
|
48
49
|
end
|
@@ -55,7 +56,7 @@ class CourseSiteObject
|
|
55
56
|
page.section.set @section
|
56
57
|
|
57
58
|
# Store site name for ease of coding and readability later
|
58
|
-
@name = "#{@subject} #{@course} #{@section} #{@
|
59
|
+
@name = "#{@subject} #{@course} #{@section} #{@term_value}"
|
59
60
|
# Add a valid instructor id
|
60
61
|
page.authorizers_username.set @authorizer
|
61
62
|
|
@@ -131,7 +132,7 @@ class CourseSiteObject
|
|
131
132
|
course_section.section.set @section
|
132
133
|
|
133
134
|
# Store site name for ease of coding and readability later
|
134
|
-
@name = "#{@subject} #{@course} #{@section} #{@
|
135
|
+
@name = "#{@subject} #{@course} #{@section} #{@term_value}"
|
135
136
|
|
136
137
|
# Add a valid instructor id
|
137
138
|
course_section.authorizers_username.set @authorizer
|
@@ -15,13 +15,13 @@ class EventObject
|
|
15
15
|
|
16
16
|
defaults = {
|
17
17
|
:title=>random_alphanums,
|
18
|
-
:month=>
|
19
|
-
:day=>
|
20
|
-
:year=>
|
21
|
-
:start_hour=>
|
22
|
-
:start_minute=>
|
23
|
-
:start_meridian=>
|
24
|
-
:message=>random_multiline(400,20, :
|
18
|
+
:month=>minutes_from_now(15)[:MON],
|
19
|
+
:day=>minutes_from_now(15)[:day_of_month],
|
20
|
+
:year=>minutes_from_now(15)[:year],
|
21
|
+
:start_hour=>minutes_from_now(15)[:hour],
|
22
|
+
:start_minute=>minutes_from_now(15)[:minute_rounded],
|
23
|
+
:start_meridian=>minutes_from_now(15)[:meridian],
|
24
|
+
:message=>random_multiline(400, 20, :lorem)
|
25
25
|
}
|
26
26
|
options = defaults.merge(opts)
|
27
27
|
|
@@ -24,7 +24,7 @@ class ForumObject
|
|
24
24
|
alias :name :title
|
25
25
|
|
26
26
|
def create
|
27
|
-
open_my_site_by_name
|
27
|
+
open_my_site_by_name @site
|
28
28
|
forums
|
29
29
|
on Forums do |forums|
|
30
30
|
forums.new_forum
|
@@ -98,7 +98,8 @@ end
|
|
98
98
|
class TopicObject
|
99
99
|
|
100
100
|
include Foundry
|
101
|
-
include
|
101
|
+
include DataFactory
|
102
|
+
include StringFactory
|
102
103
|
include Workflows
|
103
104
|
|
104
105
|
attr_accessor :title, :short_description, :description, :site, :forum,
|
@@ -2,6 +2,7 @@ class ModuleObject
|
|
2
2
|
|
3
3
|
include Foundry
|
4
4
|
include DataFactory
|
5
|
+
include StringFactory
|
5
6
|
include Workflows
|
6
7
|
|
7
8
|
attr_accessor :title, :description, :keywords, :start_date, :end_date, :site, :href
|
@@ -49,6 +50,7 @@ class ContentSectionObject
|
|
49
50
|
|
50
51
|
include Foundry
|
51
52
|
include DataFactory
|
53
|
+
include StringFactory
|
52
54
|
include Workflows
|
53
55
|
|
54
56
|
attr_accessor :site, :module, :title, :instructions, :modality, :content_type,
|
@@ -116,7 +118,7 @@ class ContentSectionObject
|
|
116
118
|
page.url_description.set @url_description
|
117
119
|
when "Upload or link to a file in Resources"
|
118
120
|
page.select_or_upload_file
|
119
|
-
on_page
|
121
|
+
on_page Resources do |add|
|
120
122
|
add.open_folder @file_folder unless @file_folder == nil
|
121
123
|
add.select_file @file_name
|
122
124
|
add.continue
|
@@ -22,7 +22,7 @@ class FileObject
|
|
22
22
|
open_my_site_by_name @site
|
23
23
|
resources
|
24
24
|
on Resources do |file|
|
25
|
-
file.
|
25
|
+
file.upload_files_to_folder @target_folder
|
26
26
|
end
|
27
27
|
on ResourcesUploadFiles do |upload|
|
28
28
|
upload.file_to_upload @name, @source_path
|
@@ -39,6 +39,7 @@ class FolderObject
|
|
39
39
|
include Foundry
|
40
40
|
include DataFactory
|
41
41
|
include Workflows
|
42
|
+
include StringFactory
|
42
43
|
|
43
44
|
attr_accessor :name, :parent_folder, :site
|
44
45
|
|
@@ -94,6 +95,7 @@ class HTMLPageObject
|
|
94
95
|
|
95
96
|
include Foundry
|
96
97
|
include DataFactory
|
98
|
+
include StringFactory
|
97
99
|
include Workflows
|
98
100
|
|
99
101
|
attr_accessor :name, :description, :site, :folder, :html, :url
|
@@ -7,23 +7,7 @@ class EditAccount < BasePage
|
|
7
7
|
|
8
8
|
frame_element
|
9
9
|
|
10
|
-
|
11
|
-
# makes sure there isn't any error message present.
|
12
|
-
# If there is, it reinstantiates the Edit Account Class,
|
13
|
-
# otherwise it instantiates the UserAccount Class.
|
14
|
-
def update_details
|
15
|
-
frm.button(:value=>"Update Details").click
|
16
|
-
# Need to check if the update took...
|
17
|
-
if frm.div(:class=>"portletBody").h3.text=="My Account Details"
|
18
|
-
# Apparently it did...
|
19
|
-
UserAccount.new(@browser)
|
20
|
-
elsif frm.div(:class=>"portletBody").h3.text=="Account Details"
|
21
|
-
# We are on the edit page (or we're using the Admin account)...
|
22
|
-
EditAccount.new(@browser)
|
23
|
-
elsif frm.div(:class=>"portletBody").h3.text=="Users"
|
24
|
-
Users.new(@browser)
|
25
|
-
end
|
26
|
-
end
|
10
|
+
button("Update Details")
|
27
11
|
|
28
12
|
element(:first_name) { |b| b.frm.text_field(:id=>"first-name") }
|
29
13
|
element(:last_name) { |b| b.frm.text_field(:id=>"last-name") }
|
@@ -31,79 +15,44 @@ class EditAccount < BasePage
|
|
31
15
|
element(:current_password) { |b| b.frm.text_field(:id=>"pwcur") }
|
32
16
|
element(:create_new_password) { |b| b.frm.text_field(:id=>"pw") }
|
33
17
|
element(:verify_new_password) { |b| b.frm.text_field(:id=>"pw0") }
|
34
|
-
end
|
35
18
|
|
19
|
+
end
|
36
20
|
|
37
21
|
# A Non-Admin User's Account page
|
38
|
-
# Accessible via the "Account" link in "MY SETTINGS"
|
39
|
-
#
|
40
|
-
# IMPORTANT: this class does not use PageObject or the ToolsMenu!!
|
41
|
-
# So, the only available method to navigate away from this page is
|
42
|
-
# Home. Otherwise, you'll have to call the navigation link
|
43
|
-
# Explicitly in the test case itself.
|
44
|
-
#
|
45
|
-
# Objects and methods used in this class must be explicitly
|
46
|
-
# defined using Watir and Ruby code.
|
47
|
-
#
|
48
|
-
# Do NOT use the PageObject syntax in this class.
|
49
22
|
class UserAccount < BasePage
|
50
23
|
|
51
|
-
|
24
|
+
def frm
|
25
|
+
self.frame(:index=>0) #TODO: Test that this really is needed instead of the frame_element
|
26
|
+
end
|
52
27
|
|
53
28
|
# Clicks the Modify Details button. Instantiates the EditAccount class.
|
54
|
-
|
55
|
-
@browser.frame(:index=>0).button(:name=>"eventSubmit_doModify").click
|
56
|
-
end
|
29
|
+
action(:modify_details) {|b| b.frm.button(:name=>"eventSubmit_doModify").click }
|
57
30
|
|
58
31
|
# Gets the text of the User ID field.
|
59
|
-
|
60
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[0][1].text
|
61
|
-
end
|
32
|
+
value(:user_id) { |b| b.frm.table(:class=>"itemSummary", :index=>0)[0][1].text }
|
62
33
|
|
63
34
|
# Gets the text of the First Name field.
|
64
|
-
|
65
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[1][1].text
|
66
|
-
end
|
35
|
+
value(:first_name) {|b| b.frm.table(:class=>"itemSummary", :index=>0)[1][1].text }
|
67
36
|
|
68
37
|
# Gets the text of the Last Name field.
|
69
|
-
|
70
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[2][1].text
|
71
|
-
end
|
38
|
+
value(:last_name) {|b| b.frm.table(:class=>"itemSummary", :index=>0)[2][1].text }
|
72
39
|
|
73
40
|
# Gets the text of the Email field.
|
74
|
-
|
75
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[3][1].text
|
76
|
-
end
|
41
|
+
value(:email) {|b| b.frm.table(:class=>"itemSummary", :index=>0)[3][1].text }
|
77
42
|
|
78
43
|
# Gets the text of the Type field.
|
79
|
-
|
80
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[4][1].text
|
81
|
-
end
|
44
|
+
value(:type) {|b| b.frm.table(:class=>"itemSummary", :index=>0)[4][1].text }
|
82
45
|
|
83
46
|
# Gets the text of the Created By field.
|
84
|
-
|
85
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[0][1].text
|
86
|
-
end
|
47
|
+
value(:created_by) {|b| b.frm.table(:class=>"itemSummary", :index=>1)[0][1].text }
|
87
48
|
|
88
49
|
# Gets the text of the Created field.
|
89
|
-
|
90
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[1][1].text
|
91
|
-
end
|
50
|
+
value(:created) {|b| b.frm.table(:class=>"itemSummary", :index=>1)[1][1].text }
|
92
51
|
|
93
52
|
# Gets the text of the Modified By field.
|
94
|
-
|
95
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[2][1].text
|
96
|
-
end
|
53
|
+
value(:modified_by) {|b| b.frm.table(:class=>"itemSummary", :index=>1)[2][1].text }
|
97
54
|
|
98
55
|
# Gets the text of the Modified (date) field.
|
99
|
-
|
100
|
-
@browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[3][1].text
|
101
|
-
end
|
102
|
-
|
103
|
-
# Clicks the Home buton in the left menu.
|
104
|
-
# instantiates the Home Class.
|
105
|
-
def home
|
106
|
-
@browser.link(:text, "Home").click
|
107
|
-
end
|
56
|
+
value(:modified) {|b| b.frm.table(:class=>"itemSummary", :index=>1)[3][1].text }
|
108
57
|
|
109
58
|
end
|
@@ -12,7 +12,7 @@ class Aliases < BasePage
|
|
12
12
|
action(:last) { |b| b.frm.button(:name=>"eventSubmit_doList_last").click }
|
13
13
|
action(:previous) { |b| b.frm.button(name=>"eventSubmit_doList_prev").click }
|
14
14
|
action(:first) { |b| b.frm.button(:name=>"eventSubmit_doList_first").click }
|
15
|
-
|
15
|
+
link("New Alias")
|
16
16
|
action(:search_button) { |b| b.frm.button(:text=>"Search").click }
|
17
17
|
element(:select_page_size) { |b| b.frm.select(:id=>"selectPageSize") }
|
18
18
|
|
@@ -35,7 +35,8 @@ class EditAlias < BasePage
|
|
35
35
|
|
36
36
|
frame_element
|
37
37
|
|
38
|
-
|
38
|
+
link("Remove Alias")
|
39
|
+
|
39
40
|
element(:target) { |b| b.frm.text_field(:id=>"target") }
|
40
41
|
action(:save) { |b| b.frm.button(:name=>"eventSubmit_doSave").click }
|
41
42
|
action(:cancel) { |b| b.frm.button(:name=>"eventSubmit_doCancel").click }
|
@@ -8,13 +8,9 @@ class Announcements < BasePage
|
|
8
8
|
|
9
9
|
# Edits the specified announcement in the list.
|
10
10
|
# @param subject [String] the text of the announcement listing link.
|
11
|
-
|
12
|
-
frm.table(:class=>"listHier").row(:text=>/#{Regexp.escape(subject)}/).link(:text=>"Edit").click
|
13
|
-
end
|
11
|
+
action(:edit) { |subject, b| b.frm.table(:class=>"listHier").row(:text=>/#{Regexp.escape(subject)}/).link(:text=>"Edit").click }
|
14
12
|
|
15
|
-
|
16
|
-
frm.link(:text=>title).click
|
17
|
-
end
|
13
|
+
action(:view) { |title, b| b.frm.link(:text=>title).click }
|
18
14
|
|
19
15
|
# Returns an array of the subject strings of the announcements
|
20
16
|
# listed on the page.
|
@@ -25,9 +21,7 @@ class Announcements < BasePage
|
|
25
21
|
return subjects
|
26
22
|
end
|
27
23
|
|
28
|
-
|
29
|
-
frm.link(:text=>subject).href
|
30
|
-
end
|
24
|
+
action(:href) { |subject, b| b.frm.link(:text=>subject).href }
|
31
25
|
|
32
26
|
# Returns true or false depending on whether the specified announcement has an attachment.
|
33
27
|
# @param subject [String] the text of the announcement listing link.
|
@@ -43,15 +37,11 @@ class Announcements < BasePage
|
|
43
37
|
# Returns the text of the "For" column for
|
44
38
|
# the specified announcement.
|
45
39
|
# @param subject [String] the text of the announcement listing link.
|
46
|
-
|
47
|
-
frm.table(:class=>"listHier").row(:text=>/#{Regexp.escape(subject)}/)[4].text
|
48
|
-
end
|
40
|
+
action(:for_column) { |subject, b| b.frm.table(:class=>"listHier").row(:text=>/#{Regexp.escape(subject)}/)[4].text }
|
49
41
|
|
50
42
|
# Clicks the specified announcement link and instantiates the PreviewAnnouncements class.
|
51
43
|
# @param subject [String] the text of the announcement listing link.
|
52
|
-
|
53
|
-
frm.link(:text=>subject).click
|
54
|
-
end
|
44
|
+
action(:preview_announcement) { |subject, b| b.frm.link(:text=>subject).click }
|
55
45
|
|
56
46
|
# Selects the specified list item from the View selection list.
|
57
47
|
# @param list_item [String] the text of the option in the selection list.
|
@@ -60,7 +50,7 @@ class Announcements < BasePage
|
|
60
50
|
end
|
61
51
|
|
62
52
|
# Clicks the Merge link and goes to the AnnouncementsMerge class.
|
63
|
-
|
53
|
+
link("Merge")
|
64
54
|
|
65
55
|
end
|
66
56
|
|
@@ -72,12 +62,10 @@ class AnnouncementsMerge < BasePage
|
|
72
62
|
|
73
63
|
# Checks the checkbox for the specified site name
|
74
64
|
# @param site_name [String] the name of the relevant site displayed in the table
|
75
|
-
|
76
|
-
frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(site_name)}/).checkbox(:id=>/site/).set
|
77
|
-
end
|
65
|
+
action(:check) { |site_name, b| b.frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(site_name)}/).checkbox(:id=>/site/).set }
|
78
66
|
|
79
67
|
# Clicks the Save button and goes to the Announcements class.
|
80
|
-
|
68
|
+
button("Save")
|
81
69
|
|
82
70
|
end
|
83
71
|
|
@@ -88,13 +76,13 @@ class ViewAnnouncement < BasePage
|
|
88
76
|
frame_element
|
89
77
|
|
90
78
|
# Clicks the Return to list button and goes to the Announcements class.
|
91
|
-
|
79
|
+
button("Return to List")
|
92
80
|
|
93
81
|
# Clicks the Save changes button and goes to the Announcements class.
|
94
|
-
|
82
|
+
button("Save Changes")
|
95
83
|
|
96
84
|
# Clicks the Edit button and goes to the AddEditAnnouncements class.
|
97
|
-
|
85
|
+
button("Edit")
|
98
86
|
|
99
87
|
value(:subject) { |b| b.frm.table(class: "itemSummary")[0][1].text }
|
100
88
|
value(:saved_by) { |b| b.frm.table(class: "itemSummary")[1][1].text }
|
@@ -117,14 +105,13 @@ class AddEditAnnouncements < BasePage
|
|
117
105
|
|
118
106
|
# Clicks the Add Announcement button. The next class is either
|
119
107
|
# AddEditAnnouncements or Announcements.
|
120
|
-
|
108
|
+
button("Add Announcement")
|
121
109
|
|
122
110
|
# Clicks the Save changes button. Next is the Announcements class.
|
123
|
-
|
111
|
+
button("Save Changes")
|
124
112
|
|
125
113
|
# Clicks the Preview button. Next is the PreviewAnnouncements class.
|
126
|
-
|
127
|
-
|
114
|
+
button("Preview")
|
128
115
|
|
129
116
|
# Sends the specified text block to the rich text editor
|
130
117
|
# @param text [String] the text that you want to add to the editor.
|
@@ -133,15 +120,13 @@ class AddEditAnnouncements < BasePage
|
|
133
120
|
end
|
134
121
|
|
135
122
|
# Clicks the Add attachments button. Next is the Announcments Attach class.
|
136
|
-
|
123
|
+
button("Add Attachments")
|
137
124
|
|
138
125
|
# Clicks the checkbox for the specified group name
|
139
126
|
# when you've set the announcement access to display
|
140
127
|
# to groups.
|
141
128
|
# @param group_name [String] the name of the group in the table that you intend to select.
|
142
|
-
|
143
|
-
frm.table(:id=>"groupTable").row(:text=>/#{Regexp.escape(group_name)}/).checkbox(:name=>"selectedGroups").set
|
144
|
-
end
|
129
|
+
action(:check_group) { |group_name, b| b.frm.table(:id=>"groupTable").row(:text=>/#{Regexp.escape(group_name)}/).checkbox(:name=>"selectedGroups").set }
|
145
130
|
|
146
131
|
element(:title) { |b| b.frm.text_field(:id=>"subject") }
|
147
132
|
element(:site_members) { |b| b.frm.radio(:id=>"site") }
|