Commit e9841ad4 authored by libin's avatar libin
Browse files

20190726

parent 82a1222f
This diff is collapsed.
......@@ -496,7 +496,10 @@ class WebClient():
def sleep(self):
time.sleep(10)
time.sleep(self.timeout)
def sleep(self,time):
time.sleep(time)
if __name__ == '__main__':
a = WebClient("http://testsmartworkspace294.rd.virsical.cn/manage/")
......
......@@ -283,7 +283,7 @@ WRONG_USER_CARD_NUMBER = u"用户卡号必须为字母或数字以及其组合"
'''
ROLE_MANAGEMENT_TEXT = u"角色管理"
EMPTY_ROLE_NAME_MSG = u"角色名称不允许为空"
EMPTY_DEPARTMENT_MSG = u"部门不能为空"
EMPTY_DEPARTMENT_MSG = u"请选择部门"
EMPTY_RANGE_MSG = u"请选择范围"
REPETITION_ROLE_NAME_MSG = u"角色名称已存在"
DELETE_ROLE_CONFIRM_TEXT = u"确认删除此权限角色?"
......@@ -325,7 +325,7 @@ PRE_ALL_DAY_END = "18:00"
预置的部门数据
'''
PRE_DEPARTMENT_NAME = "产品测试部"
PRE_DEPARTMENT_ID = "497"
PRE_DEPARTMENT_ID = "2065"
PRE_DEPARTMENT_FATHER_ID = "496"
'''预置的楼宇数据'''
......@@ -345,7 +345,7 @@ PRE_AREA_ID = "28"
预置的用户数据
'''
PRE_USER_NAME = "autotest"
PRE_USER_ID = "942"
PRE_USER_ID = "1684"
PRE_USER_JOB_NUMBER = "autotest"
PRE_USER_CARD_NUMBER = "autotest"
PRE_USER_EMAIL = "at@autotest.com"
......
......@@ -73,7 +73,7 @@ def clear_department():
#清空除预置用户的其他数据
def clear_user():
sql = "DELETE FROM `userinfo` WHERE domainID = %s AND employeeId NOT IN ('%s','%s');"%(test_data.COMPANY_ID, test_data.PRE_USER_ID, "admin")
sql = "DELETE FROM `userinfo` WHERE domainID = %s AND employeeId NOT IN ('%s','%s');"%(test_data.COMPANY_ID, test_data.PRE_USER_NAME, "admin")
execute_sql(sql)
# 清空除预置角色的其他数据
......
......@@ -169,7 +169,7 @@ class CreatePark(unittest.TestCase):
deal_db_data.assert_select_result(select_sql, 1)
def tearDown(self):
self.imgs = self.browser.imgs
self.imgs = self.brower.imgs
self.brower.exit_all_browsers() #退出浏览器
#删除数据,恢复环境
deal_db_data.clear_park()
......
......@@ -89,6 +89,7 @@ class CreateUser(unittest.TestCase):
xtpz_yhxx.USER_DEPARTMENT,xtpz_yhxx.USER_DEPARTMENT_CHECK,\
xtpz_yhxx.USER_ROLE,xtpz_yhxx.USER_ROLE_GENERAL_USER)
#断言“自动分配工位”是ON
self.browser.sleep()
self.browser.assert_attribute_msg(xtpz_yhxx.USER_WORKSTATION, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_SWITCH_CHECKED, By.CSS_SELECTOR)
#断言“工位编号”为预置的固定工位fixed001
self.browser.assert_mark_msg(xtpz_yhxx.USER_WORKSTATION_NUMBER, 'fixed001')
......
......@@ -9,7 +9,7 @@ from selenium.webdriver.common.by import By
class CreateWorkdayAndVacation(unittest.TestCase):
def setUp(self):
deal_db_data.clear_rate_ate()
# deal_db_data.clear_rate_ate()
self.browser = web_client.WebClient(test_data.MANAGE_URL)
login_swp.login01(self.browser, test_data.COMPANYADMIN_NAME, test_data.COMPANYADMIN_PW) #登录
self.browser.click_element(companyadmin.COMPANYADMIN_XTPZ) #点击导航菜单中的“工位管理”
......@@ -147,7 +147,7 @@ class CreateWorkdayAndVacation(unittest.TestCase):
def tearDown(self):
self.imgs = self.browser.imgs
self.browser.exit_all_browsers()
deal_db_data.clear_rate_ate()
# deal_db_data.clear_rate_ate()
if __name__ == "__main__":
......
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