No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. vinstah
    V
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 10
    • Best 3
    • Groups 0

    vinstah

    @vinstah

    3
    Reputation
    563
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    vinstah Follow

    Best posts made by vinstah

    • RE: [0.15.1] Components registering within Jest tests

      @onrel I did have the same issue but when using shallow() from @vue/test-utils, I stopped getting that error as it wasn’t actually rendering any child components.

      I am testing that my methods work with Jest and use TestCafe for UI functional testing

      posted in Help
      V
      vinstah
    • RE: What's the suggested Cordova App Wrapper workflow?

      Hi ohho,

      When I’m building for android or ios I only need to run quasar build each time.
      If you remove the cordova folder each time and run quasar wrap cordova that will generate new cordova files.

      The www folder in cordova is symlinked to the dist folder of your source so, just rebuild with quasar build ios and then change into cordova folder to cordova run or cordova build

      posted in Framework
      V
      vinstah
    • RE: [Solved] Installed 0.15 but init still creates 0.14.9 app?

      I had the same problem until I updated my node version. with nvm. nvm install 8 && nvm use 8 && npm i quasar-cli@latest -g && npm i vue-cli -g && quasar init default

      posted in CLI
      V
      vinstah

    Latest posts made by vinstah

    • RE: [0.15.1] Components registering within Jest tests

      on a side note I can turn off those QPage needs to be child of QPageContainer messages by using jest --silent

      posted in Help
      V
      vinstah
    • RE: [0.15.1] Components registering within Jest tests

      Hi @MusicForMellons,
      You are correct vue-server-renderer is required for snapshots, it is also needed if you use render/renderToString from @vue/server-tests-utils

      posted in Help
      V
      vinstah
    • RE: why can't import component instead of modify config

      you can import all components in the config for development and run a terminal command to find components you have used in your project that way you can add them after dev has done

      posted in Framework
      V
      vinstah
    • RE: [0.15.1] Components registering within Jest tests

      @onrel I did have the same issue but when using shallow() from @vue/test-utils, I stopped getting that error as it wasn’t actually rendering any child components.

      I am testing that my methods work with Jest and use TestCafe for UI functional testing

      posted in Help
      V
      vinstah
    • RE: [0.15.1] Components registering within Jest tests

      I’ve finally cracked it after learning from different configurations in testing 0.15.x with jest

      npm install babel-jest jest-vue vue-template-compiler -D

      /src/tests/example.test.js

      import Quasar, * as All from 'quasar'
      import { shallow, createLocalVue } from '@vue/test-utils'
      import { IsEmpty } from 'ipayroll-js/src/utils'
      import Component from '@/pages/login.vue'
      
      const localVue = createLocalVue()
      localVue.use(Quasar, {components: All, directives: All, plugins: All})
      
      const wrapper = shallow(Component, {
        localVue,
        mocks: {
          $isEmpty: IsEmpty
        }
      })
      
      it('Component Page test:', () => {
        expect(wrapper.isVueInstance()).toBe(true)
      })
      

      package.json

      ...
      "jest": {
          "testMatch": [
            "<rootDir>/src/**/?(*.)(spec).js?(x)"
          ],
          "testPathIgnorePatterns": [
            "<rootDir>/src/e2e/"
          ],
          "moduleNameMapper": {
            "^@/(.*)$": "<rootDir>/src/$1"
          },
          "moduleFileExtensions": [
            "js",
            "vue"
          ],
          "collectCoverageFrom": [
            "**/*.{vue}"
          ],
          "transformIgnorePatterns": [
            "node_modules/core-js",
            "node_modules/babel-runtime",
            "node_modules/lodash",
            "node_modules/vue"
          ],
          "coverageDirectory": "<rootDir>/src/components/coverage",
          "transform": {
            "^.+\\.js$": "<rootDir>/node_modules/babel-jest",
            ".*\\.(vue)$": "<rootDir>/node_modules/jest-vue"
          },
          "mapCoverage": true
        }
      ...
      

      .babelrc

      {
        "presets": [
          [ "env", {"modules": false} ],
          "stage-2"
        ],
        "env": {
          "test": {
            "presets": [
              ["env", { "targets": { "node": "current" }}]
            ],
            "plugins": [
              [
                "module-resolver",
                {
                  "root": [
                    "./src"
                  ],
                  "alias": {
                    "quasar": "quasar-framework/dist/quasar.mat.esm.js",
                    "^vue$": "vue/dist/vue.common.js"
                  }
                }
              ]
            ]
          }
        },
        "plugins": ["transform-runtime"],
        "comments": false
      }
      
      
      posted in Help
      V
      vinstah
    • RE: If I add styles in one page they are applied on all [v0.15]

      you can use the scope attribute on <style> tag

      posted in Framework
      V
      vinstah
    • RE: [Solved] Installed 0.15 but init still creates 0.14.9 app?

      I had the same problem until I updated my node version. with nvm. nvm install 8 && nvm use 8 && npm i quasar-cli@latest -g && npm i vue-cli -g && quasar init default

      posted in CLI
      V
      vinstah
    • RE: android issue

      I found that debugging in chrome helped with android development.
      https://developers.google.com/web/tools/chrome-devtools/remote-debugging/

      posted in Help
      V
      vinstah
    • RE: What's the suggested Cordova App Wrapper workflow?

      Hi ohho,

      When I’m building for android or ios I only need to run quasar build each time.
      If you remove the cordova folder each time and run quasar wrap cordova that will generate new cordova files.

      The www folder in cordova is symlinked to the dist folder of your source so, just rebuild with quasar build ios and then change into cordova folder to cordova run or cordova build

      posted in Framework
      V
      vinstah
    • quasar serve vs debugging on android

      Hello,
      Im pretty new to the communty and have just started developing an app last month.

      Vue made it very easy to set up and build SPA and using quasar cli was very easy to build a android app.

      My app in prod talks to a JAVA based API, to get components set up I created mocks using json-server with included proxyAPI and making requests with axios.

      the problem I was facing was connecting to my prod server when running quasar serve, I encounter CORS not set on the server prevent any request. fixed by adding the CORS Headers to both my app and the server.
      Great I have a working app, so I quickly wrapped cordova and built an apk for android, connected the phone to usb for debugging and can view in chrome remote devices.

      running the application on Android I was faced with errors connecting again. It was those pesky CORS. I removed from live server and it works.

      Is there a best approach to switching between node server and cordova for my build?

      posted in Help
      V
      vinstah