import request from '@/utils/request'

// 查询用例列表
export function listCase(query) {
  return request({
    url: '/test/case/list',
    method: 'get',
    params: query
  })
}

// 查询用例详细
export function getCase(id) {
  return request({
    url: '/test/case/detail',
    method: 'post',
    data: {id}
  })
}

// 新增用例
export function addCase(data) {
  return request({
    url: '/test/case/add',
    method: 'post',
    data: data
  })
}

// 修改用例
export function updateCase(data) {
  return request({
    url: '/test/case/edit',
    method: 'post',
    data: data
  })
}

// 删除用例
export function delCase(id) {
  return request({
    url: '/test/case/del',
    method: 'post',
    data: {id}
  })
}

// 执行用例
export function runCase(id) {
  return request({
    url: '/test/case/run',
    method: 'post',
    data: {id}
  })
}
