Exemplo n.º 1
0
 def test_CJTD_0006(self):
     """创建团建-姓名为空"""
     team = CreateTeamPage()
     team.input_team_name("测试团队")
     team.choose_location()
     team.choose_industry()
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(1)
     team.page_should_contain_text("管理员姓名不能为空")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 2
0
 def test_CJTD_0003(self):
     """创建团队-团队名称为空"""
     team = CreateTeamPage()
     team.choose_location()
     team.choose_industry()
     team.input_real_name('admin')
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(1)
     team.page_should_contain_text("请输入团队名称")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 3
0
 def test_TDCJ_0005(self):
     """创建团建-行业为空"""
     team = CreateTeamPage()
     team.input_team_name("测试团队")
     team.choose_location()
     team.input_real_name('admin')
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(1)
     team.page_should_contain_text("请选择行业")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 4
0
 def test_CJTD_0019(self):
     """账号为大陆手机号邮箱地址自动填写"""
     team = CreateTeamPage()
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     # 有默认的团队,就不创建
     default_team_name = Preconditions.get_team_name()
     workbench.click_enterprise_name_triangle()
     time.sleep(1)
     teams = workbench.get_team_names()
     current_mobile().back()
     if default_team_name in teams:
         print("当前已有团队:" + default_team_name + ",未再创建!")
         workbench.click_create_team()
         team.wait_for_page_load()
         return
     # 点击最底部的“创建团队”
     workbench.click_create_team()
     team.wait_for_page_load()
     # user_name = "哈" * 20
     # Preconditions.create_team(default_team_name, user_name)
     email = team.get_email_text()
     a = current_mobile().get_cards(CardType.CHINA_MOBILE)[0]
     b = a + "@139.com"
     if not email == b:
         raise AssertionError("邮箱地址没有自动填写")
     #创建团队
     team = CreateTeamPage()
     team.input_team_name(default_team_name)
     team.choose_location()
     team.choose_industry()
     team.input_real_name("admin")
     # 立即创建团队
     team.click_immediately_create_team()
     # 点击完成设置工作台
     team.wait_for_setting_workbench_page_load()
     team.click_finish_setting_workbench()
     team.wait_for_create_team_success_page_load()
     # 进入工作台
     team.click_enter_workbench()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     # 回到创建团队页面
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 5
0
 def test_CJTD_0012(self):
     """管理员姓名少于2位"""
     team = CreateTeamPage()
     team.input_team_name("我我我")
     team.choose_location()
     team.choose_industry()
     team.input_real_name('a')
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("管理员姓名不得少于2位")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 6
0
 def test_CJTD_0009(self):
     """地区只选一级行业,不选二级行业"""
     #1.在移动端创建团队页面,其他信息填写完成,地区只选一级行业,不选二级行业,点【提交注册】
     team = CreateTeamPage()
     team.input_team_name("我我我")
     team.choose_location()
     team.input_real_name('admin')
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("请选择行业")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 7
0
 def test_CJTD_0013(self):
     """管理员姓名超过20个汉字"""
     team = CreateTeamPage()
     team.input_team_name("我我我")
     team.choose_location()
     team.choose_industry()
     name = "好" * 21
     team.input_real_name(name)
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("姓名不能超过20个汉字或60个字母")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 8
0
 def test_CJTD_0002(self):
     """企业名称少于3个字"""
     # 1.在移动端创建团队页面,企业名称输入少于3个字,点【提交注册】
     team = CreateTeamPage()
     team.input_team_name("我")
     team.choose_location()
     team.choose_industry()
     team.input_real_name('admin')
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(1)
     team.page_should_contain_text("团队名称不少于3个字")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 9
0
 def test_CJTD_0021(self):
     """输入无效的邮箱地址格式"""
     team = CreateTeamPage()
     team.input_team_name("我我我")
     team.choose_location()
     team.choose_industry()
     name = "admin"
     team.input_real_name(name)
     team.input_email("123456")
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("请输入正确的邮箱地址")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 10
0
 def test_CJTD_0016(self):
     """管理员姓名输入1位+空格"""
     #1.在移动端创建团队页面,其他信息填写完成,管理员姓名输入管理员姓名输入1位+空格,点【提交注册】
     team = CreateTeamPage()
     team.input_team_name("我我我")
     team.choose_location()
     team.choose_industry()
     name = "a "
     team.input_real_name(name)
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("管理员姓名不得少于2位")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 11
0
 def test_CJTD_0028(self):
     """敏感词检验 -- 管理员检查"""
     # 1、依次填写企业名称、选择所在地、行业
     # 2、管理员姓名输入敏感词:如法论功等
     team = CreateTeamPage()
     team.input_team_name("test_CJTD_0028")
     team.choose_location()
     team.choose_industry()
     name = "法轮功"
     team.input_real_name(name)
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("315")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 12
0
 def test_CJTD_0027(self):
     """敏感词检验 -- 企业名称检查"""
     # 1、企业名称输入敏感词:如法论功组织等
     # 2、其他正常信息正常填写
     team = CreateTeamPage()
     team.input_team_name("法轮功")
     team.choose_location()
     team.choose_industry()
     name = "admin"
     team.input_real_name(name)
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("311")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()
Exemplo n.º 13
0
 def test_CJTD_0025(self):
     """同一个账号一天内注册第四家企业"""
     #1.在移动端创建团队页面,同一个账号一天内注册第四家企业
     #前提是当天已经创建了3家企业
     team = CreateTeamPage()
     team.input_team_name("我我我")
     team.choose_location()
     team.choose_industry()
     name = "admin"
     team.input_real_name(name)
     # team.input_email("123456")
     # 立即创建团队
     team.click_immediately_create_team()
     time.sleep(2)
     team.page_should_contain_text("您今天创建的团队已达上限")
     team.click_sure()
     # 清除输入数据
     team.click_back()
     workbench = WorkbenchPage()
     workbench.wait_for_page_load()
     workbench.click_create_team()
     team.wait_for_page_load()