import request from '@/utils/request'

// 查询步骤列表
export function listCaseStep(query) {
  return request({
    url: '/test/caseStep/list',
    method: 'get',
    params: query,
    timeout: 10000
  })
}

// 查询步骤详细
export function getCaseStep(id) {
  return request({
    url: '/test/caseStep/detail',
    method: 'post',
    data: {id}
  })
}

// 查询步骤日志详细
export function getCaseStepResultLog(id) {
  return request({
    url: '/test/testCaseStepResult/detail',
    method: 'post',
    data: {id}
  })
}

// 新增步骤
export function addCaseStep(data) {
  return request({
    url: '/test/caseStep/add',
    method: 'post',
    data: data
  })
}

// 修改步骤
export function updateCaseStep(data) {
  return request({
    url: '/test/caseStep/edit',
    method: 'post',
    data: data
  })
}

// 删除步骤
export function delCaseStep(id) {
  return request({
    url: '/test/caseStep/del',
    method: 'post',
    data: {id}
  })
}

// 查询步骤日志详细
export function getCaseResult(sid) {
  return request({
    url: '/test/testCaseStepResult/list',
    method: 'get',
    params: {sid: sid}
  })
}
