• 当前项目
    • 正在载入...
  • 登录

术习电报 / electron-vue-template

转到一个项目
切换导航栏
切换导航栏固定状态
  • 项目
  • 群组
  • 代码片段
  • 帮助
  • 项目
  • 活动
  • 版本库
  • 流水线
  • 图表
  • 问题 0
  • 合并请求 0
  • 维基
  • 网络
  • 创建新的问题
  • 构建
  • 提交
  • 问题看板
  • 文件
  • 提交
  • 网络
  • 比较
  • 分支
  • 标签
切换分支/标签
  • electron-vue-template
  • test
  • e2e
  • utils.js
  • umbrella22's avatar
    提交 · 4dc3112d
    4dc3112d
    umbrella22 在 2019-03-14 18:06:03 +0800 提交
utils.js 445 字节
原文件 审查 历史 永久链接
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
import electron from 'electron'
import { Application } from 'spectron'

export default {
  afterEach () {
    this.timeout(10000)

    if (this.app && this.app.isRunning()) {
      return this.app.stop()
    }
  },
  beforeEach () {
    this.timeout(10000)
    this.app = new Application({
      path: electron,
      args: ['dist/electron/main.js'],
      startTimeout: 10000,
      waitTimeout: 10000
    })

    return this.app.start()
  }
}