sakai-cle-test-api 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'kuali-sakai-common-lib'
4
3
  gem 'watir-webdriver'
5
4
  gem 'selenium-webdriver'
6
- gem 'page-object'
7
5
  gem 'rake'
data/README.md CHANGED
@@ -13,7 +13,6 @@ Ruby and Watir-webdriver--but without needing to know either in detail.
13
13
 
14
14
  ### Ruby Gems:
15
15
  [Watir-Webdriver](http://www.watirwebdriver.com)
16
- [Page-Object](https://github.com/cheezy/page-object)
17
16
 
18
17
  If you're just going to use the API for testing, then simply install it as you would any other Ruby gem: `gem install sakai-cle-test-api`
19
18
 
@@ -33,7 +32,7 @@ sakai = SakaiCLE.new(:chrome, "https://cle-1.qa.rsmart.com/xsl-portal")
33
32
  workspace = sakai.login("username", "password")
34
33
  ````
35
34
 
36
- For much more extensive examples of using this API, please see the CLE Cucumber directory in this repo.
35
+ For much more extensive examples of using this API, please see the CLE Cucumber directory in this repo. (Coming soon...)
37
36
 
38
37
  ## Contribute
39
38
 
@@ -78,7 +78,7 @@ class AssignmentObject
78
78
  if @status=="Draft"
79
79
  list.open_assignment "Draft - #{@title}"
80
80
  else
81
- list.open_assignment @title
81
+ list.edit_assignment @title
82
82
  end
83
83
  end
84
84
  on AssignmentAdd do |edit|
@@ -0,0 +1,41 @@
1
+ # Note that this class is for icon-sakai-forums. NOT jforums.
2
+ class ForumObject
3
+
4
+ include PageHelper
5
+ include Utilities
6
+ include Workflows
7
+
8
+ attr_accessor :site, :title, :short_description, :description
9
+
10
+ def initialize(browser, opts={})
11
+ @browser = browser
12
+
13
+ defaults = {
14
+ :title=>random_alphanums
15
+ }
16
+ options = defaults.merge(opts)
17
+
18
+ @site=options[:site]
19
+ @title=options[:title]
20
+ @short_description=options[:short_description]
21
+ @description=options[:description]
22
+ raise "You need to specify a site for your Forum" if @site==nil
23
+ end
24
+
25
+ def create
26
+
27
+ end
28
+
29
+ def edit opts={}
30
+
31
+ end
32
+
33
+ def view
34
+
35
+ end
36
+
37
+ def delete
38
+
39
+ end
40
+
41
+ end
@@ -0,0 +1,57 @@
1
+ class MessageObject
2
+
3
+ include PageHelper
4
+ include Utilities
5
+ include Workflows
6
+
7
+ attr_accessor :site, :subject, :send_cc, :recipients, :message, :label
8
+
9
+ def initialize(browser, opts={})
10
+ @browser = browser
11
+
12
+ defaults = {
13
+ :subject=>random_alphanums,
14
+ :recipients=>["All Participants"]
15
+ }
16
+ options = defaults.merge(opts)
17
+
18
+ @subject=options[:subject]
19
+ @recipients=options[:recipients]
20
+ @site=options[:site]
21
+ @message=options[:message]
22
+ @label=options[:label]
23
+ raise "You need to specify a site for your web content" if @site==nil
24
+ end
25
+
26
+ def create
27
+ open_my_site_by_name @site unless @browser.title=~/#{@site}/
28
+ messages unless @browser.title=~/Messages$/
29
+ end
30
+
31
+ alias compose create
32
+
33
+
34
+
35
+ end
36
+
37
+ class MessageFolderObject
38
+
39
+ include PageHelper
40
+ include Utilities
41
+ include Workflows
42
+
43
+ attr_accessor :site
44
+
45
+ def initialize(browser, opts={})
46
+ @browser = browser
47
+
48
+ defaults = {}
49
+
50
+ end
51
+
52
+ def create
53
+
54
+
55
+ end
56
+
57
+ end
@@ -46,7 +46,7 @@ class WikiObject
46
46
  on Rwiki do |edit|
47
47
  edit.open_wiki @title
48
48
  edit.edit
49
- # more here
49
+ # TODO more here
50
50
  end
51
51
  end
52
52
 
@@ -197,11 +197,10 @@ class AssignmentsList < AssignmentsBase
197
197
  end
198
198
 
199
199
  # Clicks the Edit link for the Assignment specified.
200
- # Then it instantiates the AssignmentAdd page class.
200
+ # next is the AssignmentAdd page class.
201
201
  def edit_assignment(assignment_name)
202
202
  index = assignments_titles.index(assignment_name)
203
203
  frm.link(:text=>"Edit", :index=>index).click
204
- AssignmentAdd.new(@browser)
205
204
  end
206
205
 
207
206
  # Checks the appropriate checkbox, based on the specified assignment_name
@@ -87,13 +87,13 @@ module Utilities
87
87
  # the method does not allow the line count to be larger than
88
88
  # the word count and will "fix" it if it is).
89
89
  #
90
- # If no arguments are provided, the method will return two alphanumeric
90
+ # If no parameters are provided, the method will return two alphanumeric
91
91
  # "words" on two lines.
92
92
  #
93
- # The last argument the method takes will determine the character content
93
+ # The last parameter the method takes will determine the character content
94
94
  # of the string, viz.:
95
95
  #
96
- # :alpha => Alphanumeric -> uses the random_alphanums method
96
+ # :alpha => "Alphanumeric" - Uses the random_alphanums method
97
97
  # :string => uses the random_string method, so chars 33 through 128 will be included
98
98
  # :ascii => All ASCII chars from 33 to 256 are fair game -> uses random_high_ascii
99
99
  def random_multiline(word_count=2, line_count=2, char_type=:alpha)
@@ -111,7 +111,7 @@ module Utilities
111
111
  non_words.shuffle! # Have to shuffle the line feeds around!
112
112
  array = words.zip(non_words)
113
113
  array.flatten!
114
- return array.join("")
114
+ array.join("")
115
115
  end
116
116
 
117
117
  # Picks at random from the list of XSS test strings, using
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'sakai-cle-test-api'
3
- s.version = '0.1.0'
3
+ s.version = '0.1.1'
4
4
  s.summary = %q{Sakai-CLE functional testing API for the rSmart Collaborative Learning Environment}
5
5
  s.description = %q{The Sakai-CLE gem provides an API for interacting with pages and page elements in rSmart's deployment of the Sakai Collaborative Learning Environment.}
6
6
  s.files = Dir.glob("**/**/**")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sakai-cle-test-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-21 00:00:00.000000000 Z
12
+ date: 2012-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: watir-webdriver
@@ -58,7 +58,9 @@ files:
58
58
  - lib/sakai-cle-test-api/data_objects/assessment.rb
59
59
  - lib/sakai-cle-test-api/data_objects/assignment.rb
60
60
  - lib/sakai-cle-test-api/data_objects/event.rb
61
+ - lib/sakai-cle-test-api/data_objects/forum.rb
61
62
  - lib/sakai-cle-test-api/data_objects/lesson.rb
63
+ - lib/sakai-cle-test-api/data_objects/message.rb
62
64
  - lib/sakai-cle-test-api/data_objects/resource.rb
63
65
  - lib/sakai-cle-test-api/data_objects/site.rb
64
66
  - lib/sakai-cle-test-api/data_objects/syllabus.rb