ole-qa-framework 3.3.0 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Zjk3MjlmMDEzMWM0NTc3MjlmN2VhYmQ2YTcyYjZhZDk4YmMyMzFiZg==
4
+ MTNkZWU4YmE4NDQ3ZjUyZGFkYzA2OGNhZmU4ZTU0MDM4ZjE0YmViYw==
5
5
  data.tar.gz: !binary |-
6
- M2NiODVmMWU1ODAyOGZhNTk3NjA1ZWIwYmI3MzQ1YWNmZDhlZTYxMg==
6
+ NDQ2YzYwNGI3ZGExNTJjZWU2ZTY5NmJkNDI2MDlhZTMzOTNkOGY0YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGQ3NGUwMjkyZWJlMThhNjMzNjlmODAwNDkxMDMyNjQ3NGEyNDZjY2FiM2U1
10
- ZWVkMGZmZTFiMWUzNTY1NWQ5ZTRjMDRjZDBlYzA4N2I0ZTdiMzE1MGU4Y2Q1
11
- YzRjMmNjMWZlMTUzZDk3YzQ0MGViODkyNmJiMDI2YjQ5MzE1ZjE=
9
+ Mjc5NjM3ZTgzN2E3NDAwNmY4NDg1M2ZiMWExMTcwMGE0Y2EyMjE2YmVkMjQx
10
+ NzU2MDAwMmMwZDk5ODM3ZTk0ZDI3ZWQ1YmUxZTRlM2EzYzczOGEwYzJkMGEw
11
+ NWIyMDhhODY3ZGRiZDgxMTJjZDJkZWU2Njc4MzgxYzY5MjI5YjY=
12
12
  data.tar.gz: !binary |-
13
- MTM2ZjEzZTE4YTQ0MWU1ZGMyYzExYTBlNjk1YmYxM2RjN2ZlM2JjZTMxNDg3
14
- ZDc3NDhkN2E4NzA2ZTUyMGQ2YmVhYzc5NWVkMTE2Y2Y5MjY0ODcxZjg2MTYx
15
- ZWRkZWZiYWYyYjI3ZjMzMzczYTg0YzFmYzRiMDM3MmJlODRjMmQ=
13
+ ZjQ3ZjBhM2Q1NGU0ODEwMjU1NzY4N2I1N2U5ZDA1NjM1ZWE1ZDBkNzM4Mzlm
14
+ YThjMmMwZmRmNGJlNzE2MmI3YTdjNTc5OTQwZTdiMzhjNGFlZGI3MGExYjIz
15
+ MDg1ZWE4MWVjMzhhOGVmMTI3YWExNDRjODZlODA0NzU1NmE2ZDM=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ### v3.4.0 - 2013/11/26
2
+
3
+ * OLEFS E-Doc URLs
4
+ * Lookup URLs have been built in to the main page class
5
+ * Lookup URLs are provided for:
6
+ * Requisition
7
+ * Purchase Order
8
+ * Receiving Document
9
+ * Load Report
10
+ * Invoice
11
+
1
12
  ### v3.3.0 - 2013/11/26
2
13
 
3
14
  * Data & Data Factories
data/lib/common/page.rb CHANGED
@@ -30,9 +30,12 @@ module OLE_QA::Framework
30
30
 
31
31
  # @param ole_session [Object] The OLE_QA::Framework::Session instance in which the page should load.
32
32
  # @param url [String] The URL (if any) used to open the page. (Set to "" if unused.)
33
- def initialize(ole_session, url)
33
+ # @param lookup_url [String] The URL (if any) by which a document represented by the page can be opened.
34
+ # - The string must contain the replacement token '_DOC_ID_' where a document ID is to be inserted.
35
+ def initialize(ole_session, url, lookup_url = nil)
34
36
  super(ole_session)
35
37
  @url = url
38
+ @lookup_url = lookup_url
36
39
  @wait_on = Array.new
37
40
  @lines = Array.new
38
41
  wait_for_elements if defined?(self.wait_for_elements)
@@ -50,6 +53,21 @@ module OLE_QA::Framework
50
53
  wait_for_page_to_load
51
54
  end
52
55
 
56
+ # Return the URL used to open a specific document by given document number.
57
+ def lookup_url(doc_id)
58
+ @lookup_url.nil? ? nil : (@ole.url + @lookup_url.gsub('_DOC_ID_', doc_id.to_s))
59
+ end
60
+
61
+ # Open the page by lookup URL and return true if successful, false if not.
62
+ def lookup(doc_id)
63
+ if !@lookup_url.nil?
64
+ @browser.goto(lookup_url(doc_id))
65
+ true
66
+ else
67
+ false
68
+ end
69
+ end
70
+
53
71
  # Define this method on a subclass. Add element symbols to the @wait_on array.
54
72
  # This will require the open method to wait for each of these elements to be present before it finishes.
55
73
  # e.g.
@@ -15,6 +15,6 @@
15
15
  module OLE_QA
16
16
  module Framework
17
17
  # The version number for this project.
18
- VERSION = '3.3.0'
18
+ VERSION = '3.4.0'
19
19
  end
20
20
  end
@@ -26,7 +26,8 @@ module OLE_QA::Framework::OLEFS
26
26
  def initialize(ole_session)
27
27
  url = ole_session.url + '/portal.do?channelTitle=Create&channelUrl='
28
28
  url += ole_session.url + '/ole-kr-krad/OLEInvoice?viewId=OLEInvoiceDocumentView&methodToCall=docHandler&command=initiate&documentClass=org.kuali.ole.krad.transaction.documents.OLEInvoiceDocument'
29
- super(ole_session, url)
29
+ lookup_url = "ole-kr-krad/OLEInvoice?viewId=OLEInvoiceDocumentView&methodToCall=docHandler&docId=_DOC_ID_&command=displayDocSearchView"
30
+ super(ole_session, url, lookup_url)
30
31
  end
31
32
 
32
33
  # Define basic invoice document screen elements.
@@ -20,7 +20,8 @@ module OLE_QA::Framework::OLEFS
20
20
  def initialize(ole_session)
21
21
  url = ole_session.url + 'portal.do?channelTitle=Load%20Reports&channelUrl=batchlookup.do?methodToCall=start&businessObjectClassName=org.kuali.ole.select.businessobject.OleLoadSumRecords&docFormKey=88888888&returnLocation='
22
22
  url += ole_session.url + 'portal.do&hideReturnLink=true'
23
- super(ole_session, url)
23
+ lookup_url = "acqBatchUpload.do?docId=_DOC_ID_&docTypeName=OLE_ACQBTHUPLOAD&methodToCall=docHandler&command=displayDocSearchView#topOfForm"
24
+ super(ole_session, url, lookup_url)
24
25
  end
25
26
 
26
27
  # Set load report screen elements.
@@ -20,7 +20,8 @@ module OLE_QA::Framework::OLEFS
20
20
  # Initialize with a URL of OLE_QA::Framework::Session.url
21
21
  # @note OLEFS Purchase Orders do not have a direct link to open new documents.
22
22
  def initialize(ole_session)
23
- super(ole_session, ole_session.url)
23
+ lookup_url = '"purapOlePurchaseOrder.do?methodToCall=docHandler&docId=_DOC_ID_&command=displayDocSearchView#topOfForm"'
24
+ super(ole_session, ole_session.url, lookup_url)
24
25
  end
25
26
 
26
27
  # Create a new line item object on the purchase order.
@@ -17,7 +17,8 @@ module OLE_QA::Framework::OLEFS
17
17
  class Receiving_Document < PURAP_Document
18
18
  def initialize(ole_session)
19
19
  new_receiving_doc_url = ole_session.url + 'portal.do?channelTitle=Receiving&channelUrl=selectOleLineItemReceiving.do?methodToCall=docHandler&command=initiate&docTypeName=OLE_RCVL'
20
- super(ole_session, new_receiving_doc_url)
20
+ lookup_url = "selectOleLineItemReceiving.do?methodToCall=docHandler&docId=_DOC_ID_&command=displayDocSearchView#topOfForm"
21
+ super(ole_session, new_receiving_doc_url, lookup_url)
21
22
  end
22
23
 
23
24
  # Create a new receiving line object on the receiving document.
@@ -18,7 +18,8 @@ module OLE_QA::Framework::OLEFS
18
18
  # Set URL and initialize.
19
19
  def initialize(ole_session)
20
20
  new_requisition_url = ole_session.url + 'portal.do?channelTitle=Requisition&channelUrl=purapOleRequisition.do?methodToCall=docHandler&command=initiate&docTypeName=OLE_REQS'
21
- super(ole_session, new_requisition_url)
21
+ lookup_url = "purapRequisition.do?methodToCall=docHandler&docId=_DOC_ID_&command=displayDocSearchView#topOfForm"
22
+ super(ole_session, new_requisition_url, lookup_url)
22
23
  end
23
24
 
24
25
  # Create a new line item object on the requisition.
@@ -24,8 +24,9 @@ describe "A Page" do
24
24
 
25
25
  class TestPage < OLE_QA::Framework::Page
26
26
  def initialize(ole_session)
27
- url = 'http://www.google.com'
28
- super(ole_session, url)
27
+ url = 'http://www.google.com'
28
+ lookup_url = '_DOC_ID_'
29
+ super(ole_session, url, lookup_url)
29
30
  end
30
31
 
31
32
  def set_elements
@@ -60,6 +61,10 @@ describe "A Page" do
60
61
  @page.url.should == @ole.base_url
61
62
  end
62
63
 
64
+ it 'should have a lookup URL' do
65
+ @google_page.lookup_url('21').should == @ole.base_url + '21'
66
+ end
67
+
63
68
  it 'should wait for necessary elements to be present' do
64
69
  @google_page.open.should be_true
65
70
  @google_page.wait_for_page_to_load.should be_true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ole-qa-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jain Waldrip