ole-qa-framework 2.6.5 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### v2.7.0
2
+
3
+ * OLEFS - New Items
4
+ * Invoice Document
5
+ * Invoice Line
6
+
1
7
  ### v2.6.5 - 2013/09/25
2
8
 
3
9
  * Added Marc Editor View-Only Pages
@@ -1,7 +1,7 @@
1
- # Default options for non-development use.
1
+ # Default options for using development environment.
2
2
  ---
3
- :url: http://tst.ole.kuali.org/
3
+ :url: http://dev.ole.kuali.org/
4
4
  :headless?: true
5
5
  :implicit_wait: 0
6
6
  :explicit_wait: 15
7
- :doc_wait: 45
7
+ :doc_wait: 60
@@ -50,13 +50,14 @@ module OLE_QA
50
50
  # Subobject directories (foo)/subobjects/ should be loaded before object directories (foo)/objects/ for inheritance.
51
51
  load_libs("/common/")
52
52
  load_libs("/olefs/common/")
53
- load_libs("/olefs/subobjects/")
54
- load_libs("/olefs/objects/")
55
- load_libs("/olefs/pages/")
56
53
  load_libs("/olels/common/")
54
+ load_libs("/olefs/subobjects/")
57
55
  load_libs("/olels/subobjects/")
56
+ load_libs("/olefs/objects/")
58
57
  load_libs("/olels/objects/")
58
+ load_libs("/olefs/pages/")
59
59
  load_libs("/olels/pages/")
60
+
60
61
  # load_libs("/docstore/")
61
62
 
62
63
  # Initialize wait variables to 0 for now. They will be set programatically in {OLE_QA::Framework::Session}.
@@ -14,7 +14,7 @@
14
14
 
15
15
  module OLE_QA
16
16
  module Framework
17
- # The most recent version of OLE with which this framework is compatible.
17
+ # The most recent version of OLE with which this framework was tested for compatibility.
18
18
  OLE_VERSION = '1.0.0 - M2-r13245 :: 2013-07-24 (Unification)'
19
19
  end
20
20
  end
@@ -15,6 +15,6 @@
15
15
  module OLE_QA
16
16
  module Framework
17
17
  # The version number for this project.
18
- VERSION = '2.6.5'
18
+ VERSION = '2.7.0'
19
19
  end
20
20
  end
@@ -0,0 +1,37 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLEFS
16
+ # This object is an inheritable base class for all line-type objects on an OLE Financial System Invoice.
17
+ # - This class provides a different mechanism for line_id and makes line_number an accessor attribute,
18
+ # allowing for dynamic redefinition of line object elements and sub-elements.
19
+ # - Instead of instantiating a new line object for each line and subline, the line_number can be updated
20
+ # in each line and subline object. This allows for slightly deeper recursion without the need of
21
+ # introducing a new level of sub-object below the subline object.
22
+ #
23
+ class Invoice_Line_Object < OLE_QA::Framework::Common_Object
24
+ # Allow the line_number attribute to be updated for dynamic element definitions.
25
+ attr_accessor :line_number
26
+
27
+ def initialize(ole_session, line_number = 1)
28
+ @line_number = line_number
29
+ super(ole_session)
30
+ end
31
+
32
+ # A reader method for the line_id function.
33
+ def line_id
34
+ @line_number - 1
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,34 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLEFS
16
+ # A Current Items line on an OLE Financial System Invoice e-document.
17
+ class Invoice_Current_Item < OLE_QA::Framework::OLEFS::Invoice_Line_Object
18
+
19
+ def set_elements
20
+ super
21
+ element(:po_number) {b.div(:id => "invoiceItem_poDoc_num_item_line#{line_id}")}
22
+ element(:open_quantity) {b.div(:id => "invoiceItem_olePoOutstandingQuantity_line#{line_id}")}
23
+ element(:title) {b.div(:id => "invoiceItem_itemDescription_line#{line_id}")}
24
+ element(:po_price) {b.span(:id => "invoiceItem_purchaseoOrderItemUnitPrice_line#{line_id}_control")}
25
+ element(:copies_invoiced_field) {b.text_field(:id => "invoiceItem_oleItemQuantity_line#{line_id}_control")}
26
+ element(:invoiced_price_field) {b.text_field(:id => "invoiceItem_itemListPrice_line#{line_id}_control")}
27
+ element(:discount_field) {b.text_field(:id => "invoiceItem_itemDiscount_line#{line_id}_control")}
28
+ element(:discount_type_selector) {b.select_list(:id => "invoiceItem_itemDiscountType_line#{line_id}_control")}
29
+ element(:unit_cost) {b.span(:id => "invoiceItem_itemUnitPrice_line#{line_id}_control")}
30
+ element(:extended_cost) {b.span(:id => "invoiceItem_extendedPrice_line#{line_id}_control")}
31
+ element(:total_cost) {b.span(:id => "invoiceItem_totalAmount_line#{line_id}_control")}
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,55 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLEFS
16
+ # A single Purchase Order line on an OLE Financial System Invoice E-Document.
17
+ # - This class represents a slight departure from the normal method for creating line objects.
18
+ # Instead of setting a line number only once, the line object can be redefined to point at
19
+ # other lines. This departure represents a more flexible approach and prevents the necessity
20
+ # of extra recursion to address the multiple sub-objects of an Invoice E-Document.
21
+ # - The future structure of Invoice documents is presently uncertain, so this is a temporary measure.
22
+ # If necessary, the framework may be restructured to follow this model.
23
+ class Invoice_Line < OLE_QA::Framework::OLEFS::Invoice_Line_Object
24
+
25
+ # A flexible PO line item object with dynamic ID element definitions on an Invoice document.
26
+ attr_reader :line_item
27
+
28
+ # Set OLE instance & line number, instantiate line item for PO line on Invoice document.
29
+ def initialize(ole_session, line_number = 1)
30
+ super(ole_session, line_number)
31
+ @line_item = OLE_QA::Framework::OLEFS::Invoice_Line_Item.new(@ole, self, 1)
32
+ end
33
+
34
+ # Set invoice line elements.
35
+ def set_elements
36
+ super
37
+ element(:po_number) {b.span(:id => "process_item_po_doc_line#{line_id}_control")}
38
+ element(:po_end_date) {b.text_field(:id => "invoice-poEndDate_line#{line_id}_control")}
39
+ element(:close_po_checkbox) {b.checkbox(:id => "CurrentItem_closePO_line#{line_id}_control")}
40
+ element(:delete_po_button) {b.button(:id => "CurrentItem_deletePurchaseOrder_line#{line_id}")}
41
+ element(:requisitions_toggle) {b.a(:id => "po-requisition-view_line#{line_id}_toggle")}
42
+ element(:purchase_orders_toggle) {b.a(:id => "po-po-view_line#{line_id}_toggle")}
43
+ element(:line_item_receiving_toggle) {b.a(:id => "po-relatedReceiving-view_line#{line_id}_toggle")}
44
+ element(:correction_receiving_toggle) {b.a(:id => "po-relatedCorrectionReceiving-view_line#{line_id}_toggle")}
45
+ element(:payment_requests_toggle) {b.a(:id => "po-relatedPayment-view_line#{line_id}_toggle")}
46
+ element(:credit_memos_toggle) {b.a(:id => "po-relatedCreditMemo-view_line#{line_id}_toggle")}
47
+ element(:add_button) {b.button(:id => "addPOItems_button_line#{line_id}")}
48
+ end
49
+
50
+ # Set invoice line functions (for elements with IDs that require numerical inputs).
51
+ def set_functions
52
+ super
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,72 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLEFS
16
+ # A single Line Item from a Purchase Order, as represented on an OLE Invoice E-Document.
17
+ class Invoice_Line_Item < OLE_QA::Framework::OLEFS::Invoice_Line_Object
18
+
19
+ # Allow the line number to be dynamically set, as needed for addressing various PO lines on an Invoice.
20
+ attr_accessor :line_number
21
+
22
+ # The instance of {OLE_QA::Framework::OLELS::PO_Line} which instantiated the Invoice Line Item object.
23
+ attr_reader :po_line
24
+
25
+ def initialize(ole_session, po_line, line_number = 1)
26
+ @po_line = po_line
27
+ super(ole_session, line_number)
28
+ end
29
+
30
+ def set_elements
31
+ super
32
+ element(:number) {b.span(:id => "CurrentItem_LineItemNo_line#{@po_line.line_id}_line#{line_id}_control")}
33
+ element(:open_quantity) {b.span(:id => "CurrentItem_openQuantity_line#{@po_line.line_id}_line#{line_id}_control")}
34
+ element(:title) {b.div(:id => "CurrentItem_Title_line#{@po_line.line_id}_line#{line_id}")}
35
+ element(:copies_ordered) {b.div(:id => "CurrentItem_NoOfCopiesOrdered_line#{@po_line.line_id}_line#{line_id}")}
36
+ element(:parts_ordered) {b.div(:id => "CurrentItem_NoOfParts_line#{@po_line.line_id}_line#{line_id}")}
37
+ element(:copies_invoiced_field) {b.text_field(:id => "CurrentItem_NoOfCopiesInvoice_line#{@po_line.line_id}_line#{line_id}_control")}
38
+ element(:parts_invoiced_field) {b.text_field(:id => "CurrentItem_NoOfPartsInvoice_line#{@po_line.line_id}_line#{line_id}_control")}
39
+ element(:invoiced_price_field) {b.text_field(:id => "CurrentItem_ListPrice_line#{@po_line.line_id}_line#{line_id}_control")}
40
+ element(:discount_field) {b.text_field(:id => "CurrentItem_Discount_line#{@po_line.line_id}_line#{line_id}_control")}
41
+ element(:discount_type_selector) {b.select_list(:id => "CurrentItem_DiscountType_line#{@po_line.line_id}_line#{line_id}_control")}
42
+ element(:unit_cost) {b.span(:id => "CurrentItem_UnitCost_line#{@po_line.line_id}_line#{line_id}_control")}
43
+ element(:extended_cost) {b.span(:id => "CurrentItem_ExtendedCost_line#{@po_line.line_id}_line#{line_id}_control")}
44
+ element(:invoice_checkbox) {b.span(:id => "CurrentItem_ItemForInvoice_line#{@po_line.line_id}_line#{line_id}_control")}
45
+ element(:new_chart_selector) {b.select_list(:id => "Invoice-chartOfAccountsCode_line#{@po_line.line_id}_line#{line_id}_add_control")}
46
+ element(:new_account_number_field) {b.text_field(:id => "Invoice-accountNumber_line#{@po_line.line_id}_line#{line_id}_add_control")}
47
+ element(:new_subaccount_number_field) {b.text_field(:id => "Invoice-subAccountNumber_line#{@po_line.line_id}_line#{line_id}_add_control")}
48
+ element(:new_object_code_field) {b.text_field(:id => "Invoice-financialObjectCode_line#{@po_line.line_id}_line#{line_id}_add_control")}
49
+ element(:new_subobject_code_field) {b.text_field(:id => "Invoice-financialSubObjectCode_line#{@po_line.line_id}_line#{line_id}_add_control")}
50
+ element(:new_project_field) {b.text_field(:id => "Invoice-projectCode_line#{@po_line.line_id}_line#{line_id}_add_control")}
51
+ element(:new_org_ref_id_field) {b.text_field(:id => "InvoiceorgRefId_line#{@po_line.line_id}_line#{line_id}_add_control")}
52
+ element(:new_dollar_field) {b.text_field(:id => "Invoice-amount_line#{@po_line.line_id}_line#{line_id}_add_control")}
53
+ element(:new_percentage_field) {b.text_field(:id => "Invoice-percent_line#{@po_line.line_id}_line#{line_id}_add_control")}
54
+ element(:add_account_button) {b.button(:id => "OLEInvoiceView-processItems-accountingLines_line#{@po_line.line_id}_line#{line_id}_add")}
55
+ end
56
+
57
+ def set_functions
58
+ super
59
+ # Functions for accounting lines on an Invoice PO Line Item.
60
+ function(:chart_selector) { |which = 1| which -= 1; b.select_list(:id => "Invoice-chartOfAccountsCode_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
61
+ function(:account_number_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-accountNumber_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
62
+ function(:subaccount_number_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-subAccountNumber_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
63
+ function(:object_code_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-financialObjectCode_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
64
+ function(:subobject_code_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-financialSubObjectCode_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
65
+ function(:project_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-projectCode_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
66
+ function(:org_ref_id_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-orgRefId_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
67
+ function(:dollar_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-amount_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
68
+ function(:percentage_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-percent_line#{@po_line.line_id}_line#{line_id}_line#{which}_control")}
69
+ function(:delete_account_button) { |which = 1| which -= 1; b.button(:id => "OLEInvoiceView-processItems-accountingLines_line#{@po_line.line_id}_line#{line_id}_del_line#{@po_line.line_id}_line#{line_id}_line#{which}")}
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,84 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLEFS
16
+ # An OLE Library System invoice document.
17
+ class Invoice < OLE_QA::Framework::OLELS::E_Doc
18
+
19
+ # A flexible object representing a Purchase Order line on an Invoice document.
20
+ attr_reader :po_line
21
+
22
+ # Initialize with URL for a new invoice.
23
+ def initialize(ole_session)
24
+ url = ole_session.url + '/portal.do?channelTitle=Create&channelUrl='
25
+ url += ole_session.url + '/ole-kr-krad/OLEInvoice?viewId=OLEInvoiceDocumentView&methodToCall=docHandler&command=initiate&documentClass=org.kuali.ole.krad.transaction.documents.OLEInvoiceDocument'
26
+ super(ole_session, url)
27
+ @po_line = OLE_QA::Framework::OLEFS::Invoice_Line.new(@ole, 1)
28
+ end
29
+
30
+ # Define basic invoice document screen elements.
31
+ def set_elements
32
+ super
33
+ element(:document_type_id) {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Invoice #:')]]/following-sibling::td[1]/div/span")}
34
+ element(:document_type_status) {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Invoice Doc Status:')]]/following-sibling::td[1]/div/span")}
35
+ element(:fiscal_year) {b.span(:id => 'invoice-documentYear_control')}
36
+ element(:total_amount) {b.span(:id => 'invoice-documentTotalAmount_control')}
37
+ element(:vendor_selector) {b.select_list(:id => 'invoice-vendorHeaderIdentifier_control')}
38
+ element(:vendor_invoice_num_field) {b.text_field(:id => 'invoice-invoiceNumber_control')}
39
+ element(:payment_class_field) {b.text_field(:id => 'invoice-invoicePaymentClassification_control')}
40
+ element(:vendor_invoice_amt_field) {b.text_field(:id => 'invoice-invoiceVendorAmount_control')}
41
+ element(:invoice_type_selector) {b.select_list(:id => 'invoice-invoiceTypeId_control')}
42
+ element(:bank_code_field) {b.text_field(:id => 'invoice-invoiceBankCode_control')}
43
+ element(:pay_date_field) {b.text_field(:id => 'invoice-invoicePayDate_control')}
44
+ element(:immediate_pay_checkbox) {b.checkbox(:id => 'invoice-invoicePayDateCheck_control')}
45
+ element(:invoice_date_field) {b.text_field(:id => 'invoice-invoiceDate_control')}
46
+ element(:pay_attachment_checkbox) {b.checkbox(:id => 'paymentAttachmentIndicator_control')}
47
+ element(:invoice_subtype_selector) {b.select_list(:id => 'invoice-invoiceSubTypeId_control')}
48
+ element(:payment_method_selector) {b.select_list(:id => 'invoice-paymentMethod_control')}
49
+ element(:po_number_field) {b.text_field(:id => 'OleInvoice_POLookup_control')}
50
+ element(:po_add_button) {b.button(:id => 'addProcessItem-button')}
51
+ element(:freight_cost_field) {b.text_field(:id => 'additionalItem_extendedCost_line0_control')}
52
+ element(:freight_description_field) {b.text_field(:id => 'additionalItem_itemDesc_line0_control')}
53
+ element(:shipping_cost_field) {b.text_field(:id => 'additionalItem_extendedCost_line1_control')}
54
+ element(:shipping_description_field) {b.text_field(:id => 'additionalItem_itemDesc_line1_control')}
55
+ element(:min_order_cost_field) {b.text_field(:id => 'additionalItem_extendedCost_line2_control')}
56
+ element(:min_order_description_field) {b.text_field(:id => 'additionalItem_itemDesc_line2_control')}
57
+ element(:misc_cost_field) {b.text_field(:id => 'additionalItem_extendedCost_line3_control')}
58
+ element(:misc_description_field) {b.text_field(:id => 'additionalItem_itemDesc_line3_control')}
59
+ element(:prorate_price_checkbox) {b.checkbox(:id => 'myAccount_prorateByDollar_control')}
60
+ element(:prorate_qty_checkbox) {b.checkbox(:id => 'myAccount_prorateByQuantity_control')}
61
+ element(:prorate_manual_checkbox) {b.checkbox(:id => 'myAccount_prorateByManual_control')}
62
+ element(:no_prorate_checkbox) {b.checkbox(:id => 'myAccount_noProrate_control')}
63
+ element(:prior_total_field) {b.text_field(:id => 'invoiceTotal_control')}
64
+ element(:grand_total) {b.span(:id => 'myAccount_grandTotal_control')}
65
+ element(:submit_button) {b.button(:text => /submit/)}
66
+ element(:save_button) {b.button(:id => 'usave')}
67
+ element(:approve_button) {b.button(:text => /blanket approve/)}
68
+ element(:close_button) {b.button(:id => 'uclose')}
69
+ element(:cancel_button) {b.a(:id => 'ucancel')}
70
+ element(:calculate_button) {b.button(:text => /calculate/)}
71
+ end
72
+
73
+ # Wait on these elements before the page is considered to have fully loaded.
74
+ def wait_for_elements
75
+ super
76
+ # @wait_on << :element
77
+ end
78
+
79
+ def set_functions
80
+ super
81
+
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,48 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'rspec'
16
+ require 'spec_helper'
17
+
18
+ describe 'An OLEFS Invoice Current Item line' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @line_object = OLE_QA::Framework::OLEFS::Invoice_Current_Item.new(@ole, 1)
23
+ end
24
+
25
+ after :all do
26
+ @ole.quit
27
+ end
28
+
29
+ it 'should create a new instance' do
30
+ @line_object.class.should == OLE_QA::Framework::OLEFS::Invoice_Current_Item
31
+ @line_object.class.superclass.should == OLE_QA::Framework::OLEFS::Invoice_Line_Object
32
+ end
33
+
34
+ it 'should have current item elements' do
35
+ elements = @line_object.elements
36
+ elements.include?(:po_number).should be_true
37
+ elements.include?(:open_quantity).should be_true
38
+ elements.include?(:title).should be_true
39
+ elements.include?(:po_price).should be_true
40
+ elements.include?(:copies_invoiced_field).should be_true
41
+ elements.include?(:invoiced_price_field).should be_true
42
+ elements.include?(:discount_field).should be_true
43
+ elements.include?(:discount_type_selector).should be_true
44
+ elements.include?(:unit_cost).should be_true
45
+ elements.include?(:extended_cost).should be_true
46
+ elements.include?(:total_cost).should be_true
47
+ end
48
+ end
@@ -0,0 +1,80 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'rspec'
16
+ require 'spec_helper'
17
+
18
+ describe 'A PO Line Item on an OLE Invoice' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @po_line = OLE_QA::Framework::OLEFS::Invoice_Line.new(@ole, 1)
23
+ @line_item = OLE_QA::Framework::OLEFS::Invoice_Line_Item.new(@ole, @po_line, 1)
24
+ end
25
+
26
+ after :all do
27
+ @ole.quit
28
+ end
29
+
30
+ it 'should create a new instance' do
31
+ @line_item.class.should == OLE_QA::Framework::OLEFS::Invoice_Line_Item
32
+ @line_item.class.superclass.should == OLE_QA::Framework::OLEFS::Invoice_Line_Object
33
+ end
34
+
35
+ it 'should have access to the line_number and line_id methods on the PO Line' do
36
+ @line_item.po_line.line_number.should == 1
37
+ @line_item.po_line.line_id.should == 0
38
+ end
39
+
40
+ it 'should have line item elements' do
41
+ elements = @line_item.elements
42
+ elements.include?(:number).should be_true
43
+ elements.include?(:open_quantity).should be_true
44
+ elements.include?(:title).should be_true
45
+ elements.include?(:copies_ordered).should be_true
46
+ elements.include?(:parts_ordered).should be_true
47
+ elements.include?(:copies_invoiced_field).should be_true
48
+ elements.include?(:parts_invoiced_field).should be_true
49
+ elements.include?(:invoiced_price_field).should be_true
50
+ elements.include?(:discount_field).should be_true
51
+ elements.include?(:discount_type_selector).should be_true
52
+ elements.include?(:unit_cost).should be_true
53
+ elements.include?(:extended_cost).should be_true
54
+ elements.include?(:invoice_checkbox).should be_true
55
+ elements.include?(:add_account_button).should be_true
56
+ elements.include?(:new_chart_selector).should be_true
57
+ elements.include?(:new_account_number_field).should be_true
58
+ elements.include?(:new_subaccount_number_field).should be_true
59
+ elements.include?(:new_object_code_field).should be_true
60
+ elements.include?(:new_subobject_code_field).should be_true
61
+ elements.include?(:new_project_field).should be_true
62
+ elements.include?(:new_org_ref_id_field).should be_true
63
+ elements.include?(:new_dollar_field).should be_true
64
+ elements.include?(:new_percentage_field).should be_true
65
+ end
66
+
67
+ it 'should have line item functions' do
68
+ functions = @line_item.functions
69
+ functions.include?(:chart_selector).should be_true
70
+ functions.include?(:account_number_field).should be_true
71
+ functions.include?(:subaccount_number_field).should be_true
72
+ functions.include?(:object_code_field).should be_true
73
+ functions.include?(:subobject_code_field).should be_true
74
+ functions.include?(:project_field).should be_true
75
+ functions.include?(:org_ref_id_field).should be_true
76
+ functions.include?(:dollar_field).should be_true
77
+ functions.include?(:percentage_field).should be_true
78
+ functions.include?(:delete_account_button).should be_true
79
+ end
80
+ end
@@ -0,0 +1,49 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'rspec'
16
+ require 'spec_helper'
17
+
18
+ describe 'The OLEFS Invoice Line Object base class' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @line_object = OLE_QA::Framework::OLEFS::Invoice_Line_Object.new(@ole, 1)
23
+ end
24
+
25
+ after :all do
26
+ @ole.quit
27
+ end
28
+
29
+ it 'should create a new instance' do
30
+ @line_object.class.should == OLE_QA::Framework::OLEFS::Invoice_Line_Object
31
+ @line_object.class.superclass.should == OLE_QA::Framework::Common_Object
32
+ end
33
+
34
+ it 'should have a line_number accessor method' do
35
+ @line_object.methods.include?(:line_number).should be_true
36
+ @line_object.methods.include?(:line_number=).should be_true
37
+ end
38
+
39
+ it 'should have a line_id reader method' do
40
+ @line_object.methods.include?(:line_id).should be_true
41
+ @line_object.methods.include?(:line_id=).should be_false
42
+ end
43
+
44
+ it 'should set the line ID equal to the line number minus one' do
45
+ @line_object.line_id.should == 0
46
+ @line_object.line_number = 2
47
+ @line_object.line_id.should == 1
48
+ end
49
+ end
@@ -0,0 +1,64 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'rspec'
16
+ require 'spec_helper'
17
+
18
+ describe 'An OLE Invoice PO Line' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @invoice_line = OLE_QA::Framework::OLEFS::Invoice_Line.new(@ole,1)
23
+ end
24
+
25
+ after :all do
26
+ @ole.quit
27
+ end
28
+
29
+ it 'should create a new instance' do
30
+ @invoice_line.class.should == OLE_QA::Framework::OLEFS::Invoice_Line
31
+ @invoice_line.class.superclass.should == OLE_QA::Framework::OLEFS::Invoice_Line_Object
32
+ end
33
+
34
+ it 'should have invoice line elements' do
35
+ elements = @invoice_line.elements
36
+ elements.include?(:po_number).should be_true
37
+ elements.include?(:po_end_date).should be_true
38
+ elements.include?(:close_po_checkbox).should be_true
39
+ elements.include?(:delete_po_button).should be_true
40
+ elements.include?(:requisitions_toggle).should be_true
41
+ elements.include?(:purchase_orders_toggle).should be_true
42
+ elements.include?(:line_item_receiving_toggle).should be_true
43
+ elements.include?(:correction_receiving_toggle).should be_true
44
+ elements.include?(:payment_requests_toggle).should be_true
45
+ elements.include?(:credit_memos_toggle).should be_true
46
+ elements.include?(:add_button).should be_true
47
+ end
48
+
49
+ it 'should have invoice line functions' do
50
+ functions = @invoice_line.functions
51
+ # Unable to be implemented at this time (2013/10/04 - JKW).
52
+ # functions.include?(:requisition_link).should be_true
53
+ # functions.include?(:purchase_order_link).should be_true
54
+ # functions.include?(:line_item_receiving_link).should be_true
55
+ # functions.include?(:correction_receiving_link).should be_true
56
+ # functions.include?(:payment_request_link).should be_true
57
+ # functions.include?(:credit_memo_link).should be_true
58
+ end
59
+
60
+ it 'should have an instance of the invoice line item class' do
61
+ @invoice_line.methods.include?(:line_item).should be_true
62
+ @invoice_line.line_item.class.should == OLE_QA::Framework::OLEFS::Invoice_Line_Item
63
+ end
64
+ end
@@ -0,0 +1,84 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'rspec'
16
+ require 'spec_helper'
17
+
18
+ describe 'An OLE Invoice' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @invoice = OLE_QA::Framework::OLEFS::Invoice.new(@ole)
23
+ end
24
+
25
+ after :all do
26
+ @ole.quit
27
+ end
28
+
29
+ it 'should create a new instance' do
30
+ @invoice.class.should == OLE_QA::Framework::OLEFS::Invoice
31
+ @invoice.class.superclass.should == OLE_QA::Framework::OLELS::E_Doc
32
+ end
33
+
34
+ it 'should have invoice elements' do
35
+ elements = @invoice.elements
36
+ elements.include?(:document_type_id).should be_true
37
+ elements.include?(:document_type_status).should be_true
38
+ elements.include?(:fiscal_year).should be_true
39
+ elements.include?(:total_amount).should be_true
40
+ elements.include?(:vendor_selector).should be_true
41
+ elements.include?(:vendor_invoice_num_field).should be_true
42
+ elements.include?(:payment_class_field).should be_true
43
+ elements.include?(:vendor_invoice_amt_field).should be_true
44
+ elements.include?(:invoice_type_selector).should be_true
45
+ elements.include?(:bank_code_field).should be_true
46
+ elements.include?(:pay_date_field).should be_true
47
+ elements.include?(:immediate_pay_checkbox).should be_true
48
+ elements.include?(:invoice_date_field).should be_true
49
+ elements.include?(:pay_attachment_checkbox).should be_true
50
+ elements.include?(:invoice_subtype_selector).should be_true
51
+ elements.include?(:payment_method_selector).should be_true
52
+ elements.include?(:po_number_field).should be_true
53
+ elements.include?(:po_add_button).should be_true
54
+ elements.include?(:freight_cost_field).should be_true
55
+ elements.include?(:freight_description_field).should be_true
56
+ elements.include?(:shipping_cost_field).should be_true
57
+ elements.include?(:shipping_description_field).should be_true
58
+ elements.include?(:min_order_cost_field).should be_true
59
+ elements.include?(:min_order_description_field).should be_true
60
+ elements.include?(:misc_cost_field).should be_true
61
+ elements.include?(:misc_description_field).should be_true
62
+ elements.include?(:prorate_price_checkbox).should be_true
63
+ elements.include?(:prorate_qty_checkbox).should be_true
64
+ elements.include?(:prorate_manual_checkbox).should be_true
65
+ elements.include?(:no_prorate_checkbox).should be_true
66
+ elements.include?(:prior_total_field).should be_true
67
+ elements.include?(:grand_total).should be_true
68
+ elements.include?(:submit_button).should be_true
69
+ elements.include?(:save_button).should be_true
70
+ elements.include?(:approve_button).should be_true
71
+ elements.include?(:close_button).should be_true
72
+ elements.include?(:cancel_button).should be_true
73
+ elements.include?(:calculate_button).should be_true
74
+ end
75
+
76
+ it 'should have invoice functions' do
77
+ functions = @invoice.functions
78
+ end
79
+
80
+ it 'should have a purchase order line' do
81
+ @invoice.methods.include?(:po_line).should be_true
82
+ @invoice.po_line.class.should == OLE_QA::Framework::OLEFS::Invoice_Line
83
+ end
84
+ end
@@ -15,7 +15,7 @@
15
15
  require 'rspec'
16
16
  require 'spec_helper'
17
17
 
18
- describe 'My behaviour' do
18
+ describe 'An OLELS Return Screen' do
19
19
 
20
20
  before :all do
21
21
  @ole = OLE_QA::Framework::Session.new
@@ -69,4 +69,4 @@ describe 'My behaviour' do
69
69
  @return_screen.loan_button.present?.should be_true
70
70
  @return_screen.item_field.present?.should be_true
71
71
  end
72
- end
72
+ end
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: 2.6.5
4
+ version: 2.7.0
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: 2013-09-25 00:00:00.000000000 Z
12
+ date: 2013-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -141,9 +141,13 @@ files:
141
141
  - lib/ole_qa_framework/COMPATIBILITY.rb
142
142
  - lib/ole_qa_framework/VERSION.rb
143
143
  - lib/olefs/common/e_doc.rb
144
+ - lib/olefs/common/invoice_line_object.rb
144
145
  - lib/olefs/common/line_object.rb
145
146
  - lib/olefs/common/lookup.rb
146
147
  - lib/olefs/common/purap_document.rb
148
+ - lib/olefs/objects/invoice_current_item.rb
149
+ - lib/olefs/objects/invoice_line.rb
150
+ - lib/olefs/objects/invoice_line_item.rb
147
151
  - lib/olefs/objects/line_item.rb
148
152
  - lib/olefs/objects/new_line_item.rb
149
153
  - lib/olefs/objects/new_preq_line_item.rb
@@ -151,6 +155,7 @@ files:
151
155
  - lib/olefs/objects/preq_line_item.rb
152
156
  - lib/olefs/objects/receiving_line.rb
153
157
  - lib/olefs/pages/building_lookup.rb
158
+ - lib/olefs/pages/invoice.rb
154
159
  - lib/olefs/pages/load_report.rb
155
160
  - lib/olefs/pages/load_summary_lookup.rb
156
161
  - lib/olefs/pages/main_menu.rb
@@ -211,7 +216,12 @@ files:
211
216
  - spec/olefs/copies_line_spec.rb
212
217
  - spec/olefs/edocs_spec.rb
213
218
  - spec/olefs/exception_notes_line_spec.rb
219
+ - spec/olefs/invoice_current_item_spec.rb
220
+ - spec/olefs/invoice_line_item_spec.rb
221
+ - spec/olefs/invoice_line_object_spec.rb
222
+ - spec/olefs/invoice_line_spec.rb
214
223
  - spec/olefs/invoice_notes_line_spec.rb
224
+ - spec/olefs/invoice_spec.rb
215
225
  - spec/olefs/line_item_spec.rb
216
226
  - spec/olefs/load_report_spec.rb
217
227
  - spec/olefs/load_summary_lookup_spec.rb
@@ -292,7 +302,12 @@ test_files:
292
302
  - spec/olefs/copies_line_spec.rb
293
303
  - spec/olefs/edocs_spec.rb
294
304
  - spec/olefs/exception_notes_line_spec.rb
305
+ - spec/olefs/invoice_current_item_spec.rb
306
+ - spec/olefs/invoice_line_item_spec.rb
307
+ - spec/olefs/invoice_line_object_spec.rb
308
+ - spec/olefs/invoice_line_spec.rb
295
309
  - spec/olefs/invoice_notes_line_spec.rb
310
+ - spec/olefs/invoice_spec.rb
296
311
  - spec/olefs/line_item_spec.rb
297
312
  - spec/olefs/load_report_spec.rb
298
313
  - spec/olefs/load_summary_lookup_spec.rb