Пример #1
0
 def test_user_freeze(self, text="【用户删除】"):
     user_number = self.user_manage.get_text(user_manage.loc("user_number"))
     self.user_manage.click_user_all()
     self.user_manage.click_user_delete()
     self.user_manage.click_user_delete_confirm()
     self.user_manage.not_text_element(user_manage.loc("user_number"),
                                       user_number, text)
Пример #2
0
 def test_delete_rank(self, rank_name=data("test_create_rank")):
     self.user_manage.click_edit_rank()
     self.user_manage.click_lower_rank()
     self.user_manage.click_delete_rank()
     self.user_manage.click_edit_rank(clrar=1)
     self.user_manage.element_number(user_manage.loc("edit_rank_name_list"),
                                     5, "删除职级【%s】" % rank_name)
Пример #3
0
 def test_create_rank(self, rank_name=data("test_create_rank")):
     self.user_manage.click_edit_rank()
     self.user_manage.click_rank_lower()
     self.user_manage.input_rank_name(rank_name)
     self.user_manage.click_edit_rank_confirm()
     self.user_manage.displayed_true(user_manage.loc("edit_rank_name"),
                                     "创建职级【%s】" % rank_name)
 def test_department_delete_juji(self, department_data=data("test_delete_juji")):
     self.user_manage.click_edit_rank_juji()
     self.user_manage.click_edit_department()
     self.user_manage.click_delete_department()
     self.user_manage.click_delete_department_confirm()
     self.user_manage.click_delete_department_confirm()
     self.user_manage.element_number(user_manage.loc("department_list"), department_data[1],
                                     "删除局级【%s】" % department_data[0])
Пример #5
0
 def test_department_edit_juji(self,
                               department_data=data("test_edit_juji")):
     self.user_manage.click_director_edit_juji()
     self.user_manage.click_edit_department()
     self.user_manage.input_department_name(department_data[0])
     self.user_manage.input_email(department_data[1])
     self.user_manage.click_department_confirm()
     self.user_manage.displayed_true(user_manage.loc("edit_rank_juji"),
                                     "编辑局级【%s】" % department_data[0])
 def test_create_juji(self, department_data=data("test_create_juji")):
     self.user_manage.click_create_department()
     self.user_manage.input_department_name(department_data[0])
     self.user_manage.click_rank_list()
     self.user_manage.click_rank_juji(clear=1)
     self.user_manage.input_email(department_data[1])
     self.user_manage.click_department_confirm()
     self.user_manage.element_number(user_manage.loc("department_list"),
                                     department_data[2],
                                     "创建局级【%s】" % department_data[0])
Пример #7
0
 def test_user_create(self, user_data=data("test_user_create")):
     user_number = self.user_manage.get_text(user_manage.loc("user_number"))
     self.user_manage.click_user_create()
     self.user_manage.input_user_name(user_data["user_name"])
     self.user_manage.input_name(user_data["name"])
     self.user_manage.click_unit_list()
     self.user_manage.click_unit_keji()
     self.user_manage.click_man()
     self.user_manage.input_ip_address(user_data["ip"])
     self.user_manage.input_mac_address(user_data["mac"])
     self.user_manage.input_tel(user_data["tel"])
     self.user_manage.input_mobile(user_data["mobile"])
     self.user_manage.click_ad()
     self.user_manage.click_nis()
     self.user_manage.click_user_create_confirm()
     sleep(5)
     self.user_manage.not_text_element(user_manage.loc("user_number"),
                                       user_number,
                                       "创建用户【%s】" % user_data["user_name"])
 def test_create_keji(self, department_data=data("test_create_keji")):
     self.user_manage.click_create_department()
     self.user_manage.input_department_name(department_data[0])
     self.user_manage.click_rank_list()
     self.user_manage.click_rank_keji(clear=1)
     self.user_manage.click_director()
     self.user_manage.click_new_director_chuji()
     self.user_manage.click_department_confirm()
     self.user_manage.element_number(user_manage.loc("department_list"),
                                     department_data[1],
                                     "创建科级【%s】" % department_data[0])
Пример #9
0
 def test_department_edit_chuji(self,
                                department_data=data("test_edit_chuji")):
     self.user_manage.click_director_edit_chuji()
     self.user_manage.click_edit_department()
     self.user_manage.input_department_name(department_data)
     self.user_manage.click_rank_list()
     self.user_manage.click_rank_keji(clear=1)
     self.user_manage.click_director()
     self.user_manage.click_edit_director_chuji()
     self.user_manage.click_department_confirm()
     self.user_manage.displayed_true(user_manage.loc("edit_rank_keji"),
                                     "编辑处级【%s】" % department_data)
Пример #10
0
 def test_import_template(self, file_name=data("import_name")):
     user_number = self.user_manage.get_text(user_manage.loc("user_number"))
     self.user_manage.click_import_template()
     self.user_manage.file_upload(file_name)
     self.user_manage.not_text_element(user_manage.loc("user_number"), user_number,
                                       "【导入用户】")
 def test_user_unlock(self, text="【用户解锁】"):
     self.user_manage.click_user_all()
     self.user_manage.click_user_unlock()
     self.user_manage.displayed_true(user_manage.loc("user_unlock"), text)
 def test_user_freeze(self, text="【用户冻结】"):
     self.user_manage.click_user_all()
     self.user_manage.click_user_freeze()
     self.user_manage.displayed_true(user_manage.loc("user_freeze"), text)