legoTech_gem 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 184a880c5427d20c2ea97ede00f70711c75d815f736513ee2ccd5d3b4b53a66a
4
- data.tar.gz: db8910637b4d0c09556ef05257bf181644eb80e088cd7ec8365bcf68c6bcbc96
3
+ metadata.gz: e8dcdf8b4ace38d60ede6edb10f3b3022e5b7891b4cea351a305764a55b66562
4
+ data.tar.gz: e78be33f3e91b37cb8b88c25c2150d50fe68f1a821fe58fa7e7bfa02367ec5a6
5
5
  SHA512:
6
- metadata.gz: 2eb81f3c6efea456435f2265b113d2794311dcfc095bde67de725506168d50cc544f22b97dcbf9326482481c438ce70dce3970b0a09d08f0fdc9e81a6ffc1d92
7
- data.tar.gz: b4a3db5b4d84581796e6e66f30c4cf43a52d5066b652e339e982ddf601aecd9fa25fc72781c666457329e1d096dc8c5c2192792ea4367fbf5c93897b946478d0
6
+ metadata.gz: 861a511b1372060f3fd766b02584c8b99968ae740bbdad1044f5e7f4d653d3cf2f0567b8bb6fe0570c5db91fcf6524b94fddcf24d6dab78bdea0e4b679c695e0
7
+ data.tar.gz: 02ff6ea3d4c1356f2961b7fdc8b4677425c872d30bf87c60ab81028ced7e306817f2e8f22f6db0953e6162e992dc8ea45f45bc0a846adcd83b95a9cf5c822dbc
data/legoTech.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "legoTech_gem"
3
- spec.version = "0.0.3"
3
+ spec.version = "0.0.4"
4
4
  spec.authors = ["Patrique Legault"]
5
5
  spec.email = ["patrique.legault@gmail.com"]
6
6
  spec.summary = %q{A Ruby library used to test forms using browser automation}
data/lib/legoTech_gem.rb CHANGED
@@ -1,3 +1,6 @@
1
+ # @author Patrique Legault
2
+
3
+ # Module => LegoTechSelenium
1
4
  require_relative "ui/actions/Action"
2
5
 
3
6
  require_relative "ui/driver/Driver"
@@ -9,5 +12,4 @@ require_relative "ui/test-suites/TestSuite"
9
12
  require_relative "ui/enums/Field"
10
13
  require_relative "ui/enums/Identifier"
11
14
 
12
- module LegoTechSelenium
13
- end
15
+ # End Module => LegoTechSelenium
@@ -1,18 +1,20 @@
1
1
  # @author Patrique Legault
2
- class Actions
2
+ module LegoTechSelenium
3
+ class Actions
3
4
 
4
- # A function that performs the given action against the webpage given the driver and the action
5
- #
6
- # @param driver [Driver] The driver object that represents the instance that is connected to the browser
7
- # @param action [Hash] A ruby object that has the following layout
8
- # {
9
- # :field => Fields::...
10
- # :identifier => Identifier::...
11
- # :value => String
12
- # }
13
- # @return void
14
- # @raise Selenium Exceptions
15
- def test(driver, action)
16
- raise "Test function in the Actions.rb file has not been overriden"
5
+ # A function that performs the given action against the webpage given the driver and the action
6
+ #
7
+ # @param driver [Driver] The driver object that represents the instance that is connected to the browser
8
+ # @param action [Hash] A ruby object that has the following layout
9
+ # {
10
+ # :field => Fields::...
11
+ # :identifier => Identifier::...
12
+ # :value => String
13
+ # }
14
+ # @return void
15
+ # @raise Selenium Exceptions
16
+ def test(driver, action)
17
+ raise "Test function in the Actions.rb file has not been overriden"
18
+ end
17
19
  end
18
20
  end
@@ -1,31 +1,34 @@
1
1
  require "selenium-webdriver"
2
2
 
3
- class Driver
4
- @driver
3
+ # @author Patrique Legault
4
+ module LegoTechSelenium
5
+ class LegoTechSelenium::Driver
6
+ @driver
5
7
 
6
- # Pass in an instance of the driver
7
- # @param The driver from Selenium Webdriver class
8
- def initialize(driver)
9
- @driver = driver
10
- end
8
+ # Pass in an instance of the driver
9
+ # @param The driver from Selenium Webdriver class
10
+ def initialize(driver)
11
+ @driver = driver
12
+ end
11
13
 
12
- # Set the amount of time the driver should wait when searching for elements.
13
- # @param implicit_wait seconds for implicit wait
14
- def set_implicit_wait(implicit_wait)
15
- end
14
+ # Set the amount of time the driver should wait when searching for elements.
15
+ # @param implicit_wait seconds for implicit wait
16
+ def set_implicit_wait(implicit_wait)
17
+ end
16
18
 
17
- # Sets the amount of time to wait for a page load to complete before throwing an error.
18
- # @param page_load seconds to wait for page to load
19
- def set_page_load(page_load)
20
- end
19
+ # Sets the amount of time to wait for a page load to complete before throwing an error.
20
+ # @param page_load seconds to wait for page to load
21
+ def set_page_load(page_load)
22
+ end
21
23
 
22
- # Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.
23
- # @param script_time seconds to wait for script to complete
24
- def set_script_tiemout(script_tiemout)
25
- end
24
+ # Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.
25
+ # @param script_time seconds to wait for script to complete
26
+ def set_script_tiemout(script_tiemout)
27
+ end
26
28
 
27
- # The URL to navigate to
28
- # @param navigate_to location for the browser to navigate to
29
- def set_navigate_to(navigate_to)
29
+ # The URL to navigate to
30
+ # @param navigate_to location for the browser to navigate to
31
+ def set_navigate_to(navigate_to)
32
+ end
30
33
  end
31
34
  end
@@ -1,6 +1,9 @@
1
- module Fields
2
- RADIO_BUTTON = 1
3
- CHECK_BOX = 2
4
- INPUT = 3
5
- DROPDOWN_LIST = 4
6
- end
1
+ # @author Patrique Legault
2
+ module LegoTechSelenium
3
+ module Fields
4
+ RADIO_BUTTON = 1
5
+ CHECK_BOX = 2
6
+ INPUT = 3
7
+ DROPDOWN_LIST = 4
8
+ end
9
+ end
@@ -1,5 +1,8 @@
1
- module Identifier
2
- CSS = 1
3
- NAME = 2
4
- ID = 3
5
- end
1
+ # @author Patrique Legault
2
+ module LegoTechSelenium
3
+ module Identifier
4
+ CSS = 1
5
+ NAME = 2
6
+ ID = 3
7
+ end
8
+ end
@@ -1,9 +1,12 @@
1
- class TestCase
2
- def initialize(name)
3
- if name.nil? or name.empty?
4
- raise "All TestCasses must have a name associated to them"
5
- end
1
+ # @author Patrique Legault
2
+ module LegoTechSelenium
3
+ class TestCase
4
+ def initialize(name)
5
+ if name.nil? or name.empty?
6
+ raise "All TestCasses must have a name associated to them"
7
+ end
6
8
 
7
- @name = name
9
+ @name = name
10
+ end
8
11
  end
9
12
  end
@@ -1,62 +1,65 @@
1
- class TestSuite
2
- # @param name [String] is the name of the TestSuite
3
- # @param driver [Driver] is the driver variable
4
- def initialize(name, driver)
5
- if name.nil? or name.empty?
6
- raise "All TestSuites must have a name associated to them"
7
- end
1
+ # @author Patrique Legault
2
+ module LegoTechSelenium
3
+ class TestSuite
4
+ # @param name [String] is the name of the TestSuite
5
+ # @param driver [Driver] is the driver variable
6
+ def initialize(name, driver)
7
+ if name.nil? or name.empty?
8
+ raise "All TestSuites must have a name associated to them"
9
+ end
8
10
 
9
- if driver.nil?
10
- raise "Driver must be non nil"
11
+ if driver.nil?
12
+ raise "Driver must be non nil"
13
+ end
14
+ @name = name
15
+ @driver = driver
16
+ @entries = []
11
17
  end
12
- @name = name
13
- @driver = driver
14
- @entries = []
15
- end
16
-
17
- # Function used to add a TestCase to thee TestSuite
18
- # @param testCase [TestCase] A test case to be executed
19
- def addTestCase(testCase)
20
- @entries.push(testCase)
21
- end
22
-
23
- # Retrieve the name of the TestSuite
24
- # @return [String] The name of the TestSuite
25
- def getName()
26
- return @name
27
- end
28
18
 
29
- # Retrieve the number of TestCases within the TestSuite
30
- # @return [Number] Number of TestCases
31
- def getNumberOfTestCases
32
- return @entries.size
33
- end
19
+ # Function used to add a TestCase to thee TestSuite
20
+ # @param testCase [TestCase] A test case to be executed
21
+ def addTestCase(testCase)
22
+ @entries.push(testCase)
23
+ end
34
24
 
35
- # Function that will invoke all test cases
36
- def run()
37
- raise "Not yet built"
38
- end
25
+ # Retrieve the name of the TestSuite
26
+ # @return [String] The name of the TestSuite
27
+ def getName()
28
+ return @name
29
+ end
39
30
 
40
- class Builder
41
- # Constructor for internal builder
42
- # @param name [String] The name of the class
43
- # @param driver [Driver] The driver of the class
44
- def initialize(name, driver)
45
- @testSuites = TestSuite.new(name, driver)
31
+ # Retrieve the number of TestCases within the TestSuite
32
+ # @return [Number] Number of TestCases
33
+ def getNumberOfTestCases
34
+ return @entries.size
46
35
  end
47
36
 
48
- # Add a test case to the test suite
49
- # @param TestsCase [TestCase] to be added to the list
50
- # @return self
51
- def addTestCase(testCase)
52
- @testSuites.addTestCase(testCase)
53
- self
37
+ # Function that will invoke all test cases
38
+ def run()
39
+ raise "Not yet built"
54
40
  end
55
41
 
56
- # Returns an instance of TestSuite
57
- # @return TestSuite instance
58
- def build
59
- @testSuites
42
+ class Builder
43
+ # Constructor for internal builder
44
+ # @param name [String] The name of the class
45
+ # @param driver [Driver] The driver of the class
46
+ def initialize(name, driver)
47
+ @testSuites = TestSuite.new(name, driver)
48
+ end
49
+
50
+ # Add a test case to the test suite
51
+ # @param TestsCase [TestCase] to be added to the list
52
+ # @return self
53
+ def addTestCase(testCase)
54
+ @testSuites.addTestCase(testCase)
55
+ self
56
+ end
57
+
58
+ # Returns an instance of TestSuite
59
+ # @return TestSuite instance
60
+ def build
61
+ @testSuites
62
+ end
60
63
  end
61
64
  end
62
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legoTech_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrique Legault