瀏覽代碼

Merge branch 'hotfix/bay' of SEEC-II-FrontEnd-Team/SEEC-II-FrontEnd into develop

WuXinyu 7 年之前
父節點
當前提交
f15e54629d

+ 0 - 4
package.json

@@ -34,13 +34,10 @@
     "@pollyjs/persister-fs": "^1.4.1",
     "@pollyjs/persister-local-storage": "^1.4.1",
     "@vue/cli-plugin-babel": "^3.2.0",
-    "@vue/cli-plugin-e2e-nightwatch": "^3.2.0",
     "@vue/cli-plugin-eslint": "^3.2.0",
     "@vue/cli-plugin-pwa": "^3.2.0",
-    "@vue/cli-plugin-unit-jest": "^3.2.0",
     "@vue/cli-service": "^3.2.0",
     "@vue/eslint-config-prettier": "^4.0.0",
-    "@vue/test-utils": "^1.0.0-beta.20",
     "babel-core": "7.0.0-bridge.0",
     "babel-eslint": "^10.0.1",
     "babel-jest": "^23.6.0",
@@ -52,7 +49,6 @@
     "lint-staged": "^7.2.2",
     "node-sass": "^4.9.0",
     "sass-loader": "^7.0.1",
-    "setup-polly-jest": "^0.5.2",
     "vue-cli-plugin-buefy": "^0.3.3",
     "vue-template-compiler": "^2.5.17",
     "winston": "^3.1.0"

+ 0 - 19
tests/e2e/custom-assertions/elementCount.js

@@ -1,19 +0,0 @@
-// A custom Nightwatch assertion.
-// The assertion name is the filename.
-// Example usage:
-//
-//   browser.assert.elementCount(selector, count)
-//
-// For more information on custom assertions see:
-// http://nightwatchjs.org/guide#writing-custom-assertions
-
-exports.assertion = function elementCount(selector, count) {
-  this.message = `Testing if element <${selector}> has count: ${count}`;
-  this.expected = count;
-  this.pass = val => val === count;
-  this.value = res => res.value;
-  function evaluator(_selector) {
-    return document.querySelectorAll(_selector).length;
-  }
-  this.command = cb => this.api.execute(evaluator, [selector], cb);
-};

+ 0 - 14
tests/e2e/specs/test.js

@@ -1,14 +0,0 @@
-// For authoring Nightwatch tests, see
-// http://nightwatchjs.org/guide#usage
-
-module.exports = {
-  "default e2e tests": browser => {
-    browser
-      .url(process.env.VUE_DEV_SERVER_URL)
-      .waitForElementVisible("#app", 5000)
-      .assert.elementPresent(".hello")
-      .assert.containsText("h1", "Welcome to Your Vue.js App")
-      .assert.elementCount("img", 1)
-      .end();
-  }
-};

+ 0 - 5
tests/unit/.eslintrc.js

@@ -1,5 +0,0 @@
-module.exports = {
-  env: {
-    jest: true
-  }
-};

+ 0 - 15
tests/unit/api/polly.config.js

@@ -1,15 +0,0 @@
-import { Polly } from "@pollyjs/core";
-import FetchAdapter from "@pollyjs/adapter-fetch";
-import XHRAdapter from "@pollyjs/adapter-xhr";
-import LocalStoragePersister from "@pollyjs/persister-local-storage";
-
-Polly.register(FetchAdapter);
-Polly.register(XHRAdapter);
-Polly.register(LocalStoragePersister);
-
-export default Polly;
-
-export const pollyConfig = {
-  adapters: ["fetch", "xhr"],
-  persister: "local-storage"
-};

+ 0 - 22
tests/unit/api/user.spec.js

@@ -1,22 +0,0 @@
-import { setupPolly } from "setup-polly-jest";
-import "whatwg-fetch";
-const getPost = async id => {
-  const response = await fetch(`/posts/${id}`);
-
-  const json = await response.json();
-
-  return Object.assign(json, { ok: response.ok, status: response.status });
-};
-describe("user api test", () => {
-  let context = setupPolly({
-    /* default configuration options */
-  });
-
-  test("should have polly running with `test`", async () => {
-    const { server } = context.polly;
-    server.get("/posts/*path").intercept((req, res) => {
-      res.send(1);
-    });
-    expect(await getPost(1)).toHaveProperty("id", 1);
-  });
-});

+ 0 - 12
tests/unit/example.spec.js

@@ -1,12 +0,0 @@
-import { shallowMount } from "@vue/test-utils";
-import HelloWorld from "@/components/HelloWorld.vue";
-
-describe("HelloWorld.vue", () => {
-  it("renders props.msg when passed", () => {
-    const msg = "new message";
-    const wrapper = shallowMount(HelloWorld, {
-      propsData: { msg }
-    });
-    expect(wrapper.text()).toMatch(msg);
-  });
-});

文件差異過大導致無法顯示
+ 31 - 472
yarn.lock


部分文件因文件數量過多而無法顯示