kuality 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "rspec"
4
+ gem "cucumber"
5
+ gem "test-factory", ">=0.0.7"
6
+ gem "watir-webdriver", ">=0.6.1"
data/Gemfile.lock ADDED
@@ -0,0 +1,47 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ addressable (2.3.2)
5
+ builder (3.0.4)
6
+ childprocess (0.3.6)
7
+ ffi (~> 1.0, >= 1.0.6)
8
+ cucumber (1.2.1)
9
+ builder (>= 2.1.2)
10
+ diff-lcs (>= 1.1.3)
11
+ gherkin (~> 2.11.0)
12
+ json (>= 1.4.6)
13
+ diff-lcs (1.1.3)
14
+ ffi (1.1.5)
15
+ gherkin (2.11.5)
16
+ json (>= 1.4.6)
17
+ json (1.7.5)
18
+ libwebsocket (0.1.5)
19
+ addressable
20
+ multi_json (1.3.7)
21
+ rspec (2.11.0)
22
+ rspec-core (~> 2.11.0)
23
+ rspec-expectations (~> 2.11.0)
24
+ rspec-mocks (~> 2.11.0)
25
+ rspec-core (2.11.1)
26
+ rspec-expectations (2.11.3)
27
+ diff-lcs (~> 1.1.3)
28
+ rspec-mocks (2.11.3)
29
+ rubyzip (0.9.9)
30
+ selenium-webdriver (2.26.0)
31
+ childprocess (>= 0.2.5)
32
+ libwebsocket (~> 0.1.3)
33
+ multi_json (~> 1.0)
34
+ rubyzip
35
+ test-factory (0.0.7)
36
+ watir-webdriver (>= 0.6.1)
37
+ watir-webdriver (0.6.1)
38
+ selenium-webdriver (>= 2.18.0)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ cucumber
45
+ rspec
46
+ test-factory (>= 0.0.7)
47
+ watir-webdriver (>= 0.6.1)
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+ Kuality
2
+ =======
3
+
4
+ Open source test automation framework for the Kuali Coeus Project. Please see the documentation for [test factory](http://rubygems.org/gems/test-factory) to get the usage basics.
5
+
6
+ More to come...
7
+
8
+ ## Contribute
9
+
10
+ * Fork the project.
11
+ * Additional or bug-fixed Classes, Elements, or Methods should be demonstrated in accompanying tests. Pull requests that do not include test scripts that use the new code are less likely to be accepted.
12
+ * Make sure you provide RDoc comments for any new public method or page class you add. Remember, others will be using this code.
13
+ * Send a pull request. Bonus points for topic branches.
14
+
15
+ Copyright 2012 The Kuali Foundation
16
+
17
+ Licensed under the Educational Community License, Version 2.0 (the "License");
18
+ you may not use this file except in compliance with the License.
19
+ You may obtain a copy of the License at
20
+
21
+ http://www.osedu.org/licenses/ECL-2.0
22
+
23
+ Unless required by applicable law or agreed to in writing,
24
+ software distributed under the License is distributed on an "AS IS"
25
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
26
+ or implied. See the License for the specific language governing
27
+ permissions and limitations under the License.
data/kuality.gemspec ADDED
@@ -0,0 +1,13 @@
1
+ spec = Gem::Specification.new do |s|
2
+ s.name = 'kuality'
3
+ s.version = '0.0.1'
4
+ s.summary = %q{rSmart's test framework for BDD testing of Kuali Coeus}
5
+ s.description = %q{This gem is used for creating test scripts for Kuali Coeus.}
6
+ s.files = Dir.glob("**/**/**")
7
+ s.files.reject! { |file_name| file_name =~ /.yml$/ }
8
+ s.authors = ["Abraham Heward", "Jon Utter"]
9
+ s.email = %w{"aheward@rsmart.com" "jutter@rsmart.com"}
10
+ s.homepage = 'https://github.com/rSmart'
11
+ s.add_dependency 'test-factory', '>= 0.0.9'
12
+ s.required_ruby_version = '>= 1.9.3'
13
+ end
data/lib/kuality.rb ADDED
@@ -0,0 +1,23 @@
1
+ require 'cgi'
2
+ require 'test-factory'
3
+ Dir["#{File.dirname(__FILE__)}/rfabric_test/*.rb"].each {|f| require f }
4
+ Dir["#{File.dirname(__FILE__)}/rfabric_test/page_objects/*.rb"].each {|f| require f }
5
+ Dir["#{File.dirname(__FILE__)}/rfabric_test/data_objects/*.rb"].each {|f| require f }
6
+
7
+ # Initialize this class at the start of your test cases to
8
+ # open the specified test browser at the specified Sakai welcome page URL.
9
+ #
10
+ # The initialization will
11
+ # create the @browser variable used throughout the page classes
12
+ class Kuality
13
+
14
+ attr_reader :browser
15
+
16
+ def initialize(web_browser, url)
17
+ @browser = Watir::Browser.new web_browser
18
+ @browser.window.resize_to(1400,900)
19
+ @browser.goto url
20
+ $base_url=url
21
+ end
22
+
23
+ end
@@ -0,0 +1,16 @@
1
+ class BasePage < PageFactory
2
+
3
+ class << self
4
+
5
+ def header_elements
6
+ link "Sign Out"
7
+ link "Reports"
8
+ value(:alert_box) { |b| b.p(class: "alert").text }
9
+ value(:user_name) { |b| b.li(class: "brand user-name").text }
10
+ end
11
+
12
+ # Any additional needed element group defs go here...
13
+
14
+ end
15
+
16
+ end
@@ -0,0 +1,11 @@
1
+ class ReportList < BasePage
2
+
3
+ header_elements
4
+
5
+ def reports
6
+ reports = []
7
+ self.links(class: "lightbox_trigger").each { |link| reports << link.text }
8
+ reports
9
+ end
10
+
11
+ end
@@ -0,0 +1,9 @@
1
+ class ReportsBase < BasePage
2
+
3
+ header_elements
4
+
5
+ element(:jrvi) { |b| b.frame(id: "jasper-report-viewer-iframe") }
6
+
7
+ link "Click to close"
8
+
9
+ end
@@ -0,0 +1,15 @@
1
+ class SignIn < BasePage
2
+
3
+ element(:email) { |b| b.text_field(id: "user_email") }
4
+ element(:password) { |b| b.text_field(id: "user_password") }
5
+ element(:remember_me) { |b| b.checkbox(id: "user_remember_me") }
6
+
7
+ button "Sign in"
8
+ link "Sign up"
9
+ link "Forgot your password?"
10
+ link "Sign in with Google"
11
+ link "Sign in with Facebook"
12
+ link "Register"
13
+ link "Home"
14
+
15
+ end
@@ -0,0 +1,19 @@
1
+ class ToDoList < BasePage
2
+
3
+ header_elements
4
+
5
+ element(:list_toggle) { |b| b.link(data_original_title: "Calendar") }
6
+ element(:calendar_toggle) { |b| b.link(data_original_title: "List") }
7
+ element(:todo_list) { |b| b.div(class: "js-todo-list todo-list-body pull-left") }
8
+ element(:loading) { |b| b.div(class: "loading") }
9
+ #element(:pending_item_count) { |b| b.unk(unk: "unk") }
10
+
11
+ def items
12
+ items = []
13
+ self.divs(class: "pull-right todo-title").each do |div|
14
+ items << div.h4.text
15
+ end
16
+ items
17
+ end
18
+
19
+ end
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kuality
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Abraham Heward
9
+ - Jon Utter
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-12-11 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: test-factory
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 0.0.9
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 0.0.9
31
+ description: This gem is used for creating test scripts for Kuali Coeus.
32
+ email:
33
+ - ! '"aheward@rsmart.com"'
34
+ - ! '"jutter@rsmart.com"'
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - Gemfile
40
+ - Gemfile.lock
41
+ - kuality.gemspec
42
+ - lib/kuality/base_page.rb
43
+ - lib/kuality/page_objects/report_list.rb
44
+ - lib/kuality/page_objects/reports_base.rb
45
+ - lib/kuality/page_objects/sign_in.rb
46
+ - lib/kuality/page_objects/to_do_list.rb
47
+ - lib/kuality.rb
48
+ - README.md
49
+ homepage: https://github.com/rSmart
50
+ licenses: []
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: 1.9.3
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubyforge_project:
69
+ rubygems_version: 1.8.24
70
+ signing_key:
71
+ specification_version: 3
72
+ summary: rSmart's test framework for BDD testing of Kuali Coeus
73
+ test_files: []