Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.

created a new vue-cli-2 app with quasar UI and Cypress 10 #93

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions vue-cli-2-quasar-ui/cypress/support/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { mount } from "@cypress/vue";
import { Quasar } from "quasar";
import quasarUserOptions from "../../src/quasar-user-options";

Cypress.Commands.add("mount", (component, options = {}) => {
options.global = options.global || {};
options.global.plugins = options.global.plugins || [];
return mount(component, {
...options,
global: {
...options.global,
plugins: [[Quasar, quasarUserOptions], ...options.global.plugins],
},
});
});
4 changes: 3 additions & 1 deletion vue-cli-2-quasar-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-vue": "^7.0.0",
"html-webpack-plugin": "4",
"sass": "1.32.12",
Expand All @@ -36,7 +37,8 @@
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
"eslint:recommended",
"plugin:cypress/recommended"
],
"parserOptions": {
"parser": "babel-eslint"
Expand Down
5 changes: 2 additions & 3 deletions vue-cli-2-quasar-ui/src/components/Card.cy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { mount } from "@cypress/vue";
import Card from "./Card.vue";

it("renders the Card component", () => {
mount(Card);
cy.mount(Card);

// cy.get("h1").contains("Hello Cypress!");
cy.contains("Our Changing Planet");
});
9 changes: 8 additions & 1 deletion vue-cli-2-quasar-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3816,6 +3816,13 @@ eslint-loader@^2.2.1:
object-hash "^1.1.4"
rimraf "^2.6.1"

eslint-plugin-cypress@^2.12.1:
version "2.12.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632"
integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA==
dependencies:
globals "^11.12.0"

eslint-plugin-vue@^7.0.0:
version "7.20.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.20.0.tgz#98c21885a6bfdf0713c3a92957a5afeaaeed9253"
Expand Down Expand Up @@ -4559,7 +4566,7 @@ global-dirs@^3.0.0:
dependencies:
ini "2.0.0"

globals@^11.1.0:
globals@^11.1.0, globals@^11.12.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
Expand Down