服务器正在运行,但可以找到应用程序圈子

时间:2019-01-29 17:52:35

标签: laravel vue.js circleci cypress

当前行为:

config.yml:

frontend-test:
    <<: *defaults
    docker:
      - image: cypress/base:8
      - image: circleci/node:10
    working_directory: ~/repo
    steps:
      - checkout
      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-
      - run: npm ci
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      - run: npm run test:cypress

Package.json:

{
    "cypress:run": "cypress run",
    "start": "webpack-dev-server --config ./webpack.config.js --mode development",
    "test:cypress": "start-server-and-test start http://localhost:8080 cypress",
    "cypress": "cypress run",
}

cypress:json:

{
    "baseUrl": "http://localhost:8080/",
    "fixturesFolder": "cypress/fixtures",
    "integrationFolder": "cypress/integration",
    "pluginsFile": "cypress/plugins",
    "screenshotsFolder": "cypress/screenshots",
    "supportFile": "cypress/support",
    "videosFolder": "cypress/videos"
}

webpack.config.js:

module.exports = {
    entry: "./public/js/app.js"
}

获取错误:

circlecieror

所需行为:

它说:

CypressError: cy.visit() failed trying to load:

http://localhost:8080/login

The response we received from your web server was:

  > 404: Not Found

前端是vuejs,因此登录页面是login.vue,正在加载vue-router

这4天来我一直在尝试,不知道怎么了,请帮忙

0 个答案:

没有答案