def step_movetoAgency(context): b = Page(context.driver) time.sleep(1) b.close_alert() global my_order my_order = ServiceManageOrderPage(context.driver) my_order.moveToAgencySearch(data.getCaseInitClient('我的订单')['cmp_name']) my_order.setWaitTime(2)
def step_acceptOrder(context): b = Page(context.driver) time.sleep(1) b.close_alert() global my_order my_order = ServiceManageOrderPage(context.driver) my_order.acceptOrder(data.getCaseInitClient('我的订单')['cmp_name']) my_order.setWaitTime(2)
def step_createAimOrder(context): b = Page(context.driver) time.sleep(1) b.close_alert() global my_order my_order = ServiceManageOrderPage(context.driver) my_order.createAimOrder( data.getCaseInitClient('我的订单')['cmp_name'], Data.org_name, Data.prd_name) my_order.setWaitTime(2)
def step_submitChanelResult(context): b = Page(context.driver) time.sleep(1) b.close_alert() global my_order my_order = ServiceManageOrderPage(context.driver) my_order.submitChanelResult(data.getCaseInitClient('我的订单')['cmp_name']) my_order.setWaitTime(2) functions.insert_img( context.driver, "myOrder_ChanelResultSubmitSucess_" + current_time + ".png")
def step_estimateCreditManager(context): b = Page(context.driver) time.sleep(1) b.close_alert() global my_order my_order = ServiceManageOrderPage(context.driver) my_order.estimateCreditManager(data.getCaseInitClient('我的订单')['cmp_name']) my_order.setWaitTime(2) functions.insert_img( context.driver, "myOrder_moveSubsOrderToOrgApproval_" + current_time + ".png")
def aa_test_0010_submitChanelResult(self): self.user_login_verify() time.sleep(2) b = Page(self.driver) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.submitChanelResult(Data.cmp_name) my_order.setWaitTime(2) # self.assertEqual(my_order.search_by_fuzzy(), '需求书修改有限公司') functions.insert_img(self.driver, current_time + "__myOrder_OrgApprove_pass.png") my_order.setWaitTime(2) my_order.close()
def aa_test_0007_estimateCreditManager(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.estimateCreditManager(Data.cmp_name) my_order.setWaitTime(2) # self.assertEqual(my_order.search_by_fuzzy(), '需求书修改有限公司') functions.insert_img(self.driver, current_time + "__myOrder_moveSubsOrderToOrgApproval.png") my_order.close()
def test_0002_moveToExpert(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.moveToExpert(Data.cmp_name) # self.assertEqual(my_order.search_by_fuzzy(), '需求书修改有限公司') functions.insert_img(self.driver, current_time + "__myOrder_movetoexpert.png") my_order.close()
def step_createSubOrder(context): b = Page(context.driver) time.sleep(1) b.close_alert() global my_order my_order = ServiceManageOrderPage(context.driver) my_order.createSubOrder( data.getCaseInitClient('我的订单')['cmp_name'], Data.credit_manager, Data.org_name) my_order.setWaitTime(2) functions.insert_img(context.driver, "myOrder_createSubsOrder" + current_time + ".png")
def test_0004_createAimOrder(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.createAimOrder(Data.cmp_name,Data.org_name,Data.prd_name) my_order.setWaitTime(2) self.assertIsNot(my_order.verifyAimOrderCreateSucess().strip(),'0/0/0/0/0') functions.insert_img(self.driver, current_time + "__myOrder_createAimOrder.png") my_order.setWaitTime(2) my_order.close()
def aa_test_0008_OrgApproveNotPass(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.orgApproveReject(Data.cmp_name) my_order.setWaitTime(2) # self.assertEqual(my_order.search_by_fuzzy(), '需求书修改有限公司') functions.insert_img(self.driver, current_time + "__myOrder_OrgApprove_reject.png") my_order.setWaitTime(2) my_order.close()
def aa_test_0002_moveToExpert(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.moveToExpert(Data.cmp_name) #校验转入专家测评成功 self.assertEqual(my_order.verifyOrderMovetoExprtSucess().strip(), '暂无查询到任何数据...') functions.insert_img(self.driver, current_time + "__myOrder_movetoexpert.png") my_order.close()
def test_0005_createSubOrder(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.createSubOrder(Data.cmp_name,Data.credit_manager,Data.org_name) my_order.setWaitTime(2) self.assertEqual(my_order.verifySubOrderCreateSucess(Data.credit_manager,Data.org_name), '订单详情') functions.insert_img(self.driver, current_time + "__myOrder_createSubsOrder.png") my_order.setWaitTime(2) my_order.close()
def aa_test_0001_acceptOrder(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.acceptOrder(Data.cmp_name) my_order.setWaitTime(2) #校验接单成功 self.assertEqual(my_order.verifyOrderAcceptSucess().strip(), '暂无查询到任何数据...') functions.insert_img(self.driver, current_time + "__myOrder_verifyOrderAcceptSucess.png") my_order.close()
def test_0004_createAimOrder(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.createAimOrder(Data.cmp_name, Data.org_name, Data.prd_name) my_order.setWaitTime(2) # self.assertEqual(my_order.search_by_fuzzy(), '需求书修改有限公司') functions.insert_img(self.driver, current_time + "__myOrder_createAimOrder.png") my_order.setWaitTime(2) my_order.close()
def aa_test_0003_moveToAgency(self): self.user_login_verify() time.sleep(1) b = Page(self.driver) time.sleep(1) b.close_alert() my_order = ServiceManageOrderPage(self.driver) my_order.moveToAgencySearch(Data.cmp_name) my_order.setWaitTime(2) #校验转入专家测评成功 self.assertEqual(my_order.verifyOrderMovetoAgencyResearchSucess().strip(), '暂无查询到任何数据...') functions.insert_img(self.driver, current_time + "__myOrder_movetoAgency.png") my_order.setWaitTime(2) my_order.close()
def step_OrgApprove(context, appv_status): b = Page(context.driver) time.sleep(1) b.close_alert() global my_order my_order = ServiceManageOrderPage(context.driver) context.appv_status = appv_status if appv_status == '不通过': my_order.orgApproveReject(data.getCaseInitClient('我的订单')['cmp_name']) my_order.setWaitTime(2) functions.insert_img( context.driver, "myOrder_OrgApprove_reject_" + current_time + ".png") elif appv_status == '通过': my_order.orgApprovePass(data.getCaseInitClient('我的订单')['cmp_name']) my_order.setWaitTime(2) functions.insert_img(context.driver, "myOrder_OrgApprov_pass_" + current_time + ".png")