Commit b6477954 authored by libin's avatar libin
Browse files

20190821

parent 37f0dfbe
......@@ -22,7 +22,7 @@ SER_PASSWD = "wafer.com"
SER_PORT = '22'
COMPANY_NAME = "autotest"
COMPANY_URL = "autotest.com"
COMPANY_ID = "10"
COMPANY_ID = "39"
COMPANY_URL_NEW = "autotest2.com"
COMPANY_URL_EMPTY = "waferxa.com"
......@@ -39,6 +39,7 @@ SEARCH_RESULT_TEXT_16 = "共 16 条"
SEARCH_RESULT_TEXT_3 = "共 3 条"
SEARCH_RESULT_TEXT_2 = "共 2 条"
SEARCH_RESULT_TEXT_4 = "共 4 条"
SEARCH_RESULT_TEXT_5 = "共 5 条"
SEARCH_RESULT_TEXT_6 = "共 6 条"
SEARCH_RESULT_TEXT_9 = "共 9 条"
SEARCH_RESULT_TEXT_10 = "共 10 条"
......@@ -316,7 +317,7 @@ BUILD_UPLOAD_FILE_PATH="\\img\\AIO_machine.jpg"
PRE_ATTRIBUTE_VALUE = 'value'
PRE_ATTRIBUTE_TITLE = 'title'
PRE_PARK_NAME = "西安软件园"
PRE_PARK_ID = "3"
PRE_PARK_ID = "114"
PRE_TIMEZONE = '北京'
PRE_CITY = "中国 / 陕西省 / 西安市"
PRE_MORNING_START_TIME = "09:00"
......@@ -330,27 +331,27 @@ PRE_ALL_DAY_END = "18:00"
预置的部门数据
'''
PRE_DEPARTMENT_NAME = "产品测试部"
PRE_DEPARTMENT_ID = "111"
PRE_DEPARTMENT_FATHER_ID = "110"
PRE_DEPARTMENT_ID = "898"
PRE_DEPARTMENT_FATHER_ID = "897"
'''预置的楼宇数据'''
PRE_BUILD_NAME ="零壹广场"
PRE_BUILD_ID ="3"
PRE_BUILD_ID ="80"
PRE_BUILD_BUILDTOKEN ="autotest001"
'''预置楼层信息'''
PRE_FLOOR_NAME = "3"
PRE_FLOOR_ID = "2"
PRE_FLOOR_ID = "62"
'''预制区域信息'''
PRE_AREA_NAME = "东区"
PRE_AREA_ID = "3"
PRE_AREA_ID = "137"
'''
预置的用户数据
'''
PRE_USER_NAME = "autotest"
PRE_USER_ID = "379"
PRE_USER_ID = "886"
PRE_USER_JOB_NUMBER = "autotest"
PRE_USER_CARD_NUMBER = "autotest"
PRE_USER_EMAIL = "at@autotest.com"
......@@ -361,24 +362,24 @@ PRE_USER_WORKSTATION_NUMBER = "FS001"
'''
系统默认的角色数据
'''
COMMON_USER_ROLE_ID = "34"
COMMON_USER_ROLE_ID = "149"
COMMON_USER_ROLE_NAME = u"普通用户"
COMMON_USER_DEPARTMENT = u"所有部门"
COMMON_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
COMMON_USER_SCOPES = '{"scopes":[{"scopeType":-1,"tableIds":0}]}'
COMMON_USER_ROLEURL = '1,2,3,4,5,6,7,8,11,13,15,16,17,18,19,20,21,22,26,27,28,29,31,32,33,34,35,36,37,38,39,45,46,50,51,52,53,55,57,58,62,63,64,65,66,67,68,69,70,71,90,91,92,93,94,98,99,100,101,102,106,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133'
COMMON_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
# COMMON_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
# COMMON_USER_SCOPES = '{"scopes":[{"scopeType":-1,"tableIds":0}]}'
# COMMON_USER_ROLEURL = '1,2,3,4,5,6,7,8,11,13,15,16,17,18,19,20,21,22,26,27,28,29,31,32,33,34,35,36,37,38,39,45,46,50,51,52,53,55,57,58,62,63,64,65,66,67,68,69,70,71,90,91,92,93,94,98,99,100,101,102,106,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133'
# COMMON_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
SPECIAL_USER_ROLE_NAME = u"特殊预约用户"
SPECIAL_USER_ROLE_ID = "35"
SPECIAL_USER_ROLE_ID = "150"
SPECIAL_USER_DEPARTMENT = u"所有部门"
SPECIAL_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
SPECIAL_USER_SCOPES = '{"scopes":[{"scopeType":-1,"tableIds":0}]}'
SPECIAL_USER_ROLEURL = '1,2,3,4,5,6,7,8,11,13,15,16,17,18,19,20,21,22,26,27,28,29,31,32,33,34,35,36,37,38,39,45,46,50,51,52,53,55,57,58,62,63,64,65,66,67,68,69,70,71,90,91,92,93,94,98,99,100,101,102,106,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133'
SPECIAL_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
# SPECIAL_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
# SPECIAL_USER_SCOPES = '{"scopes":[{"scopeType":-1,"tableIds":0}]}'
# SPECIAL_USER_ROLEURL = '1,2,3,4,5,6,7,8,11,13,15,16,17,18,19,20,21,22,26,27,28,29,31,32,33,34,35,36,37,38,39,45,46,50,51,52,53,55,57,58,62,63,64,65,66,67,68,69,70,71,90,91,92,93,94,98,99,100,101,102,106,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133'
# SPECIAL_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
'''预置的工位数据'''
PRE_MOBILE_STATION_ID = "89"
PRE_FIXED_STATION_ID = "90"
PRE_MOBILE_STATION_ID = "532"
PRE_FIXED_STATION_ID = "533"
PRE_MOBILE_STATION_NAME = "PM001"
PRE_FIXED_STATION_NAME = "PF001"
PRE_STATION_PARK = PRE_PARK_NAME
......
UPLOADING_STATION_MAP_BTN = "//div[@class='ant-table-fixed-right']//tbody/tr[1]//a[1]/i"
UPLOADING_STATION_MAP2_BTN = "//div[@class='ant-table-fixed-right']//tbody/tr[2]//a[1]/i"
EDIT_STATION_MAP_BTN = "#main .ant-table-fixed-right tbody tr:first-child a:nth-child(2) i"
STATION_SEAT_MANAGEMENT_BTN = "icon-zuowei_0"
STATION_SEAT_MANAGEMENT_BTN = "#main .ant-table-fixed-right tbody tr:first-child a:nth-child(3) i"
DRAW_PATH_BTN = ".//i[@class='iconfont icon-lujingfenxi']"
DYNAMIC_MSG = ".//*[@class='ant-message-notice-content']/div[1]/span[1]"
......@@ -26,7 +26,7 @@ AREA_OF_REGION_INPUT = "[name='areaAge'] input"
'''编辑工位地图页面'''
SINGLE_ROW_ICON = ".//div[@class='svg-ele']/*[name()='svg']/*[name()='g']/*[name()='rect']"
PIN_ICON = ".//*[@class='attr-svg']/div[2]/div[2]/div"
STATION_TARGET_POSITION_X = 400
STATION_TARGET_POSITION_X = 500
STATION_TARGET_POSITION_Y = 200
COPY_BTN = ".//*[@class='attr-btn']/button[1]"
DELETE_BTN = ".//*[@class='attr-btn']/button[2]"
......@@ -50,7 +50,10 @@ INTERVAL_INPUT = ".//div[@class='attr-items']/div[6]/div[1]/div[2]/input"
'''工位座位管理'''
PAGE_TITLE = ".//div[@class='box-head']/span[1]"
STATION_SEAT_ADDED_STATION = ".//*[@class='map-body']/div[1]/*[name()='svg']/*[name()='g']/*[name()='g']/*[name()='g']"
STATION_SEAT_ADDED_STATION = ".//*[@class='map-body']/div[1]/*[name()='svg']/*[name()='g']/*[name()='g']/*[name()='g']/*[name()='g']/*[name()='g']/*[name()='rect']"
STATION_SEAT_BINDED_STATION = ".//*[@class='map-body']/div[1]/*[name()='svg']/*[name()='g']/*[name()='g']/*[name()='g']/*[name()='g']/*[name()='text']"
STATION_SEAT_ADDED_STATION1 = ".//*[@class='map-body']/div[1]/*[name()='svg']/*[name()='g']/*[name()='g']/*[name()='g'][1]/*[name()='g']/*[name()='g']/*[name()='rect']"
STATION_SEAT_ADDED_STATION2 = ".//*[@class='map-body']/div[1]/*[name()='svg']/*[name()='g']/*[name()='g']/*[name()='g'][2]/*[name()='g']/*[name()='g']/*[name()='rect']"
#工位属性弹框
STATION_ATTRIBUTE_BOX_TITLE = ".//div[@class='ant-modal-header']/div[1]"
STATION_ATTRIBUTE_BOX_STATION_NUMBER_INPUT = ".//div[@class='ant-modal-body']/ul[1]/li[1]/div[1]"
......@@ -58,7 +61,7 @@ STATION_ATTRIBUTE_BOX_FIXED_STATION_RADIO = ".//div[@class='ant-radio-group']/la
STATION_ATTRIBUTE_BOX_MOBILE_STATION_RADIO = ".//div[@class='ant-radio-group']/label[2]/span[1]/input"
STATION_ATTRIBUTE_BOX_STATUS_DROPDOWN_BOX = ".//div[@class='ant-modal-body']/ul[1]/li[3]/div[1]"
STATION_ATTRIBUTE_BOX_EMPLOYEE_INPUT = ".//input[@class='ant-input']"
STATION_ATTRIBUTE_BOX_EMPLOYEE_INPUT_VALUE = ".//span[@class='ant-tag-text']"
STATION_ATTRIBUTE_BOX_EMPLOYEE_INPUT_VALUE = ".//div[@class='ant-select-selection__choice__content']"
STATION_ATTRIBUTE_BOX_DELETE_BTN = ".//div[@class='ant-modal-footer']/div[1]/button[1]"
STATION_ATTRIBUTE_BOX_CANCEL_BTN = ".//div[@class='ant-modal-footer']/div[1]/button[2]"
STATION_ATTRIBUTE_BOX_CONFIRM_BTN = ".//div[@class='ant-modal-footer']/div[1]/button[3]"
......
......@@ -59,7 +59,7 @@ AREA_DROPDOWN_LIST = ".form-group [name='page.filter.area'] .ant-select-selectio
STATION_TYPE_FIXED = "[name='page.filter.type'] label:nth-child(1) input"
STATION_TYPE_MOBILE = "[name='page.filter.type'] label:nth-child(2) input"
DEPARTMENT_DROPDOWN_LIST = ".form-group [name='page.filter.dept'] .ant-select-selection__rendered"
DEPARTMENT_DROPDOWN_LIST_TEXT = "#form-group > li:nth-child(7) > div > span > span > ul > li.ant-select-selection__choice > span.ant-select-selection__choice__content"
DEPARTMENT_DROPDOWN_LIST_TEXT = "#form-group li:nth-child(7) .ant-select-selection-selected-value"
DEPARTMENT_DROPDOWN_CHECK = "#form-group > div > div > div > div > ul > li > span.ant-select-tree-node-content-wrapper.ant-select-tree-node-content-wrapper-normal > span"
DEPARTMENT_DROPDOWN_LIST_TEXT_DELETE_BTN = "[name='page.filter.dept'] .ant-select-selection__choice>span"
DEPARTMENT_DROPDOWN_LIST_TEXT_2 = ".//*[@id='form-group']/li[7]/div/div/div/div/ul/li[2]/div"
......@@ -68,7 +68,7 @@ USER_DROPDOWN_LIST = ".//*[@id='form-group']/li[8]/div/div/ul/li"
#编辑工位时,会多显示一项“状态”,所以用户项向下挪动一个,XPATH发生变化
USER_EDIT_INPUT = "[name='page.filter.user'] .ant-input"
USER_EDIT_DROPDOWN_LIST = ".//*[@name='page.filter.user']/div/ul/li[1]/span"
USER_EDIT_DROPDOWN_LIST_TEXT = "[name='page.filter.user'] .ant-tag-text"
USER_EDIT_DROPDOWN_LIST_TEXT = "#form-group li:nth-child(10) .ant-select-selection-selected-value"
USER_EDIT_DROPDOWN_LIST_TEXT_DELETE_BTN = "[name='page.filter.user'] .ant-tag>i"
STATUS_DROPDOWN_LIST = "[name='page.table.status']"
MOBILE_STATUS_DROPDOWN_LIST = "[name='page.table.status'] .ant-select-selection-selected-value"
......
......@@ -9,10 +9,10 @@ DEPARTMENT_DROPDOWN_LIST_FORTH = ".//*[@id='formContent']/div[3]/div/div/div/ul/
DEPARTMENT_DROPDOWN_LIST_FIFTH = ".//*[@id='formContent']/div[3]/div/div/div/ul/li[5]"
DEPARTMENT_DROPDOWN_LIST_DELETE_BTN = "//*[@id='formContent']/span/span/ul/li[1]/span[1]"
RANGE = "[name ='system.role.scope'] span:nth-child(2)"
RANGE_FIRST = "//*[@id='formContent']/div[2]/ul/li[5]/div/ul/li/ul/li[1]/span[2]/span"
RANGE_SECOND = "//*[@id='formContent']/div[2]/ul/li[5]/div/ul/li/ul/li[2]/span[2]/span"
RANGE_THIRD = "//*[@id='formContent']/div[2]/ul/li[5]/div/ul/li/ul/li[3]/span[2]/span"
RANGE_EXPAND_ARROW = ".//*[@class='form-content']/ul[1]/li[1]/span[1]"
RANGE_FIRST = "//*[@id='formContent']/div[2]/ul/li[6]/div/ul/li/ul/li[1]/span[2]/span"
RANGE_SECOND = "//*[@id='formContent']/div[2]/ul/li[6]/div/ul/li/ul/li[2]/span[2]/span"
RANGE_THIRD = "//*[@id='formContent']/div[2]/ul/li[6]/div/ul/li/ul/li[3]/span[2]/span"
RANGE_EXPAND_ARROW = ".//*[@class='cont-right']/div[2]/ul/li[6]/div/ul/li/span"
DOWN_AUTHORIZATION_SWITCH = "[name='system.role.auth'] .ant-switch"
ADD_BTN = ".//*[@class='form-content']/button[1]"
RESET_BTN = ".//*[@class='form-content']/button[2]"
......
......@@ -30,8 +30,8 @@ USER_DEPARTMENT = "ul[class='form-group']>li>[name='page.filter.dept']"
USER_ROLE = "ul[class='form-group']>li>[name='user.import.role']"
USER_DEPARTMENT_CHECK = "/html/body/div[3]/div/div/div/ul/li[2]/span[2]"
USER_DEPARTMENT_CHECK1 = "/html/body/div[4]/div/div/div/ul/li[2]/span[2]"
USER_ROLE_GENERAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[3]"
USER_ROLE_SPECIAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[2]"
USER_ROLE_GENERAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[2]"
USER_ROLE_SPECIAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[3]"
USER_WORKSTATION = "/html/body/div[2]/div/div[2]/div/div[1]/div[2]/ul/li[7]/div/span"
USER_WORKSTATION_NUMBER = ".//*[@class='ant-select-selection__rendered']/div[2]/div[1]"
USER_INFORMATION_TEXT = ".//*[@id='main']/div/div[1]"
......
This diff is collapsed.
from src.datalib import test_data
from src.module import deal_db_data
# 初始化数据
deal_db_data.clear_stationelement()
\ No newline at end of file
# 预置多个部门数据
insert_department = '''INSERT INTO `organization`(domainId,orgFatherId,orgName,orgStatus)
VALUES({di},{fi},'测试部',0),({di},{fi},'测试部01',0),({di},{fi},'test department',0),({di},{fi},'test01',0),({di},{fi},'在线教育研发部',0),({di},{fi},'在线教育@',0),({di},{fi},'产品服务部',0),
({di},{fi},'云应用研发部',0),({di},{fi},'人事部',0),({di},{fi},'销售部',0),({di},{fi},'设计部',0),({di},{fi},'designer department',0);''' \
.format(di=test_data.COMPANY_ID, fi=test_data.PRE_DEPARTMENT_FATHER_ID)
deal_db_data.execute_sql(insert_department)
# 预置多条楼宇数据
insert_building = '''INSERT INTO `officebuilding`(`buildingToken`, `domainId`,`officeBuildingName`,`officeBuildingStatus`,`parkId`) VALUES('8881','{di}','零壹广场A座','0','{pi}'),
('8882','{di}','零壹广场B座','0','{pi}'),('8883','{di}','零壹广场C座','0','{pi}'),('8884','{di}','零壹广场D座','0','{pi}'),('8885','{di}','零壹广场E座','0','{pi}');
'''.format(di=test_data.COMPANY_ID, pi=test_data.PRE_PARK_ID)
deal_db_data.execute_sql(insert_building)
\ No newline at end of file
......@@ -116,17 +116,17 @@ class CreatePark(unittest.TestCase):
self.brower.click_element(xtpz_yqgl.DETERMINE_BUTTON)#点击“确定”按钮
self.brower.assert_mark_msg(xtpz_yqgl.DYNAMIC_WARNING_MESSAGE, test_data.MORNING_START_TIME_EARLY_END_TIME_MSG)#检查出现动态提示文本:上午结束时间不能早于开始时间或请正确填写时间!
self.brower.click_element(xtpz_yqgl.MORNING_START, By.CSS_SELECTOR)#点击“上午开始时间”框
self.brower.clear_elem_text(xtpz_yqgl.MORNING_START_TIME)#清除已有的时间
self.brower.sendkeys_to_element(xtpz_yqgl.MORNING_START_TIME, "06:00")#输入时间:06:00
self.brower.clear_elem_text(xtpz_yqgl.TIME_INPUT, By.CSS_SELECTOR)#清除已有的时间
self.brower.sendkeys_to_element(xtpz_yqgl.TIME_INPUT, "06:00", By.CSS_SELECTOR)#输入时间:06:00
self.brower.click_element(xtpz_yqgl.MORNING_END, By.CSS_SELECTOR)#点击“上午结束时间”框,使得“上午开始时间”列表收回,不会遮挡“下午开始时间”框
self.brower.click_element(xtpz_yqgl.AFTERNOON_START, By.CSS_SELECTOR)#点击“下午开始时间”框
self.brower.clear_elem_text(xtpz_yqgl.AFTERNOON_START_TIME)#清除时间
self.brower.sendkeys_to_element(xtpz_yqgl.AFTERNOON_START_TIME, "20:00")#输入时间:20:00
self.brower.clear_elem_text(xtpz_yqgl.TIME_INPUT, By.CSS_SELECTOR)#清除时间
self.brower.sendkeys_to_element(xtpz_yqgl.TIME_INPUT, "20:00", By.CSS_SELECTOR)#输入时间:20:00
self.brower.click_element(xtpz_yqgl.DETERMINE_BUTTON)#点击“确定”按钮
self.brower.assert_mark_msg(xtpz_yqgl.DYNAMIC_WARNING_MESSAGE,test_data.AFTERNOON_START_TIME_EARLY_END_TIME_MSG)#检查出现动态提示信息:下午结束时间不能早于开始时间或请正确填写时间!
self.brower.click_element(xtpz_yqgl.AFTERNOON_START, By.CSS_SELECTOR)#点击“下午开始时间”框
self.brower.clear_elem_text(xtpz_yqgl.AFTERNOON_START_TIME)#清除时间
self.brower.sendkeys_to_element(xtpz_yqgl.AFTERNOON_START_TIME,"08:00")#输入时间:08:00
self.brower.clear_elem_text(xtpz_yqgl.TIME_INPUT, By.CSS_SELECTOR)#清除时间
self.brower.sendkeys_to_element(xtpz_yqgl.TIME_INPUT,"08:00", By.CSS_SELECTOR)#输入时间:08:00
self.brower.click_element(xtpz_yqgl.DETERMINE_BUTTON)#点击“确定”按钮
self.brower.assert_mark_msg(xtpz_yqgl.DYNAMIC_WARNING_MESSAGE, test_data.AFTERNOON_TIME_EARLY_MORNING_TIME)#检查出现动态提示信息:上下午时间存在重复
self.brower.click_element(xtpz_yqgl.CLOSE_BUTTON)#点击“关闭”按钮
......
......@@ -162,12 +162,12 @@ class CreateUser(unittest.TestCase):
self.browser.click_element(xtpz_yhxx.CANCEL_BTN)#点击“取消”按钮
# self.browser.assert_mark_msg(xtpz_yhxx.SEARCH_RESULT_TEXT, test_data.SEARCH_RESULT_TEXT_1)#断言添加用户失败,页面中数据仍为“共1条”
self.browser.click_element(xtpz_yhxx.ADD_USER_BTN)#点击“添加用户”按钮
#断言上一次的编辑内容被记住
self.browser.assert_attribute_msg(xtpz_yhxx.USER_NAME, test_data.ATTRIBUTE_VALUE, 'CYQ', By.CSS_SELECTOR)#断言姓名
self.browser.assert_attribute_msg(xtpz_yhxx.USER_JOB_NUMBER, test_data.ATTRIBUTE_VALUE, '002', By.CSS_SELECTOR)#断言工号
self.browser.assert_attribute_msg(xtpz_yhxx.USER_CARD_NUMBER, test_data.ATTRIBUTE_VALUE, '100', By.CSS_SELECTOR)#断言卡号
self.browser.assert_attribute_msg(xtpz_yhxx.USER_EMAIL, test_data.ATTRIBUTE_VALUE, '6564@163.com', By.CSS_SELECTOR)#断言邮箱
self.browser.click_element(xtpz_yhxx.CLOSE_BTN)#点击“关闭”按钮
#断言上一次的编辑内容被记住,不记了
# self.browser.assert_attribute_msg(xtpz_yhxx.USER_NAME, test_data.ATTRIBUTE_VALUE, 'CYQ', By.CSS_SELECTOR)#断言姓名
# self.browser.assert_attribute_msg(xtpz_yhxx.USER_JOB_NUMBER, test_data.ATTRIBUTE_VALUE, '002', By.CSS_SELECTOR)#断言工号
# self.browser.assert_attribute_msg(xtpz_yhxx.USER_CARD_NUMBER, test_data.ATTRIBUTE_VALUE, '100', By.CSS_SELECTOR)#断言卡号
# self.browser.assert_attribute_msg(xtpz_yhxx.USER_EMAIL, test_data.ATTRIBUTE_VALUE, '6564@163.com', By.CSS_SELECTOR)#断言邮箱
# self.browser.click_element(xtpz_yhxx.CLOSE_BTN)#点击“关闭”按钮
# self.browser.assert_mark_msg(xtpz_yhxx.SEARCH_RESULT_TEXT, test_data.SEARCH_RESULT_TEXT_1)#断言添加用户失败,页面中的数据仍为“共1条”
'''
......
......@@ -121,9 +121,9 @@ class CreateRole(unittest.TestCase):
self.browser.assert_attribute_msg(xtpz_jsgl.TSYY, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_CHECKBOX_AVAILABLE, By.CSS_SELECTOR)#断言“特殊预约”前的复选框可用
self.browser.click_element(xtpz_jsgl.TSYY, By.CSS_SELECTOR)#勾选“特殊预约”前的复选框
self.browser.assert_attribute_msg(xtpz_jsgl.TSYY, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_CHECKBOX_SELECTED, By.CSS_SELECTOR)#断言“特殊预约”前的复选框被选中
self.browser.assert_attribute_msg(xtpz_jsgl.DOWN_AUTHORIZATION_SWITCH, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_SWITCH_UNCHECKED, By.CSS_SELECTOR)#断言“向下授权”开关是OFF状态
self.browser.click_element(xtpz_jsgl.DOWN_AUTHORIZATION_SWITCH, By.CSS_SELECTOR)#点击“向下授权”开关
self.browser.assert_attribute_msg(xtpz_jsgl.DOWN_AUTHORIZATION_SWITCH, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_SWITCH_CHECKED, By.CSS_SELECTOR)#断言“向下授权”开关是ON状态
# self.browser.assert_attribute_msg(xtpz_jsgl.DOWN_AUTHORIZATION_SWITCH, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_SWITCH_UNCHECKED, By.CSS_SELECTOR)#断言“向下授权”开关是OFF状态
# self.browser.click_element(xtpz_jsgl.DOWN_AUTHORIZATION_SWITCH, By.CSS_SELECTOR)#点击“向下授权”开关
# self.browser.assert_attribute_msg(xtpz_jsgl.DOWN_AUTHORIZATION_SWITCH, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_SWITCH_CHECKED, By.CSS_SELECTOR)#断言“向下授权”开关是ON状态
self.browser.click_element(xtpz_jsgl.ADD_BTN)#点击“新增”按钮
self.browser.assert_mark_msg(xtpz_jsgl.DYNAMIC_WARNING_MSG, test_data.ADD_SUCCESS_MSG)#检查出现动态提示信息:添加成功
self.browser.assert_mark_msg(xtpz_jsgl.NEW_ADD_ROLE_TEXT, role_name)#断言左侧显示新添加的角色
......
......@@ -53,7 +53,7 @@ class DeletePark(unittest.TestCase):
#在园区“中关村”下添加楼宇
insert_building_sql = '''INSERT INTO `officebuilding`
(buildingToken,domainId,officeBuildingName,officeBuildingStatus,parkId)
VALUES('963',%s,'A座','0',(SELECT p.`id` FROM `park` p WHERE p.`parkName` = '中关村'));'''%(test_data.COMPANY_ID)
VALUES('963',%s,'A座','0',(SELECT p.`id` FROM `park` p WHERE p.`parkName` = '中关村' AND domainId=%s));'''%(test_data.COMPANY_ID,test_data.COMPANY_ID)
deal_db_data.execute_sql(insert_building_sql)
goto.goto_park(self.browser)
self.browser.assert_mark_msg(xtpz_yqgl.SEARCH_RESULT_TEXT,test_data.SEARCH_RESULT_TEXT_2) #断言页面左下角显示“共2 条”
......
......@@ -46,7 +46,7 @@ class EditUser(unittest.TestCase):
self.browser.assert_mark_msg(xtpz_yhxx.USER_DEPARTMENT, test_data.PRE_USER_DEPARTMENT, By.CSS_SELECTOR)
self.browser.assert_mark_msg(xtpz_yhxx.USER_ROLE, test_data.PRE_USER_ROLE, By.CSS_SELECTOR)
# self.browser.assert_attribute_msg(xtpz_yhxx.USER_WORKSTATION, test_data.ATTRIBUTE_CLASS, test_data.ATTRIBUTE_CLASS_SWITCH_CHECKED)
self.browser.assert_mark_msg(xtpz_yhxx.USER_WORKSTATION_NUMBER, "129")
# self.browser.assert_mark_msg(xtpz_yhxx.USER_WORKSTATION_NUMBER, "129")
user_name = 'edit user'
job_number = '0516'
card_number = '666'
......@@ -71,7 +71,7 @@ class EditUser(unittest.TestCase):
3.编辑框中的“关闭”按钮
'''
def test_edit_user_002(self):
'''修改工号为已经存在的工号,卡号(bug工号重复,能成功)'''
'''修改工号为已经存在的工号,卡号(一直loading)'''
insert_sql = '''insert into `userinfo` (attendanceCard,domainId,email,employeeId,employeeName,orgId,passWord,roleId,userFrom,userStatus)
values ('321',%s,'cyq@qq.com','002','cyq',%s,'wafer123',98,2,0);'''%(test_data.COMPANY_ID, test_data.PRE_DEPARTMENT_ID)
deal_db_data.execute_sql(insert_sql)
......
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