コード例 #1
0
 def test_add_shelves_08(self, df_login_xadmin, delete_shelfgrouplevel):
     '''验证已存在的货架组名称,不可再次添加'''
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理/商品配置"):
         pass
     with allure.step("step3: 点击新增货架组"):
         result = commodity_information(s).add_shelves(name="柬埔寨货架11")
         result = commodity_information(s).add_shelves(name="柬埔寨货架11")
     with allure.step("step4: 断言"):
         assert result['result'] == '已經存在相同貨架組級'
コード例 #2
0
 def test_add_commmodity_03(self, df_login_xadmin):
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理"):
         pass
     with allure.step("step3 :点击新增商品按钮"):
         result = commodity_information(s).add_commmodity()
     with allure.step("step4 :断言"):
         assert result['result'] == '商品20111110系統內已存在'
コード例 #3
0
 def test_import_ware(self, df_login_xadmin, delete__ware):
     '''验证模板导入批量商品配置有效性'''
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理/商品配置/货架组级门店管理"):
         pass
     with allure.step("step3 :已创建好的货架组,点击分配门店"):
         result = commodity_information(s).import_ware()
     with allure.step("step4: 断言"):
         assert result['result'] == '導入貨架組級-商品數據文件成功'
コード例 #4
0
 def test_relate_shelfgrouplevel_10(self, df_login_xadmin):
     '''验证货架组关联门店功能的有效性'''
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理/商品配置/货架组级门店管理"):
         pass
     with allure.step("step3 :已创建好的货架组,点击分配门店"):
         result = commodity_information(s).relate_shelfgrouplevel()
     with allure.step("step4: 断言"):
         assert result['result'] == '操作成功'
コード例 #5
0
 def test_update_commodity_05(self, df_login_xadmin):
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理"):
         pass
     with allure.step("step3: 新增商品后,点击修改商品"):
         result = commodity_information(s).update_commodity_info()
     with allure.step("step4: 断言"):
         assert result['result'] == '操作成功'
         assert result['data'] == None
コード例 #6
0
 def select_commodity_info_04(self):
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理"):
         pass
     with allure.step("step3: 新增商品后,点击查询该商品的查看功能键"):
         result = commodity_information(s).select_commodity_info(
             rfId=20111110)
         assert result['code'] == 'success'
         assert result['result'] == '操作成功'
コード例 #7
0
 def test_get_query_02(self, df_login_xadmin, test_input, expected, title):
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统列表页"):
         pass
     with allure.step("step3 :输入商家商品编码,点击查询"):
         result = commodity_information(s).get_query_ware(
             test_input["rfIds"], test_input["skuIds"],
             test_input["itemNums"], test_input["sapTitle"])
     with allure.step("step4 :断言"):
         assert result['result'] == expected['result']
コード例 #8
0
 def test_add_shelves_09(self, df_login_xadmin, delete_shelfgrouplevel):
     '''验证修改货架组信息功能的有效性'''
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理/商品配置"):
         pass
     with allure.step("step3: 点击新增货架组"):
         result = commodity_information(s).update_shelves(
             name="柬埔寨货架13", code="JPZ011", purchaseCatId="859380", id="98")
     with allure.step("step4: 断言"):
         assert result['result'] == '操作成功'
コード例 #9
0
    def test_import_commodity_01(self, df_login_xadmin):

        with allure.step("step1 :登录"):
            s = df_login_xadmin
            DF_Login(s)
        with allure.step("step2 :进入到商品系统-品类管理页"):
            pass
        with allure.step("step3 :点击导入功能按钮,选择要上传的文件"):
            import_group = commodity_information(s).import_source_group()
        with allure.step("step4 :断言"):
            assert import_group['code'] == 'success'
            assert import_group['data'] == None
コード例 #10
0
 def test_query_list_06(self, df_login_xadmin, test_input, excepted, title):
     with allure.step("step1 :登录"):
         s = df_login_xadmin
         DF_Login(s)
     with allure.step("step2 :进入到商品系统管理"):
         pass
     with allure.step("step3: 进入到商品配置中的货架组配置页,点击查询"):
         result = commodity_information(s).query_list_shelves(
             test_input['pageSize'], test_input['currentPage'],
             test_input['name'], test_input['code'],
             test_input['purchaseCatId'])
     with allure.step("step4: 断言"):
         assert result['result'] == excepted['result']
         assert result['code'] == excepted['code']