sambal-cle 0.1.4 → 0.1.5
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.
- data/Gemfile +7 -0
- data/Gemfile.lock +44 -0
- data/lib/sambal-cle/data_objects/announcement.rb +7 -7
- data/lib/sambal-cle/data_objects/assessment.rb +26 -77
- data/lib/sambal-cle/data_objects/assessment_submission.rb +26 -0
- data/lib/sambal-cle/data_objects/assignment.rb +40 -40
- data/lib/sambal-cle/data_objects/assignment_permissions.rb +4 -4
- data/lib/sambal-cle/data_objects/assignment_submission.rb +4 -4
- data/lib/sambal-cle/data_objects/blog.rb +2 -2
- data/lib/sambal-cle/data_objects/blogger.rb +3 -3
- data/lib/sambal-cle/data_objects/chat_room.rb +2 -2
- data/lib/sambal-cle/data_objects/{site.rb → course.rb} +24 -20
- data/lib/sambal-cle/data_objects/event.rb +4 -4
- data/lib/sambal-cle/data_objects/forum.rb +21 -22
- data/lib/sambal-cle/data_objects/glossary_term.rb +71 -0
- data/lib/sambal-cle/data_objects/lesson.rb +10 -9
- data/lib/sambal-cle/data_objects/matrix.rb +142 -0
- data/lib/sambal-cle/data_objects/message.rb +2 -2
- data/lib/sambal-cle/data_objects/poll.rb +2 -2
- data/lib/sambal-cle/data_objects/portfolio.rb +120 -0
- data/lib/sambal-cle/data_objects/questions.rb +690 -0
- data/lib/sambal-cle/data_objects/resource.rb +12 -12
- data/lib/sambal-cle/data_objects/syllabus.rb +7 -7
- data/lib/sambal-cle/data_objects/web_content_tool.rb +2 -2
- data/lib/sambal-cle/data_objects/wiki.rb +6 -6
- data/lib/sambal-cle/page_objects/assessments.rb +165 -157
- data/lib/sambal-cle/page_objects/assignments.rb +17 -17
- data/lib/sambal-cle/page_objects/glossary.rb +14 -64
- data/lib/sambal-cle/page_objects/matrix.rb +77 -113
- data/lib/sambal-cle/page_objects/portfolios.rb +0 -2
- data/lib/sambal-cle/page_objects/resources.rb +4 -4
- data/lib/sambal-cle/page_objects/site_setup.rb +31 -23
- data/lib/sambal-cle/page_objects/sites.rb +2 -12
- data/lib/sambal-cle/utilities.rb +0 -6
- data/lib/sambal-cle/workflows.rb +77 -76
- data/lib/sambal-cle.rb +2 -2
- data/sambal-cle.gemspec +2 -2
- data/test/add_assignment_to_calendar_spec.rb +4 -4
- data/test/assessment_create_spec.rb +1 -1
- data/test/assessment_feedback_spec.rb +78 -0
- data/test/assessment_publish_spec.rb +102 -0
- data/test/assignment_announcements_spec.rb +4 -4
- data/test/assignment_duplicate_spec.rb +4 -4
- data/test/assignment_gradebook_spec.rb +4 -4
- data/test/assignment_permissions_spec.rb +5 -5
- data/test/assignments_grading_spec.rb +4 -4
- data/test/assignments_submission_spec.rb +4 -4
- data/test/duplicate_site_spec.rb +2 -2
- data/test/glossary_term_create_spec.rb +71 -0
- data/test/import_site_content_spec.rb +3 -3
- data/test/test_spec.rb +51 -0
- metadata +16 -5
@@ -15,7 +15,7 @@ describe "Assignments grading" do
|
|
15
15
|
# Get the test configuration data
|
16
16
|
@config = YAML.load_file("config.yml")
|
17
17
|
@directory = YAML.load_file("directory.yml")
|
18
|
-
@sakai =
|
18
|
+
@sakai = SambalCLE.new(@config['browser'], @config['url'])
|
19
19
|
@browser = @sakai.browser
|
20
20
|
|
21
21
|
@student = make UserObject, :id=>@directory['person1']['id'], :password=>@directory['person1']['password'],
|
@@ -28,10 +28,10 @@ describe "Assignments grading" do
|
|
28
28
|
:type=>"Instructor"
|
29
29
|
@instructor1.log_in
|
30
30
|
|
31
|
-
@site = make
|
31
|
+
@site = make CourseSiteObject
|
32
32
|
@site.create
|
33
|
-
@site.add_official_participants
|
34
|
-
@site.add_official_participants
|
33
|
+
@site.add_official_participants @student.type, @student.id
|
34
|
+
@site.add_official_participants @instructor2.type, @instructor2.id
|
35
35
|
|
36
36
|
@assignment = make AssignmentObject, :site=>@site.name, :title=>random_string(25),
|
37
37
|
:open=>an_hour_ago, :grade_scale=>"Pass",
|
@@ -16,7 +16,7 @@ describe "Assignments Submission" do
|
|
16
16
|
# Get the test configuration data
|
17
17
|
@config = YAML.load_file("config.yml")
|
18
18
|
@directory = YAML.load_file("directory.yml")
|
19
|
-
@sakai =
|
19
|
+
@sakai = SambalCLE.new(@config['browser'], @config['url'])
|
20
20
|
@browser = @sakai.browser
|
21
21
|
|
22
22
|
@student = make UserObject, :id=>@directory['person1']['id'], :password=>@directory['person1']['password'],
|
@@ -29,10 +29,10 @@ describe "Assignments Submission" do
|
|
29
29
|
:type=>"Instructor"
|
30
30
|
@instructor1.log_in
|
31
31
|
|
32
|
-
@site = make
|
32
|
+
@site = make CourseSiteObject
|
33
33
|
@site.create
|
34
|
-
@site.add_official_participants
|
35
|
-
@site.add_official_participants
|
34
|
+
@site.add_official_participants @student.type, @student.id
|
35
|
+
@site.add_official_participants @instructor2.type, @instructor2.id
|
36
36
|
|
37
37
|
@assignment = make AssignmentObject, :site=>@site.name, :title=>random_string(25),
|
38
38
|
:open=>an_hour_ago, :grade_scale=>"Pass",
|
data/test/duplicate_site_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe "Duplicate Site" do
|
|
13
13
|
# Get the test configuration data
|
14
14
|
@config = YAML.load_file("config.yml")
|
15
15
|
@directory = YAML.load_file("directory.yml")
|
16
|
-
@sakai =
|
16
|
+
@sakai = SambalCLE.new(@config['browser'], @config['url'])
|
17
17
|
@browser = @sakai.browser
|
18
18
|
# This test case uses the logins of several users
|
19
19
|
@instructor = @directory['person3']['id']
|
@@ -24,7 +24,7 @@ describe "Duplicate Site" do
|
|
24
24
|
# Log in to Sakai
|
25
25
|
@sakai.page.login(@instructor, @ipassword)
|
26
26
|
|
27
|
-
@site1 = make
|
27
|
+
@site1 = make CourseSiteObject, :description=>"Original Site"
|
28
28
|
@site1.create
|
29
29
|
|
30
30
|
@source_site_string << "<br />\n<br />\nSite ID: #{@site1.id}<br />\n<br />\n"
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'sambal-cle'
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
describe "Portfolio Glossary Term CRUD" do
|
6
|
+
|
7
|
+
include Workflows
|
8
|
+
include Foundry
|
9
|
+
include StringFactory
|
10
|
+
include DateFactory
|
11
|
+
|
12
|
+
before :all do
|
13
|
+
# Get the test configuration data
|
14
|
+
@config = YAML.load_file("config.yml")
|
15
|
+
@directory = YAML.load_file("directory.yml")
|
16
|
+
@sakai = SambalCLE.new(@config['browser'], @config['url'])
|
17
|
+
@browser = @sakai.browser
|
18
|
+
|
19
|
+
@instructor = make UserObject, :id=>@directory['person3']['id'], :password=>@directory['person3']['password'],
|
20
|
+
:first_name=>@directory['person3']['firstname'], :last_name=>@directory['person3']['lastname'],
|
21
|
+
:type=>"Instructor"
|
22
|
+
@student = make UserObject, :id=>@directory['person1']['id'], :password=>@directory['person1']['password'],
|
23
|
+
:first_name=>@directory['person1']['firstname'], :last_name=>@directory['person1']['lastname']
|
24
|
+
@student2 = make UserObject, :id=>@directory['person2']['id'], :password=>@directory['person2']['password'],
|
25
|
+
:first_name=>@directory['person2']['firstname'], :last_name=>@directory['person2']['lastname']
|
26
|
+
@instructor.log_in
|
27
|
+
@portfolio = make PortfolioSiteObject
|
28
|
+
@portfolio.create
|
29
|
+
@portfolio.add_official_participants "Participant", @student.id, @student2.id
|
30
|
+
@term1 = make GlossaryTermObject, :portfolio=>@portfolio.title
|
31
|
+
@term1.create
|
32
|
+
@term2 = make GlossaryTermObject, :portfolio=>@portfolio.title
|
33
|
+
@term2.create
|
34
|
+
@term3 = make GlossaryTermObject, :portfolio=>@portfolio.title
|
35
|
+
@term3.create
|
36
|
+
end
|
37
|
+
|
38
|
+
after :all do
|
39
|
+
@browser.close
|
40
|
+
end
|
41
|
+
|
42
|
+
it "Terms can be created" do
|
43
|
+
on Glossary do |list|
|
44
|
+
list.terms.should include @term1.term
|
45
|
+
list.terms.should include @term2.term
|
46
|
+
list.terms.should include @term3.term
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
it "Terms can be updated" do
|
51
|
+
@term1.edit :term=>random_alphanums, :short_description=>random_alphanums, :long_description=>random_alphanums
|
52
|
+
on Glossary do |list|
|
53
|
+
list.terms.should include @term1.term
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
it "Terms can be deleted" do
|
58
|
+
@term2.delete
|
59
|
+
on Glossary do |list|
|
60
|
+
list.terms.should_not include @term2.term
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
it "Terms can be read" do
|
65
|
+
@instructor.log_out
|
66
|
+
@student.log_in
|
67
|
+
@term1.open
|
68
|
+
@browser.text.should include @term1.long_description
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
@@ -13,7 +13,7 @@ describe "Import Site" do
|
|
13
13
|
# Get the test configuration data
|
14
14
|
@config = YAML.load_file("config.yml")
|
15
15
|
@directory = YAML.load_file("directory.yml")
|
16
|
-
@sakai =
|
16
|
+
@sakai = SambalCLE.new(@config['browser'], @config['url'])
|
17
17
|
@browser = @sakai.browser
|
18
18
|
# This test case uses the logins of several users
|
19
19
|
@instructor = @directory['person3']['id']
|
@@ -25,7 +25,7 @@ describe "Import Site" do
|
|
25
25
|
# Log in to Sakai
|
26
26
|
@sakai.page.login(@instructor, @ipassword)
|
27
27
|
|
28
|
-
@site1 = make
|
28
|
+
@site1 = make CourseSiteObject, :description=>"Original Site"
|
29
29
|
@site1.create
|
30
30
|
|
31
31
|
@source_site_string << "<br />\n<br />\nSite ID: #{@site1.id}<br />\n<br />\n"
|
@@ -131,7 +131,7 @@ describe "Import Site" do
|
|
131
131
|
|
132
132
|
@section1.edit :editor_content=>@source_site_string
|
133
133
|
|
134
|
-
@site2 = make
|
134
|
+
@site2 = make CourseSiteObject
|
135
135
|
@site2.create_and_reuse_site @site1.name
|
136
136
|
|
137
137
|
@new_assignment = make AssignmentObject, :site=>@site2.name, :status=>"Draft", :title=>@assignment.title
|
data/test/test_spec.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'sambal-cle'
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
describe "Matrix CRUD" do
|
6
|
+
|
7
|
+
include Workflows
|
8
|
+
include Foundry
|
9
|
+
include StringFactory
|
10
|
+
include DateFactory
|
11
|
+
|
12
|
+
before :all do
|
13
|
+
# Get the test configuration data
|
14
|
+
@config = YAML.load_file("config.yml")
|
15
|
+
@directory = YAML.load_file("directory.yml")
|
16
|
+
@sakai = SambalCLE.new(@config['browser'], @config['url'])
|
17
|
+
@browser = @sakai.browser
|
18
|
+
|
19
|
+
@instructor = make UserObject, :id=>@directory['person3']['id'], :password=>@directory['person3']['password'],
|
20
|
+
:first_name=>@directory['person3']['firstname'], :last_name=>@directory['person3']['lastname'],
|
21
|
+
:type=>"Instructor"
|
22
|
+
@student = make UserObject, :id=>@directory['person1']['id'], :password=>@directory['person1']['password'],
|
23
|
+
:first_name=>@directory['person1']['firstname'], :last_name=>@directory['person1']['lastname']
|
24
|
+
@student2 = make UserObject, :id=>@directory['person2']['id'], :password=>@directory['person2']['password'],
|
25
|
+
:first_name=>@directory['person2']['firstname'], :last_name=>@directory['person2']['lastname']
|
26
|
+
@instructor.log_in
|
27
|
+
@portfolio = make PortfolioSiteObject
|
28
|
+
@portfolio.create
|
29
|
+
@portfolio.add_official_participants "Participant", @student.id, @student2.id
|
30
|
+
|
31
|
+
@matrix = make MatrixObject, :portfolio=>@portfolio.title
|
32
|
+
@matrix.create
|
33
|
+
end
|
34
|
+
|
35
|
+
after :all do
|
36
|
+
@browser.close
|
37
|
+
end
|
38
|
+
|
39
|
+
it "Matrices can be created" do
|
40
|
+
on Matrices do |page|
|
41
|
+
page.matrices_list.should include @matrix.title
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
it "Matrix cells can be edited" do
|
46
|
+
on Matrices do |page|
|
47
|
+
page.edit @matrix.title
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sambal-cle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: test-factory
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.0.
|
22
|
+
version: 0.0.7
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ! '>='
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 0.0.
|
30
|
+
version: 0.0.7
|
31
31
|
description: This gem is used for creating test scripts for the Sakai Collaborative
|
32
32
|
Learning Environment.
|
33
33
|
email:
|
@@ -37,22 +37,29 @@ executables: []
|
|
37
37
|
extensions: []
|
38
38
|
extra_rdoc_files: []
|
39
39
|
files:
|
40
|
+
- Gemfile
|
41
|
+
- Gemfile.lock
|
40
42
|
- lib/sambal-cle/base_page.rb
|
41
43
|
- lib/sambal-cle/data_objects/announcement.rb
|
42
44
|
- lib/sambal-cle/data_objects/assessment.rb
|
45
|
+
- lib/sambal-cle/data_objects/assessment_submission.rb
|
43
46
|
- lib/sambal-cle/data_objects/assignment.rb
|
44
47
|
- lib/sambal-cle/data_objects/assignment_permissions.rb
|
45
48
|
- lib/sambal-cle/data_objects/assignment_submission.rb
|
46
49
|
- lib/sambal-cle/data_objects/blog.rb
|
47
50
|
- lib/sambal-cle/data_objects/blogger.rb
|
48
51
|
- lib/sambal-cle/data_objects/chat_room.rb
|
52
|
+
- lib/sambal-cle/data_objects/course.rb
|
49
53
|
- lib/sambal-cle/data_objects/event.rb
|
50
54
|
- lib/sambal-cle/data_objects/forum.rb
|
55
|
+
- lib/sambal-cle/data_objects/glossary_term.rb
|
51
56
|
- lib/sambal-cle/data_objects/lesson.rb
|
57
|
+
- lib/sambal-cle/data_objects/matrix.rb
|
52
58
|
- lib/sambal-cle/data_objects/message.rb
|
53
59
|
- lib/sambal-cle/data_objects/poll.rb
|
60
|
+
- lib/sambal-cle/data_objects/portfolio.rb
|
61
|
+
- lib/sambal-cle/data_objects/questions.rb
|
54
62
|
- lib/sambal-cle/data_objects/resource.rb
|
55
|
-
- lib/sambal-cle/data_objects/site.rb
|
56
63
|
- lib/sambal-cle/data_objects/syllabus.rb
|
57
64
|
- lib/sambal-cle/data_objects/user.rb
|
58
65
|
- lib/sambal-cle/data_objects/web_content_tool.rb
|
@@ -119,6 +126,8 @@ files:
|
|
119
126
|
- sambal-cle.gemspec
|
120
127
|
- test/add_assignment_to_calendar_spec.rb
|
121
128
|
- test/assessment_create_spec.rb
|
129
|
+
- test/assessment_feedback_spec.rb
|
130
|
+
- test/assessment_publish_spec.rb
|
122
131
|
- test/assignment_announcements_spec.rb
|
123
132
|
- test/assignment_duplicate_spec.rb
|
124
133
|
- test/assignment_gradebook_spec.rb
|
@@ -130,7 +139,9 @@ files:
|
|
130
139
|
- test/directory.yml
|
131
140
|
- test/directory.yml.template
|
132
141
|
- test/duplicate_site_spec.rb
|
142
|
+
- test/glossary_term_create_spec.rb
|
133
143
|
- test/import_site_content_spec.rb
|
144
|
+
- test/test_spec.rb
|
134
145
|
homepage: https://github.com/rSmart
|
135
146
|
licenses: []
|
136
147
|
post_install_message:
|