class RegisteredBusinessContacts(BaseTestCase):
    def setUp(self):
        BaseTestCase.setUp(self)
        clear_first_sql()
        clear_second_sql()
        self.login_page = LoginPage(self.driver)
        self.main_page = MainPage(self.driver)
        self.exit_app = ExitAppPage(self.driver)
        self.longcard_page = LongCardPage(self.driver)
        self.registerd_bussiness_first_page_first = RegisteredBusinessContactsOnePage(
            self.driver)
        self.registerd_bussiness_second_page = RegisteredBusinessContactsTwoPage(
            self.driver)
        self.login_page.login(username=18267990494, password=123456)
        pass

    def test_publish_supply_full(self):
        self.longcard_page.click_expected_card(10001475, '注册业务关系人')
        self.registerd_bussiness_first_page_first.assert_first_page()
        self.registerd_bussiness_first_page_first.choose_location()
        self.registerd_bussiness_first_page_first.type_first_page()
        self.registerd_bussiness_first_page_first.click_next_button()
        self.registerd_bussiness_second_page.click_ok_button()
        self.registerd_bussiness_second_page.assert_sql_empty()
        pass

    def tearDown(self):
        # 注销app
        self.exit_app.logout_app()
        sleep(2)
        BaseTestCase.tearDown(self)
        pass
Exemplo n.º 2
0
 def setUp(self):
     BaseTestCase.setUp(self)
     self.username = '******'
     self.password = '******'
     self.login_page = LoginPage(self.driver)
     self.long_task_page = LongCardPage(self.driver)
     self.verify_risk_page = VerifyRiskPage(self.driver)
     pass
Exemplo n.º 3
0
 def test_UnitConversion(self):
     unit = '箱'
     goods = '大苹果124'
     LongCardPage(self.driver).click_expected_card(10001566, '管理单位')
     unit_conversion_instant = UnitConversionPage(self.driver)
     unit_conversion_instant.page_factory()
     unit_conversion_instant.add_unit(unit)  # 添加单位
     self.driver.keyevent(4)
     LongCardPage(self.driver).click_expected_card(10001566, '单位转换')
     unit_conversion_instant.unit_convert(unit, goods)
Exemplo n.º 4
0
 def setUp(self):
     BaseTestCase.setUp(self)
     self.role = "login"
     # 初始化账号
     self.usr = '******'
     self.pwd = '12345678'
     # 初始化page
     LoginPage(self.driver).login(self.usr, self.pwd)
     LongCard = LongCardPage(self.driver)
     LongCard.click_expected_card(10001473, '发布供货供应')
     pass
 def setUp(self):
     BaseTestCase.setUp(self)
     self.role = "login"
     # 初始化账号
     self.usr = '******'
     self.pwd = '12345678'
     # 初始化page
     LoginPage(self.driver).login(self.usr, self.pwd)
     LongCard = LongCardPage(self.driver)
     LongCard.click_expected_card(10001473, '注册供应商')
     register_suppliers_sql(user_id=10001473)  # 恢复数据
     pass
 def setUp(self):
     BaseTestCase.setUp(self)
     clear_first_sql()
     clear_second_sql()
     self.login_page = LoginPage(self.driver)
     self.main_page = MainPage(self.driver)
     self.exit_app = ExitAppPage(self.driver)
     self.longcard_page = LongCardPage(self.driver)
     self.registerd_bussiness_first_page_first = RegisteredBusinessContactsOnePage(
         self.driver)
     self.registerd_bussiness_second_page = RegisteredBusinessContactsTwoPage(
         self.driver)
     self.login_page.login(username=18267990494, password=123456)
     pass
Exemplo n.º 7
0
    def test_DistributionManagerAndSupervisor(self):
        LongCardPage(self.driver).click_expected_card(10001394, '找仓储需求')
        signed_warehousing_supply_contract_instant = SignedWarehousingSupplyContract(
            self.driver)
        signed_warehousing_supply_contract_instant.page_factory()
        # 签订地产类型的契约
        signed_warehousing_supply_contract_instant.click_the_first_warehouse_card(
            contract_type='DEMAND')
        signed_warehousing_supply_contract_instant.choice_amount_and_submit(
            contract_type='DEMAND')  # 全选并提交
        sleep(5)
        result_dic2 = get_warehouse_sign_result(51817200000010012,
                                                contract_ascription='DEMAND',
                                                user_id=10001394)
        assert result_dic2['get_new_contract_no'] == 1 and result_dic2['rs_repository_no'] == 2 \
            and result_dic2['log_no'] == 1 and result_dic2['contract_status'] == '20' and \
            result_dic2['contract_no'] == 0
        sleep(7)
        # 签订仓储类型的契约
        signed_warehousing_supply_contract_instant.click_the_first_warehouse_card(
            contract_type='DEMAND', rs_type='WA')
        signed_warehousing_supply_contract_instant.choice_amount_and_submit(
            contract_type='DEMAND')  # 全选并提交
        sleep(5)
        result_dic = get_warehouse_sign_result(51817200000010012,
                                               contract_ascription='DEMAND',
                                               user_id=10001394,
                                               type='WA')
        # sql判断结果
        assert result_dic['get_new_contract_no'] == 2 and result_dic['rs_repository_no'] == 4 and result_dic['log_no'] \
            == 2 and result_dic['contract_status'] == '30' and result_dic['contract_no'] == 0

        print('签订仓储需求契约成功')
    def test_sign_warehouse_supply_success(self):
        LongCardPage(self.driver).click_expected_card(10001394, '找仓储供应')
        sleep(3)
        signed_warehousing_supply_contract_instant = SignedWarehousingSupplyContract(
            self.driver)
        signed_warehousing_supply_contract_instant.page_factory()
        # 签订地产类型的契约
        signed_warehousing_supply_contract_instant.click_the_first_warehouse_card(
            rs_type='WA')  # 点击第一个卡片
        sleep(3)
        signed_warehousing_supply_contract_instant.choice_amount_and_submit(
        )  # 全选并提交
        sleep(2)
        result_dic = get_warehouse_sign_result(51817100000010009,
                                               user_id=10001394,
                                               type='WA')
        # sql判断结果
        assert result_dic['get_new_contract_no'] == 2 and result_dic['rs_repository_no'] == 4 \
            and result_dic['log_no'] == 1 and result_dic['contract_status'] == '20' and \
            result_dic['contract_no'] == 0

        sleep(7)
        # 签订仓储类型的契约
        signed_warehousing_supply_contract_instant.click_the_first_warehouse_card(
        )  # 点击第一个卡片
        signed_warehousing_supply_contract_instant.choice_amount_and_submit(
        )  # 全选并提交
        sleep(2)
        result_dic2 = get_warehouse_sign_result(51817100000010009,
                                                user_id=10001394)
        assert result_dic2['get_new_contract_no'] == 1 and result_dic2['rs_repository_no'] == 2 \
            and result_dic2['log_no'] == 2 and result_dic2['contract_status'] == '30' and \
            result_dic['contract_no'] == 0
        print('签订仓储供应契约成功')
Exemplo n.º 9
0
 def test_optimize_address_book_and_invite_link(self):
     LongCardPage(self.driver).click_expected_card(self.user_id, '监控者授权')
     sleep(3)
     OptimizeAddressBookAndInviteLink(self.driver).optimize_address_book_and_invite_link_four()
     OptimizeAddressBookAndInviteLink(self.driver).judge_method_four()
     sleep(3)
     OptimizeAddressBookAndInviteLink(self.driver).submit()
Exemplo n.º 10
0
 def test_DistributionManagerAndSupervisor(self):
     LongCardPage(self.driver).click_expected_card(10001646, '注册业务关系人')
     sleep(3)
     manual_location_map_instant = ManualLocationMap(self.driver)
     manual_location_map_instant.page_factory()
     manual_location_map_instant.choice_address()   # 选择地图地址
     manual_location_map_instant.check_default_map_address()   # 选择完成后再次进入地图判断地址
 def test_management_business_unit(self):
     LongCardPage(self.driver).click_expected_card(self.user_id, '管理业务单位')
     sleep(3)
     ManagementBusinessUnit(self.driver).management_business_unit()
     ManagementBusinessUnit(self.driver).submit()
     sleep(3)
     get_new_business_unit()
     print("管理业务单位成功")
 def test_DistributionManagerAndSupervisor(self):
     code = '1000144400001'
     LongCardPage(self.driver).click_expected_card(10001646, '补打快递单')
     sleep(1)
     bound_printer_instant = BoundPrinter(self.driver)
     bound_printer_instant.page_factory()
     bound_printer_instant.bound_printer(code)
     sleep(2)
     assert str(get_bound_printer_info()) == '1000144400001'
 def setUp(self):
     self.mobile1 = 15355945533
     self.mobile2 = 15355945534
     self.user1_id = get_user_id(self.mobile1)
     self.user2_id = get_user_id(self.mobile2)
     self.password = 123456
     LoginPage(self.driver).login(self.mobile1, self.password)
     LongCardPage(self.driver).click_expected_card(self.user1_id, '管理者权限')
     pass
Exemplo n.º 14
0
 def setUp(self):
     self.mobile = 18888000131
     self.admin = get_user_id(self.mobile)
     self.password = 123456
     BaseTestCase.setUp(self)
     sleep(3)
     delete_address(self.admin)
     LoginPage(self.driver).login(self.mobile, self.password)  # 登录
     LongCardPage(self.driver).click_expected_card(self.admin, '管理收货地址')
Exemplo n.º 15
0
 def setUp(self):
     BaseTestCase.setUp(self)
     self.role = "login"
     # 初始化账号
     self.usr = '******'
     self.pwd = '12345678'
     # 初始化page
     LoginPage(self.driver).login(self.usr, self.pwd)
     LongCardPage(self.driver).click_long_task_card()
     PurchaseOrderPage(self.driver).click_purchase_order_card_ios()
     pass
Exemplo n.º 16
0
 def test_return_goods(self):
     LongCardPage(self.driver).click_expected_card(self.user_id, '申请退货')
     sleep(3)
     ReturnGoods(self.driver).return_goods_two()
     ReturnGoods(self.driver).submit()
     sleep(3)
     new_return_goods = get_return_goods(self.user_id)
     recovery_record_no = (new_return_goods['recovery_record_no'])
     print(recovery_record_no)
     assert recovery_record_no == '公明提交了退货申请. 订单号:51860400000008034'
     print("申请退货成功!")
Exemplo n.º 17
0
 def setUp(self):
     BaseTestCase.setUp(self)
     self.role = "login"
     # 初始化账号
     self.usr = '******'
     self.pwd = '12345678'
     # 初始化page
     LoginPage(self.driver).login(self.usr, self.pwd)
     LongCardPage(self.driver).click_long_task_card()
     RegisterSuppliersPage(self.driver).click_register_supply_card_ios()
     pass
Exemplo n.º 18
0
 def setUp(self):
     self.mobile = 18205010265
     self.admin = get_user_id(self.mobile)
     self.password = 123456
     BaseTestCase.setUp(self)
     sleep(3)
     delete_depot_card(self.admin)
     eject_logged_user(self.mobile, self.password)
     sleep(2)
     LoginPage(self.driver).login(self.mobile, self.password)  # 登录
     LongCardPage(self.driver).click_expected_card(self.admin, '激活仓库')
 def setUp(self):
     BaseTestCase.setUp(self)
     self.role = "login"
     # 初始化账号
     self.usr = '******'
     self.pwd = '12345678'
     # 初始化page
     LoginPage(self.driver).login(self.usr, self.pwd)
     LongCardPage(self.driver).click_long_task_card()
     PublishWarehouseDemandPage(
         self.driver).click_pub_warehouse_demand_card_ios()  # 自动到发布仓储需求卡片
     pass
 def setUp(self):
     BaseTestCase.setUp(self)
     self.role = "login"
     # 初始化账号
     self.usr = '******'
     self.pwd = '12345678'
     # 初始化page
     LoginPage(self.driver).login(self.usr, self.pwd)
     LongCardPage(self.driver).click_long_task_card()
     SetPromotionTemplatePage(
         self.driver).click_set_promotion_Template_card_ios()
     pass
Exemplo n.º 21
0
class FunVerifyRisk(BaseTestCase):
    def setUp(self):
        BaseTestCase.setUp(self)
        self.username = '******'
        self.password = '******'
        self.login_page = LoginPage(self.driver)
        self.long_task_page = LongCardPage(self.driver)
        self.verify_risk_page = VerifyRiskPage(self.driver)
        pass

    def test_bill_list(self):
        """
        风险审核
        """
        self.login_page.login(self.username, self.password)  # 登陆
        self.long_task_page.click_expected_card(10001456,
                                                '风险审核')  # 找到并点击风险审核卡片
        self.verify_risk_page.assert_versify_risk(10001456)  # assert风险审核详情
        pass

    def tearDown(self):
        BaseTestCase.tearDown(self)
        pass
    def test_management_business_unit(self):
        LongCardPage(self.driver).click_expected_card(self.user_id, '监控者权限收回')
        sleep(3)
        PermissionRecovery(self.driver).permission_recovery_three()
        PermissionRecovery(self.driver).submit()
        sleep(3)

        new_permission_recovery = get_new_permission_recovery(self.user1_id)
        recovery_record_no = int(new_permission_recovery['recovery_record_no'])
        permission_record_no = int(new_permission_recovery['permission_record_no'])
        log_no = int(new_permission_recovery['log_no'])
        print(recovery_record_no, permission_record_no, log_no)
        assert recovery_record_no == permission_record_no == log_no == 3
        print("权限收回成功!")
Exemplo n.º 23
0
 def test_TransportContract(self):
     LongCardPage(self.driver).click_expected_card(self.user_id, '找运输供应')
     signed_carriage_supply_contract_instant = ContractCarriage(self.driver)
     signed_carriage_supply_contract_instant.page_factory()
     # 签订运输契约
     signed_carriage_supply_contract_instant.click_the_first_carriage_card()  # 点击第一个卡片
     signed_carriage_supply_contract_instant.choice_amount_and_submit()  # 全选并提交
     sleep(2)
     new_transport_contract = get_new_transport_contract(self.user_id, contract_ukid='51817000000009223')
     new_transport_contract_no = int(new_transport_contract['new_transport_contract_no'])
     operation_record_no = int(new_transport_contract['operation_record_no'])
     rs_repository_no = int(new_transport_contract['rs_repository_no'])
     print(new_transport_contract_no, rs_repository_no, operation_record_no)
     assert new_transport_contract_no * 2 == rs_repository_no == operation_record_no * 2
     print('签订运输供应契约成功')
Exemplo n.º 24
0
 def setUp(self):
     delete_labor_contract()
     reduction_labor_contract()  # 还原劳务契约
     mobile = 17630301114
     password = 123456
     self.user_id = get_user_id(mobile)
     BaseTestCase.setUp(self)
     # eject_logged_user(mobile, password)
     sleep(12)
     # self.driver.find_element_by_accessibility_id('我知道了').click()
     LoginPage(self.driver).login(username=mobile, password=password)  # 登录
     # EatToast(self.driver, '您的账号在别的地方登录', '我知道了').eat_toast()
     # sleep(10)
     # self.driver.find_element_by_accessibility_id('我知道了').click()
     LoginPage(self.driver).login(username=mobile, password=password)
     LongCardPage(self.driver).click_expected_card(self.user_id, '找劳务需求')
     pass
Exemplo n.º 25
0
    def test_LaborContract(self):
        LongCardPage(self.driver).click_expected_card(self.user_id, '找劳务需求')
        signed_labor_demand_contract_instant = SignLaborContract(self.driver)
        signed_labor_demand_contract_instant.page_factory()
        # 签订劳务契约
        signed_labor_demand_contract_instant.click_the_first_labor_card(
        )  # 点击第一个卡片
        signed_labor_demand_contract_instant.choice_amount_and_submit(
        )  # 全选并提交

        new_labor_contract = get_new_labor_contract(
            self.user_id, contract_ukid='51817000000010130')
        new_labor_contract_no = int(
            new_labor_contract['new_labor_contract_no'])
        operation_record_no = int(new_labor_contract['operation_record_no'])
        rs_repository_no = int(new_labor_contract['rs_repository_no'])
        print(new_labor_contract_no, rs_repository_no, operation_record_no)
        assert new_labor_contract_no * 2 == rs_repository_no == operation_record_no * 2
        print('签订劳务需求契约成功')
    def test_SignLaborSupplyContract(self):
        LongCardPage(self.driver).click_expected_card(10001465, '找劳务需求')
        sleep(3)
        signed_labor_demand_contract_instant = SignLaborContract(self.driver)
        signed_labor_demand_contract_instant.page_factory()
        # 签订劳务契约
        signed_labor_demand_contract_instant.click_the_first_labor_card(
        )  # 点击第一个卡片
        signed_labor_demand_contract_instant.choice_amount_and_submit()  # 报名参加

        labor_contract_info = get_labor_contract_info(self.la_participant_ukid)
        status = str(labor_contract_info['status'])
        assert status == '20'
        sleep(4)
        new_labor_contract = get_new_labor_contract(self.user_id)
        print(new_labor_contract)
        new_labor_contract_no = int(
            new_labor_contract['new_labor_contract_no'])
        operation_record_no = int(new_labor_contract['operation_record_no'])
        rs_repository_no = int(new_labor_contract['rs_repository_no'])

        print(new_labor_contract_no, rs_repository_no, operation_record_no)
        assert new_labor_contract_no * 2 == rs_repository_no == operation_record_no * 2
        print('签订劳务需求契约成功')
        # 签订完成劳务契约
        signed_labor_demand_contract_instant.click_the_first_labor_card(
        )  # 点击第一个卡片
        signed_labor_demand_contract_instant.choice_amount_and_submit()  # 报名参加
        sleep(2)
        new_labor_contract = get_new_labor_contract(
            self.user_id, contract_ukid='51817000000010130')
        new_labor_contract_no = int(
            new_labor_contract['new_labor_contract_no'])
        operation_record_no = int(new_labor_contract['operation_record_no'])
        rs_repository_no = int(new_labor_contract['rs_repository_no'])
        print(new_labor_contract_no, rs_repository_no, operation_record_no)
        assert new_labor_contract_no * 2 == rs_repository_no == operation_record_no * 2

        labor_contract_info = get_labor_contract_info(self.la_participant_ukid)
        status = str(labor_contract_info['status'])
        assert status == '30'  # 判断状态
        print('签订劳务需求契约成功')
Exemplo n.º 27
0
 def test_LaborContract(self):
     LongCardPage(self.driver).click_expected_card(10001474, '管理业务单位')
Exemplo n.º 28
0
 def _long_task_card_ios(self):
     """
     ios 长期任务卡片
     :return:
     """
     LongCardPage(self.driver).click_long_task_card()
 def _assert_first_page_ios(self):
     """
     ios上的判断有没有到了第一个页面
     :return:
     """
     LongCardPage(self.driver).click_long_task_card()
Exemplo n.º 30
0
    def test_SignLaborSupplyContract(self):
        self.no_hour = '29'
        self.no_piece = '0.95'
        self.no = '2'
        self.type = '包装'
        self.shift = '白班'
        self.unit_hour1 = '元/小时'
        self.unit_hour = '计时 (元/小时)'
        self.unit_piece = '计件 (元/件)'
        self.position = '海南省三沙市中沙群岛的岛礁及其海域'
        self.start_time = '2018/12/23'
        self.end_time = '2018/12/23'
        LongCardPage(self.driver).click_expected_card(10001465, '找劳务需求')
        # 判断第一个卡片的信息
        signed_labor_demand_contract_instant = SignLaborContract(self.driver)
        signed_labor_demand_contract_instant.page_factory()
        labor_contract_info = get_labor_contract_info(self.la_participant_ukid)
        print(labor_contract_info)
        start_time2 = '开始: ' + self.start_time
        end_time2 = '结束: ' + self.end_time

        assert get_element(self.driver, self.la_type_locator).text == self.type  # 判断工种
        assert get_element(self.driver, self.la_no_locator).text == self.no_hour   # 判断价钱
        assert get_element(self.driver, self.la_unit_locator).text == self.unit_hour1  # 判断计算单位
        assert get_element(self.driver, self.la_start_time_locator).text == start_time2  # 判断开始时间
        assert get_element(self.driver, self.la_end_time_locator).text == end_time2  # 判断结束时间

        # 下面属于page的内容
        get_element(self.driver, self.la_unit_locator).click()
        sleep(1)

        self.assert_la()
        self.position1 = '位置'
        assert self.position1 == get_element(self.driver, self.position_locator).text

        # 点击报名
        signed_labor_demand_contract_instant.think_more()
        signed_labor_demand_contract_instant.choice_amount_and_submit()  # 报名参加
        labor_contract_info = get_labor_contract_info(self.la_participant_ukid)
        status = str(labor_contract_info['status'])
        assert status == '20'
        sleep(2)
        new_labor_contract = get_new_labor_contract(self.user_id)
        print(new_labor_contract)
        new_labor_contract_no = int(new_labor_contract['new_labor_contract_no'])
        operation_record_no = int(new_labor_contract['operation_record_no'])
        rs_repository_no = int(new_labor_contract['rs_repository_no'])

        print(new_labor_contract_no, rs_repository_no, operation_record_no)
        assert new_labor_contract_no * 2 == rs_repository_no == operation_record_no * 2

        get_element(self.driver, self.la_unit_locator).click()
        sleep(1)
        get_element(self.driver, self.enter_for_locator).click()
        get_element(self.driver, self.enter_me_locator).click()
        sleep(2)
        labor_contract_info = get_labor_contract_info(self.la_participant_ukid)
        status = str(labor_contract_info['status'])
        assert status == '30'  # 判断状态
        labor_contract1 = get_labor_contract_ukid(self.user_id, self.la_participant_ukid)
        print(labor_contract1)
        new_labor_contract = get_new_labor_contract(self.user_id)
        new_labor_contract_no = int(new_labor_contract['new_labor_contract_no'])
        operation_record_no = int(new_labor_contract['operation_record_no'])
        rs_repository_no = int(new_labor_contract['rs_repository_no'])
        assert new_labor_contract_no * 2 == rs_repository_no == operation_record_no * 2
        pass