class TestCreateDomesticMV(unittest.TestCase): @pytest.fixture(autouse=True) def class_setup(self): self.ts = TestStatus(self.driver) self.get_pass = GetPassWarning(self.driver) self.lp = LoginPage(self.driver) self.nav = NavigatePage(self.driver) self.sup_info_fev = FindExistingValuePage(self.driver) self.sup_info_anv = SupplierInformationANV(self.driver) self.summary = SummaryPage(self.driver) self.id_info = IdentifyingInformationPage(self.driver) self.addr = AddressPage(self.driver) self.loc = LocationPage(self.driver) self.procurement = ProcurementOptionsWindow(self.driver) @pytest.mark.run(order=1) # @data((os.environ.get('PSFT_USER_ID'), "wrongpassword")) @data(("AUTOTEST3", "wrongpassword")) @unpack def test_invalid_password(self, username, password): self.lp.login(username, password) result = self.lp.verify_login_failed() self.ts.mark(result, "Login Failed!") @pytest.mark.run(order=2) # @data((os.environ.get('PSFT_USER_ID'), os.environ.get('PSFT_USER_PWD'))) @data(("AUTOTEST3", "Psoft1234$")) @unpack def test_domestic_master_vendor_creation(self, username, password): self.lp.login(username, password) result_1 = self.lp.verify_title() self.ts.mark(result_1, "Title is CORRECT") self.nav.navigate_to_supplier_info() self.sup_info_fev.add_a_new_value() self.sup_info_anv.click_add_button() self.id_info.enter_identifying_info("DNS") """ CORPORATE INFO """ self.id_info.click_address_tab() self.addr.clean_domestic_us_addresses() self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() # """ REMIT """ # self.addr.click_add_new_address_btn() # self.addr.click_override_address_verification_chkbx() # self.addr.enter_domestic_master_vendor_address("Remit") # self.addr.enter_email_id() # self.addr.enter_business_phone() # self.addr.enter_fax() # # """ TRILOGIE PO ADDRESS """ # self.addr.click_add_new_address_btn() # self.addr.click_override_address_verification_chkbx() # self.addr.enter_domestic_master_vendor_address("Trilogie PO Address") # self.addr.enter_email_id() # self.addr.enter_business_phone() # self.addr.enter_fax() # Add a location self.addr.click_location_tab() self.loc.add_location("MAIN", "Remit to Main") # Add Procurement self.loc.click_procurement_link() self.procurement.select_random_payment_terms_id() # Save record self.loc.click_save_btn() self.loc.click_summary_tab() self.summary.get_supplier_id() result2 = self.summary.verify_supplier_id_created() self.ts.mark(result2, "Successfully Created Domestic Master Vendor.") @pytest.mark.run(order=3) def test_sign_out(self): self.summary.sign_out_summary_page() result = self.lp.verify_title_of_log_out_page() self.ts.mark_final("Test Create Master and Branch Vendor", result, "Successfully Signed Out of Application.")
class TestForeignBV(unittest.TestCase): @pytest.fixture(autouse=True) def class_setup(self): self.ts = TestStatus(self.driver) self.lp = LoginPage(self.driver) self.nav = NavigatePage(self.driver) self.sup_info_fev = FindExistingValuePage(self.driver) self.sup_info_anv = SupplierInformationANV(self.driver) self.summary = SummaryPage(self.driver) self.id_info = IdentifyingInformationPage(self.driver) self.addr = AddressPage(self.driver) self.clean_addr = CleanAddressPage(self.driver) self.loc = LocationPage(self.driver) self.procurement = ProcurementOptionsWindow(self.driver) self.sup_xref = SupplierXrefWindow(self.driver) @pytest.mark.run(order=1) @data((os.environ.get('PSFT_USER_ID'), "wrongpassword")) # @data(("AUTOTEST3", "wrongpassword")) @unpack def test_invalid_password(self, username, password): self.lp.login(username, password) result = self.lp.verify_login_failed() self.ts.mark(result, "Login Failed!") @pytest.mark.run(order=2) @data((os.environ.get('PSFT_USER_ID'), os.environ.get('PSFT_USER_PWD'))) # @data(("AUTOTEST3", "Psoft1234$")) @unpack def test_foreign_master_and_branch_vendor_creation(self, username, password): # Login into PeopleSoft with CREATOR credentials self.lp.login(username, password) result_1 = self.lp.verify_title() self.ts.mark(result_1, "Title is incorrect") self.nav.navigate_to_supplier_info() self.sup_info_fev.add_a_new_value() self.sup_info_anv.click_add_button() self.id_info.enter_identifying_info() """ FOREIGN CORPORATE INFO ADDRESS """ self.id_info.click_address_tab() self.clean_addr.clean_japanese_address() self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() self.addr.enter_trilogie_dm_fax() # """ FOREIGN REMIT ADDRESS """ # self.addr.click_add_new_address_btn() # self.addr.enter_foreign_master_vendor_address("Remit", "GBR") # self.addr.enter_email_id() # self.addr.enter_business_phone() # self.addr.enter_fax() # """ FOREIGN TRILOGIE PO ADDRESS """ # self.addr.click_add_new_address_btn() # self.addr.enter_foreign_master_vendor_address("Trilogie PO Address", "GBR") # self.addr.enter_email_id() # self.addr.enter_business_phone() # self.addr.enter_fax() """ ADD LOCATIONS AND BRANCH VENDORS """ self.addr.click_location_tab() self.loc.add_location("MAIN", "Remit to Main") # Add Procurement Options self.loc.click_procurement_link() self.procurement.select_random_payment_terms_id() # Add Branch Vendor(s) self.loc.click_fei_trilogie_xref_link() self.sup_xref.select_random_account() """ SAVE RECORD """ self.loc.click_save_btn() self.loc.click_summary_tab() self.summary.get_supplier_id() self.summary.search_for_created_supplier() result2 = self.summary.verify_supplier_id_created() self.ts.mark(result2, "Successfully Created Foreign Master Vendor.") @pytest.mark.run(order=3) def test_sign_out(self): self.summary.sign_out_summary_page() result = self.lp.verify_title_of_log_out_page() self.ts.mark_final("Test Create Master and Branch Vendor", result, "Successfully Signed Out of Application.")
class TestCreateForeignMV(unittest.TestCase): @pytest.fixture(autouse=True) def class_setup(self): self.ts = TestStatus(self.driver) self.lp = LoginPage(self.driver) self.nav = NavigatePage(self.driver) self.sup_info_fev = FindExistingValuePage(self.driver) self.sup_info_anv = SupplierInformationANV(self.driver) self.summary = SummaryPage(self.driver) self.id_info = IdentifyingInformationPage(self.driver) self.addr = AddressPage(self.driver) self.clean_addr = CleanAddressPage(self.driver) self.loc = LocationPage(self.driver) self.payable_options = PayablesOptionsWindow(self.driver) self.procurement = ProcurementOptionsWindow(self.driver) self.preview = PreviewSupplierAuditWindow(self.driver) @pytest.mark.run(order=1) # @data((os.environ.get('PSFT_USER_ID'), "wrongpassword")) @data(("AUTOTEST3", "wrongpassword")) @unpack def test_invalid_password(self, username, password): self.lp.login(username, password) result_1 = self.lp.verify_login_failed() self.ts.mark(result_1, "Login Failed!\n") @pytest.mark.run(order=2) # @data((os.environ.get('PSFT_USER_ID'), os.environ.get('PSFT_USER_PWD'))) @data(("AUTOTEST3", "Psoft1234!")) @unpack def test_foreign_master_vendor_creation(self, username, password): self.lp.login(username, password) result_1 = self.lp.verify_title() self.ts.mark(result_1, "Title is CORRECT\n") self.nav.navigate_to_supplier_info() self.sup_info_fev.add_a_new_value() self.sup_info_anv.click_add_button() self.id_info.enter_identifying_info() """ FOREIGN CORPORATE INFORMATION """ self.id_info.click_address_tab() self.clean_addr.clean_germany_address("GERMANY", "Corporate Info") self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() self.addr.enter_trilogie_dm_fax() """ FOREIGN REMIT ADDRESS """ self.addr.click_add_new_address_btn() self.clean_addr.clean_french_address("FRANCE", "Remit") self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() self.addr.enter_trilogie_dm_fax() """ FOREIGN TRILOGIE PO ADDRESS """ self.addr.click_add_new_address_btn() self.clean_addr.clean_australian_address("AUSTRALIA", "Trilogie PO Address") self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() self.addr.enter_trilogie_dm_fax() """ ADD LOCATIONS """ self.addr.click_location_tab() self.loc.add_location("MAIN", "Remit to Main") # Add Procurement self.loc.click_procurement_link() self.procurement.select_random_payment_terms_id() """ SAVE RECORD """ self.loc.click_save_btn() self.loc.click_summary_tab() self.summary.get_supplier_id() self.summary.search_for_created_supplier() result_2 = self.summary.verify_supplier_id_created() self.ts.mark(result_2, "Successfully Created Foreign Master Vendor.\n") @pytest.mark.run(order=3) def test_sign_out(self): self.summary.sign_out_summary_page() result_1 = self.lp.verify_title_of_log_out_page() self.ts.mark(result_1, "Successfully Signed Out of Application.\n") @pytest.mark.run(order=4) @data(("AUTOTEST4", "Psoft1234!")) @unpack def test_adding_bank_account_data(self, username, password): self.lp.login(username, password) result_1 = self.lp.verify_title() self.ts.mark(result_1, "Title is CORRECT\n") self.nav.navigate_to_supplier_info() self.driver.switch_to.frame("ptifrmtgtframe") self.sup_info_fev.search_for_supplier("0002000006") self.summary.click_correct_history_btn() self.summary.click_location_tab() self.loc.click_payables_link() self.payable_options.enter_and_save_supplier_bank_account_details() """ Preview Audit, Enter Reason Codes/Comments and Finalize """ self.preview.close_preview_supplier_audit_window_ok() result_1 = self.lp.verify_title_of_log_out_page() # self.ts.mark(result_1, "Successfully Signed Out of Application.\n") self.ts.mark_final( "Test Create Master Vendor", result_1, "Successfully added Banking Information to Master Vendor.\n")
class TestCreateForeignMVCleanAddress(unittest.TestCase): @pytest.fixture(autouse=True) def class_setup(self): self.ts = TestStatus(self.driver) self.lp = LoginPage(self.driver) self.nav = NavigatePage(self.driver) self.sup_info_fev = FindExistingValuePage(self.driver) self.sup_info_anv = SupplierInformationANV(self.driver) self.summary = SummaryPage(self.driver) self.id_info = IdentifyingInformationPage(self.driver) self.addr = AddressPage(self.driver) self.loc = LocationPage(self.driver) self.procurement = ProcurementOptionsWindow(self.driver) @pytest.mark.run(order=1) # @data((os.environ.get('PSFT_USER_ID'), "wrongpassword")) @data(("AUTOTEST3", "wrongpassword")) @unpack def test_invalid_password(self, username, password): self.lp.login(username, password) result = self.lp.verify_login_failed() self.ts.mark(result, "Login Failed!") @pytest.mark.run(order=2) # @data((os.environ.get('PSFT_USER_PWD'), os.environ.get('PSFT_USER_ID'))) @data(("AUTOTEST3", "Psoft1234$")) @unpack def test_foreign_master_vendor_creation(self, username, password): self.lp.login(username, password) result_1 = self.lp.verify_title() self.ts.mark(result_1, "Title is incorrect") self.nav.navigate_to_supplier_info() self.sup_info_fev.add_a_new_value() self.sup_info_anv.click_add_button() self.id_info.enter_identifying_info("DNS") self.id_info.click_address_tab() """ SELECT COUNTRY """ self.addr.clean_anguillian_address() """ SELECT COUNTRY """ self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() """ ADD LOCATIONS """ self.addr.click_location_tab() self.loc.add_location("MAIN", "Remit to Main") # Add Procurement self.loc.click_procurement_link() self.procurement.select_random_payment_terms_id() """ SAVE RECORD """ self.loc.click_save_btn() self.loc.click_summary_tab() self.summary.get_supplier_id() result2 = self.summary.verify_supplier_id_created() self.ts.mark(result2, "Successfully Created Foreign Master Vendor.") @pytest.mark.run(order=3) def test_sign_out(self): self.summary.sign_out_summary_page() result = self.lp.verify_title_of_log_out_page() self.ts.mark_final("Test Create Master and Branch Vendor", result, "Successfully Signed Out of Application.")
class TestDomesticBV(unittest.TestCase): @pytest.fixture(autouse=True) def class_setup(self): self.ts = TestStatus(self.driver) self.lp = LoginPage(self.driver) self.nav = NavigatePage(self.driver) self.sup_info_fev = FindExistingValuePage(self.driver) self.sup_info_anv = SupplierInformationANV(self.driver) self.summary = SummaryPage(self.driver) self.id_info = IdentifyingInformationPage(self.driver) self.addr = AddressPage(self.driver) self.clean_addr = CleanAddressPage(self.driver) self.loc = LocationPage(self.driver) self.payable_options = PayablesOptionsWindow(self.driver) self.procurement = ProcurementOptionsWindow(self.driver) self.sup_xref = SupplierXrefWindow(self.driver) self.preview = PreviewSupplierAuditWindow(self.driver) @pytest.mark.run(order=1) # @data((os.environ.get('PSFT_USER_ID'), "wrongpassword")) @data(("AUTOTEST3", "wrongpassword")) @unpack def test_invalid_password(self, username, password): self.lp.login(username, password) result = self.lp.verify_login_failed() self.ts.mark(result, "Login Failed!\n") @pytest.mark.run(order=2) # @data((os.environ.get('PSFT_USER_ID'), os.environ.get('PSFT_USER_PWD'))) @data(("AUTOTEST3", "Psoft1234!")) @unpack def test_domestic_master_and_branch_vendor_creation( self, username, password): self.lp.login(username, password) result_1 = self.lp.verify_title() self.ts.mark(result_1, "Title is CORRECT") self.nav.navigate_to_supplier_info() self.sup_info_fev.add_a_new_value() self.sup_info_anv.click_add_button() self.id_info.enter_identifying_info() """ CORPORATE INFORMATION """ self.id_info.click_address_tab() self.addr.enter_domestic_master_vendor_address("Remit") self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() self.addr.enter_trilogie_dm_fax() """ REMIT ADDRESS """ self.addr.click_add_new_address_btn() self.clean_addr.clean_australian_address() self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() self.addr.enter_trilogie_dm_fax() """ TRILOGIE PO ADDRESS """ self.addr.click_add_new_address_btn() self.addr.enter_domestic_master_vendor_address("Trilogie PO Address") self.addr.enter_email_id() self.addr.enter_business_phone() self.addr.enter_fax() self.addr.enter_trilogie_dm_fax() """ LOCATIONS PAGE """ # Add a location self.addr.click_location_tab() self.loc.add_location("MAIN", "Remit to Main") # Add Procurement Options self.loc.click_procurement_link() self.procurement.select_random_payment_terms_id() # Add Branch Vendor(s) self.loc.click_fei_trilogie_xref_link() self.sup_xref.select_random_account() """ SAVE RECORD """ self.loc.click_save_btn() self.loc.click_summary_tab() self.summary.get_supplier_id() self.summary.search_for_created_supplier() result2 = self.summary.verify_supplier_id_created() self.ts.mark( result2, "Successfully Created Domestic Master and Branch Vendor.\n") @pytest.mark.run(order=3) def test_sign_out(self): self.summary.sign_out_summary_page() result_1 = self.lp.verify_title_of_log_out_page() self.ts.mark(result_1, "Successfully Signed Out of Application.\n")