sakai-cle-test-api 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -563,8 +563,8 @@ class AttachPageTools
563
563
  # data/sakai-cle-test-api folder or a subfolder therein)
564
564
  #
565
565
  # Does NOT instantiate any class, so use only when no page refresh occurs.
566
- def upload_file(filename)
567
- frm.file_field(:id=>"upload").set(File.expand_path(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + filename)
566
+ def upload_file(filename, filepath="")
567
+ frm.file_field(:id=>"upload").set(filepath + filename)
568
568
  if frm.div(:class=>"alertMessage").exist?
569
569
  sleep 2
570
570
  upload_file(filename)
@@ -576,8 +576,8 @@ class AttachPageTools
576
576
  #
577
577
  # Use this method ONLY for instances where there's a file field on the page
578
578
  # with an "upload" id.
579
- def upload_local_file(filename)
580
- frm.file_field(:id=>"upload").set(File.expand_path(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + filename)
579
+ def upload_local_file(filename, filepath="")
580
+ frm.file_field(:id=>"upload").set(filepath + filename)
581
581
  if frm.div(:class=>"alertMessage").exist?
582
582
  sleep 2
583
583
  upload_local_file(filename)
@@ -1140,8 +1140,8 @@ class ResourcesUploadFiles
1140
1140
  # multiple times, but it assumes
1141
1141
  # that the add_another_file method is used
1142
1142
  # before it, every time except before the first time.
1143
- def file_to_upload=(file_name)
1144
- frm.file_field(:id, "content_#{@@filex}").set(File.expand_path(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + file_name)
1143
+ def file_to_upload(file_name, file_path="")
1144
+ frm.file_field(:id, "content_#{@@filex}").set(file_path + file_name)
1145
1145
  @@filex+=1
1146
1146
  end
1147
1147
 
@@ -19,7 +19,7 @@ class SakaiCLE
19
19
  #include PageObject
20
20
  #include ToolsMenu
21
21
 
22
- attr_reader :browser, :page
22
+ attr_reader :browser
23
23
 
24
24
  def initialize(web_browser, url)
25
25
  @browser = Watir::Browser.new web_browser
@@ -1,13 +1,13 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'sakai-cle-test-api'
3
- s.version = '0.0.3'
3
+ s.version = '0.0.4'
4
4
  s.summary = %q{Sakai-CLE functional testing API for the rSmart Collaborative Learning Environment}
5
5
  s.description = %q{The Sakai-OAE 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("**/**/**")
7
7
  s.test_files = Dir.glob("test/*test_rb")
8
8
  s.authors = ["Abraham Heward"]
9
9
  s.email = %w{"aheward@rsmart.com"}
10
- s.homepage = 'https://github.com/aheward/Kuali-Sakai-Functional-Test-Automation-Framework/tree/Sakai-CLE/Sakai/CLE/API'
10
+ s.homepage = 'https://github.com/aheward/Kuali-Sakai-Functional-Test-Automation-Framework/tree/master/Sakai/CLE/API'
11
11
  s.add_dependency 'page-object', '>= 0.6.6'
12
12
  s.add_dependency 'watir-webdriver', '>= 0.5.5'
13
13
  s.add_dependency 'selenium-webdriver', '>= 2.21.2'
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.0.3
4
+ version: 0.0.4
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-05-14 00:00:00.000000000 Z
12
+ date: 2012-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: page-object
@@ -92,7 +92,7 @@ files:
92
92
  - lib/sakai-cle-test-api.rb
93
93
  - README.md
94
94
  - sakai-cle-test-api.gemspec
95
- homepage: https://github.com/aheward/Kuali-Sakai-Functional-Test-Automation-Framework/tree/Sakai-CLE/Sakai/CLE/API
95
+ homepage: https://github.com/aheward/Kuali-Sakai-Functional-Test-Automation-Framework/tree/master/Sakai/CLE/API
96
96
  licenses: []
97
97
  post_install_message:
98
98
  rdoc_options: []