Commit 862a219b authored by libin's avatar libin
Browse files

修改原定为bug但不是bug的testcase

parent 4fd48f10
......@@ -87,19 +87,19 @@ class EditCompany(unittest.TestCase):
'''修改的企业名重复'''
def test_edit_company_005(self):
'''修改企业名重复(bug,重复能成功)'''
'''修改企业名重复'''
self.object.click_element(administrator.ADMINSTRATOR_EDIT_BUTTON,By.CSS_SELECTOR) # 点击编辑按钮
self.object.assert_mark_msg(administrator.TITLE_EDIT_COMPANY,test_data.TITLE_EDIT_COMPANY,By.CSS_SELECTOR) # 断言弹窗标题
self.object.click_element(administrator.ADMINSTRATOR_EDIT_NAME_INPUT) # 点击企业名称编辑栏
NEW_COMPANY_NAME = test_data.COMPANY_NAME
NEW_COMPANY_URL = "editnewconpany1.com"
NEW_COMPANY_NAME = self.COMPANY_NAME
NEW_COMPANY_URL = "editnewconpany0.com"
self.object.clear_elem_text(administrator.ADMINSTRATOR_EDIT_NAME_INPUT) # 清除企业名称编辑栏中企业名称
self.object.set_value(administrator.ADMINSTRATOR_EDIT_NAME_INPUT,NEW_COMPANY_NAME) # 输入新的企业名称
self.object.clear_elem_text(administrator.ADMINSTRATOR_EDIT_URL_INPUT) # 清除企业域名编辑栏中企业域名
self.object.set_value(administrator.ADMINSTRATOR_EDIT_URL_INPUT, NEW_COMPANY_URL) # 输入新的企业域名
self.object.click_element(administrator.ENSURE_EDIT_BUTTON, By.CSS_SELECTOR) # 点击确认按钮
self.object.assert_mark_msg(administrator.ASSERT_EDIT_ERROR, test_data.ASSERT_EDIT_ERROR_SPECIAL, By.CSS_SELECTOR) # 断言提示信息
self.object.click_element(administrator.X_EDIT_BUTTON, By.CSS_SELECTOR) # 点击X按钮
self.object.assert_mark_msg(administrator.ASSERT_EDIT_SUCCESS,test_data.ASSERT_EDIT_SUCCESS, By.CSS_SELECTOR) # 断言提示信息
# self.object.click_element(administrator.X_EDIT_BUTTON, By.CSS_SELECTOR) # 点击X按钮
'''修改的企业域名包含@'''
def test_edit_company_006(self):
......
......@@ -131,12 +131,14 @@ class CreateStation(unittest.TestCase):
[gwwh_gwxx.DEPARTMENT_DROPDOWN_CHECK, ""])
self.browser.click_element(gwwh_gwxx.CONFIRM_BTN)#点击“确定”按钮
#检查出现动态提示信息:“请输入正确格式的工位编号!”
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.WRONG_FORMAT_STATION_NUMBER_MSG)
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.ADD_SUCCESS_MSG) # 添加成功,检查出现动态提示文本“添加成功!”
self.browser.assert_mark_msg(gwwh_gwxx.SEARCH_RESULT, test_data.SEARCH_RESULT_TEXT_3) # 断言页面左下角显示“共1条”文本
# self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.WRONG_FORMAT_STATION_NUMBER_MSG)
#点击“取消”按钮
# self.browser.click_element(gwwh_gwxx.CANCEL_BTN)#点击“取消”按钮
# self.browser.assert_mark_msg(gwwh_gwxx.NO_DATA_TEXT,test_data.SEARCH_NO_DATA_MSG,By.CLASS_NAME) #断言工位数据表中没有数据,说明添加工位失败
select_sql = "SELECT COUNT(*) FROM `mobilestation` WHERE domainId=%s;" % ( test_data.COMPANY_ID)
deal_db_data.assert_select_result(select_sql, 2) #2个初始数据
deal_db_data.assert_select_result(select_sql, 3) #2个初始数据
'''
author:曹英群
......@@ -159,11 +161,13 @@ class CreateStation(unittest.TestCase):
[gwwh_gwxx.DEPARTMENT_DROPDOWN_CHECK, ""])
self.browser.click_element(gwwh_gwxx.CONFIRM_BTN)#点击“确定”按钮
#检查出现动态提示信息:“请输入正确格式的工位编号!”
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.WRONG_FORMAT_STATION_NUMBER_MSG)
# self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.WRONG_FORMAT_STATION_NUMBER_MSG)
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.ADD_SUCCESS_MSG) # 添加成功,检查出现动态提示文本“添加成功!”
self.browser.assert_mark_msg(gwwh_gwxx.SEARCH_RESULT, test_data.SEARCH_RESULT_TEXT_3) # 断言页面左下角显示“共1条”文本
# self.browser.click_element(gwwh_gwxx.CLOSE_BTN)#点击“关闭”按钮
# self.browser.assert_mark_msg(gwwh_gwxx.NO_DATA_TEXT, test_data.SEARCH_NO_DATA_MSG,By.CLASS_NAME)#断言工位数据表中没有数据,说明添加工位失败
select_sql = "SELECT COUNT(*) FROM `mobilestation` WHERE domainId=%s;" % (test_data.COMPANY_ID)
deal_db_data.assert_select_result(select_sql, 2) # 2个初始数据
deal_db_data.assert_select_result(select_sql, 3) # 2个初始数据
'''
......@@ -186,10 +190,12 @@ class CreateStation(unittest.TestCase):
[gwwh_gwxx.DEPARTMENT_DROPDOWN_LIST, ""], \
[gwwh_gwxx.DEPARTMENT_DROPDOWN_CHECK, ""])
self.browser.click_element(gwwh_gwxx.CONFIRM_BTN)#点击“确定”按钮
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.WRONG_FORMAT_STATION_NUMBER_MSG)#检查出现动态提示文本“请输入正确格式的工位编号!”
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.ADD_SUCCESS_MSG) # 添加成功,检查出现动态提示文本“添加成功!”
self.browser.assert_mark_msg(gwwh_gwxx.SEARCH_RESULT, test_data.SEARCH_RESULT_TEXT_3) # 断言页面左下角显示“共1条”文本
# self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.WRONG_FORMAT_STATION_NUMBER_MSG)#检查出现动态提示文本“请输入正确格式的工位编号!”
# self.browser.assert_mark_msg(gwwh_gwxx.NO_DATA_TEXT, test_data.SEARCH_NO_DATA_MSG,By.CLASS_NAME)#断言工位数据表中没有数据,说明添加工位失败
select_sql = "SELECT COUNT(*) FROM `mobilestation` WHERE domainId=%s;" % (test_data.COMPANY_ID)
deal_db_data.assert_select_result(select_sql, 2) # 2个初始数据
deal_db_data.assert_select_result(select_sql, 3) # 2个初始数据
'''
author:曹英群
......
......@@ -85,7 +85,7 @@ class DeleteUser(unittest.TestCase):
self.browser.assert_mark_msg(xtpz_yhxx.SEARCH_RESULT_TEXT ,test_data.SEARCH_RESULT_TEXT_13)
self.browser.click_element(xtpz_yhxx.SECOND_LINE_DELETE_BTN)
self.browser.assert_mark_msg(xtpz_yhxx.DELETE_CONFIRM_BOX_TITLE, test_data.DELETE_CONFIRM_BOX_TITLE_TEXT)
self.browser.assert_mark_msg(xtpz_yhxx.DELETE_CONFIRM_BOX_TEXT, test_data.DELETE_CONFIRM_BOX_TEXT_USE)
self.browser.assert_mark_msg(xtpz_yhxx.DELETE_CONFIRM_BOX_TEXT, test_data.DELETE_CONFIRM_BOX_TEXT_CHINESE)
self.browser.click_element(xtpz_yhxx.DELETE_CONFIRM_BTN)
self.browser.assert_mark_msg(xtpz_yhxx.DYNAMIC_WARNING_MSG, test_data.DELETE_SUCCESS_MSG)
self.browser.assert_mark_msg(xtpz_yhxx.SEARCH_RESULT_TEXT, test_data.SEARCH_RESULT_TEXT_12)
......
......@@ -141,7 +141,7 @@ class EditRole(unittest.TestCase):
# 编辑用户:
# 1.修改特殊预约用户管理菜单,个人菜单
# 和3合并
# '''
# '''
# def test_edit_role_005(self):
# self.browser.click_element(xtpz_jsgl.THIRD_LINE_ROLE)
# self.browser.click_element(xtpz_jsgl.THIRD_LINE_EDIT_BTN)
......
......@@ -293,9 +293,10 @@ class EditStation(unittest.TestCase):
self.browser.select_option_by_css_and_text(status) #选择“停用”
self.browser.assert_mark_msg(gwwh_gwxx.LOTS_STATUS_LIST_TEXT, status) #断言“状态”下拉框中显示“停用”
self.browser.click_element(gwwh_gwxx.CONFIRM_BTN) #点击“确定”按钮
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.STATUS_NOT_CHANGE_TO_BLOCK_UP) #检查出现动态提示信息:未启用的工位不能编辑为停用
self.browser.click_element(gwwh_gwxx.CANCEL_BTN) #点击“取消”按钮
self.browser.assert_mark_msg(gwwh_gwxx.SECOND_LINE_STATUS, test_data.PRE_STATION_STATUS) #断言PM001的状态未被修改
self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG,test_data.LOTS_EDIT_SUCCESS_MSG) # 检查出现动态提示文本:批量编辑成功!
# self.browser.assert_mark_msg(gwwh_gwxx.DYNAMIC_WARNING_MSG, test_data.STATUS_NOT_CHANGE_TO_BLOCK_UP) #检查出现动态提示信息:未启用的工位不能编辑为停用
# self.browser.click_element(gwwh_gwxx.CANCEL_BTN) #点击“取消”按钮
# self.browser.assert_mark_msg(gwwh_gwxx.SECOND_LINE_STATUS, test_data.PRE_STATION_STATUS) #断言PM001的状态未被修改
'''
author:曹英群
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment