Compare commits

..

6 Commits
dev ... master

4 changed files with 36 additions and 114 deletions

View File

@ -1,2 +1,3 @@
# openTT # openTT
222

34
add.txt Normal file
View File

@ -0,0 +1,34 @@
新版tpi改动的文件
Index.js
contex/TPIContextProvider.js
page/main/LeftViewContainer.js
taskList/TaskList.js
TPMIndexHOC.js
App.js
CodeRepositoryViewContainer.js
Index.js
choose={context.chooses}
TPIContextProvider.js
LeftViewContainer.js
TaskList.js
TPMIndexHOC.js
MainContentContainer
rep_content返回值多了一层 {content: '...'}
TODO
待同步
1、timer图标样式更换
index.html
WebSSHTimer.css
WebSSHTimer.js

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# @Version: Python 3.9 # @Version: Python 3.9
# @Time : 2023/1/9 17:08 # @Time : 2023/1/9 17:08
# @Author : chen3333yinhua # @Author : chenyi11nhua
# @File : settings.py # @File : settings.py
# @Software: PyCharm # @Software: PyCharm
# @Desc: 项目配置文件 # @Desc: 项目配置文件

View File

@ -1,113 +0,0 @@
"""
@FileNametest_issue_permission.py.py
@Description
@AuthorFloraachy
@Time2024/11/22 13:46
"""
# 第三方库导入
import pytest
import allure
# 本地应用/模块导入
from settings import GITLINK_DIR,GLOBAL_VARS
from utils.requests_utils.request_control import RequestControl
@allure.epic("GitLink")
@allure.feature("权限测试")
@allure.story("合并请求PR")
@pytest.mark.flow
@allure.title("在私有仓库测试非仓库成员访问合并请求,访问报错")
def test_pr_permission_on_private_repo(gitlink_login):
"""
合并请求权限测试
"""
with allure.step("登录用户新建一个私有仓库"):
global_var = GLOBAL_VARS.copy()
global_var["user_id"] = GLOBAL_VARS["env_user_id"]
global_var["_cookies"] = GLOBAL_VARS["cookies"]
project_info = RequestControl().api_request_flow(api_file_path=GITLINK_DIR,
key="gitlink_projects_new_project_02",
global_var=global_var)
global_var["repo_owner"] = project_info["repo_owner"]
global_var["repo_identifier"] = project_info["repo_identifier"]
global_var["init_repo_owner"] = project_info["repo_owner"]
global_var["init_repo_identifier"] = project_info["repo_identifier"]
with allure.step("仓库拥有者,获取测试仓库的默认分支"):
res = RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_get_repo_detail_full_01",
global_var=global_var)
global_var.update(res)
with allure.step("仓库拥有者代码库新建文件,提交的分支新分支"):
global_var["repo_file_path"] = "test_permission.py"
res = RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_repo_create_files_05",
global_var=global_var)
global_var.update(res)
with allure.step("仓库拥有者,新建一个合并请求"):
issue_info = RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_repo_new_pull_request_01",
global_var=global_var)
global_var.update(issue_info)
with allure.step("非项目成员登录"):
global_var["env_login"] = GLOBAL_VARS["t_login"]
global_var["env_password"] = GLOBAL_VARS["t_password"]
login_info = RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_login_01",
global_var=global_var)
global_var["cookies"] = login_info["cookies"]
with allure.step("非项目成员,访问合并请求详情,应该报错"):
RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_repo_get_pull_request_detail_02",
global_var=global_var)
with allure.step("仓库拥有者,删除仓库"):
global_var["cookies"] = global_var["_cookies"]
RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_projects_delete_project_01",
global_var=global_var)
@allure.epic("GitLink")
@allure.feature("权限测试")
@allure.story("合并请求PR")
@pytest.mark.flow
@allure.title("在公有仓库测试非仓库成员访问合并请求的,访问成功")
def test_pr_permission_on_public_repo(gitlink_login):
"""
合并请求权限
"""
with allure.step("登录用户新建一个公开仓库"):
global_var = GLOBAL_VARS.copy()
global_var["user_id"] = GLOBAL_VARS["env_user_id"]
global_var["_cookies"] = GLOBAL_VARS["cookies"]
project_info = RequestControl().api_request_flow(api_file_path=GITLINK_DIR,
key="gitlink_projects_new_project_01",
global_var=global_var)
global_var["repo_owner"] = project_info["repo_owner"]
global_var["repo_identifier"] = project_info["repo_identifier"]
global_var["init_repo_owner"] = project_info["repo_owner"]
global_var["init_repo_identifier"] = project_info["repo_identifier"]
with allure.step("仓库拥有者,获取测试仓库的默认分支"):
res = RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_get_repo_detail_full_01",
global_var=global_var)
global_var.update(res)
with allure.step("仓库拥有者,代码库新建文件,提交的分支新分支"):
global_var["repo_file_path"] = "test_permission.py"
res = RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_repo_create_files_05",
global_var=global_var)
global_var.update(res)
with allure.step("仓库拥有者,新建一个合并请求"):
issue_info = RequestControl().api_request_flow(api_file_path=GITLINK_DIR,
key="gitlink_repo_new_pull_request_01",
global_var=global_var)
global_var.update(issue_info)
with allure.step("非项目成员登录"):
global_var["env_login"] = GLOBAL_VARS["t_login"]
global_var["env_password"] = GLOBAL_VARS["t_password"]
login_info = RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_login_01",
global_var=global_var)
global_var["cookies"] = login_info["cookies"]
with allure.step("非项目成员,访问合并请求详情,访问成功"):
RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_repo_get_pull_request_detail_01",
global_var=global_var)
with allure.step("仓库拥有者,删除仓库"):
global_var["cookies"] = global_var["_cookies"]
RequestControl().api_request_flow(api_file_path=GITLINK_DIR, key="gitlink_projects_delete_project_01",
global_var=global_var)