├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .postcssrc.js
├── .stylintrc
├── README.md
├── cypress.json
├── cypress
├── fixtures
│ └── example.json
├── integration
│ └── CadastraUsuario.spec.js
├── plugins
│ └── index.js
└── support
│ ├── commands.js
│ └── index.js
├── package-lock.json
├── package.json
├── quasar.conf.js
└── src
├── App.vue
├── assets
├── quasar-logo-full.svg
└── sad.svg
├── components
└── .gitkeep
├── css
├── app.styl
└── themes
│ ├── common.variables.styl
│ ├── variables.ios.styl
│ └── variables.mat.styl
├── i18n
├── en-us
│ └── index.js
└── index.js
├── index.template.html
├── layouts
└── MyLayout.vue
├── pages
├── Error404.vue
├── Index.vue
└── Usuario.vue
├── plugins
├── .gitkeep
├── axios.js
├── i18n.js
└── vue-the-mask.js
├── router
├── index.js
└── routes.js
├── statics
├── cypress-mocha-awesome.PNG
├── icons
│ ├── apple-icon-152x152.png
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── icon-128x128.png
│ ├── icon-192x192.png
│ ├── icon-256x256.png
│ ├── icon-384x384.png
│ ├── icon-512x512.png
│ └── ms-icon-144x144.png
├── interface-cypress.png
└── quasar-logo.png
└── store
├── index.js
└── module-example
├── actions.js
├── getters.js
├── index.js
├── mutations.js
└── state.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env", {
5 | "modules": false,
6 | "loose": false,
7 | "useBuiltIns": "usage"
8 | }
9 | ],
10 | [
11 | "@babel/preset-stage-2", {
12 | "modules": false,
13 | "loose": false,
14 | "useBuiltIns": true,
15 | "decoratorsLegacy": true
16 | }
17 | ]
18 | ],
19 | "plugins": [
20 | [
21 | "@babel/transform-runtime", {
22 | "polyfill": false,
23 | "regenerator": false
24 | }
25 | ]
26 | ],
27 | "comments": false
28 | }
29 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | /dist
2 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parserOptions: {
4 | parser: 'babel-eslint',
5 | sourceType: 'module'
6 | },
7 | env: {
8 | browser: true
9 | },
10 | extends: [
11 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
12 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
13 | 'plugin:vue/essential',
14 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md
15 | 'standard'
16 | ],
17 | // required to lint *.vue files
18 | plugins: [
19 | 'vue'
20 | ],
21 | globals: {
22 | 'ga': true, // Google Analytics
23 | 'cordova': true,
24 | '__statics': true
25 | },
26 | // add your custom rules here
27 | 'rules': {
28 | // allow async-await
29 | 'generator-star-spacing': 'off',
30 |
31 | // allow paren-less arrow functions
32 | 'arrow-parens': 0,
33 | 'one-var': 0,
34 |
35 | 'import/first': 0,
36 | 'import/named': 2,
37 | 'import/namespace': 2,
38 | 'import/default': 2,
39 | 'import/export': 2,
40 | 'import/extensions': 0,
41 | 'import/no-unresolved': 0,
42 | 'import/no-extraneous-dependencies': 0,
43 |
44 | // allow debugger during development
45 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .quasar
2 | .DS_Store
3 | .thumbs.db
4 | node_modules
5 | /dist
6 | /src-cordova/node_modules
7 | /src-cordova/platforms
8 | /src-cordova/plugins
9 | /src-cordova/www
10 | mochawesome-report
11 | cypress/videos
12 | npm-debug.log*
13 | yarn-debug.log*
14 | yarn-error.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | plugins: [
5 | // to edit target browsers: use "browserslist" field in package.json
6 | require('autoprefixer')
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/.stylintrc:
--------------------------------------------------------------------------------
1 | {
2 | "blocks": "never",
3 | "brackets": "never",
4 | "colons": "never",
5 | "colors": "always",
6 | "commaSpace": "always",
7 | "commentSpace": "always",
8 | "cssLiteral": "never",
9 | "depthLimit": false,
10 | "duplicates": true,
11 | "efficient": "always",
12 | "extendPref": false,
13 | "globalDupe": true,
14 | "indentPref": 2,
15 | "leadingZero": "never",
16 | "maxErrors": false,
17 | "maxWarnings": false,
18 | "mixed": false,
19 | "namingConvention": false,
20 | "namingConventionStrict": false,
21 | "none": "never",
22 | "noImportant": false,
23 | "parenSpace": "never",
24 | "placeholder": false,
25 | "prefixVarsWithDollar": "always",
26 | "quotePref": "single",
27 | "semicolons": "never",
28 | "sortOrder": false,
29 | "stackedProperties": "never",
30 | "trailingWhitespace": "never",
31 | "universal": "never",
32 | "valid": true,
33 | "zeroUnits": "never",
34 | "zIndexNormalize": false
35 | }
36 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Quasar App + Cypress
2 |
3 | > Exemplo de projeto com Quasar Framework, e testes e2e com Cypress.
4 |
5 | Você pode acessar a Demo online: [http://quasarcypress.surge.sh/#/usuario](http://quasarcypress.surge.sh/#/usuario)
6 |
7 | | Recurso | Versão |
8 | | ------ | ------ |
9 | | Sistema Operacional | Windows_NT(10.0.17134) - win32/x64 |
10 | | NodeJs | 10.16.2 |
11 | | quasar-cli | 0.17.26 |
12 | | quasar-framework | 0.17.20 |
13 | | NPM | 6.10.3 |
14 |
15 | # Instalação
16 |
17 | Faça o clone ou download do projeto.
18 | Acesse o diretório quasar-cypress e rode o comando:
19 |
20 | ```sh
21 | $ cd quasar-cypress
22 | $ npm install
23 | ```
24 |
25 | Ao terminar a instalação rode o comando para iniciar o projeto no modo de desenvolvimento do quasar:
26 | ```sh
27 | $ quasar dev
28 | ```
29 |
30 | Quando a aplicação estiver rodando em localhost:8080, rode o comando para executar o teste com cypress:
31 | ```sh
32 | $ npm run test
33 | ```
34 | O cypress irá gerar um vídeo de evidência dentro o caminho **quasar-cipress/cypress/video**.
35 | Além disso está instalado o [mochawesome](https://www.npmjs.com/package/mochawesome), que gera evidências html dentro do caminho **quasar-cipress/mochawesome-report**, basta abrir o arquivo .html no navegador para visualizar o resultado do teste executado.
36 |
37 | []()
38 |
39 |
40 | ## Interface Cypress
41 |
42 | []()
43 |
44 | Para utlizar a interface do cypress, basta rodar o comando:
45 |
46 | ```sh
47 | $ npm run test:e2e
48 | ```
49 |
50 | Com a interface do Cypress aberta e a aplicação rodando em localhost, clique no teste de integração **CadastraUsuario.spec.js** e o teste será iniciado.
--------------------------------------------------------------------------------
/cypress.json:
--------------------------------------------------------------------------------
1 | {
2 | "baseUrl": "http://quasarcypress.surge.sh/#",
3 | "reporter": "mochawesome"
4 | }
5 |
--------------------------------------------------------------------------------
/cypress/fixtures/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Using fixtures to represent data",
3 | "email": "hello@cypress.io",
4 | "body": "Fixtures are a great way to mock data for responses to routes"
5 | }
--------------------------------------------------------------------------------
/cypress/integration/CadastraUsuario.spec.js:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | // GUARDA E RE-SETA O LOCALSTORAGE A CADA ITERAÇÃO DE TESTE.
4 | // beforeEach(() => {
5 | // cy.restoreLocalStorage();
6 | // });
7 |
8 | // afterEach(() => {
9 | // cy.saveLocalStorage();
10 | // });
11 |
12 | context('Cadastro de Usuário', () => {
13 | // beforeEach(() => {
14 | // cy.visit('/usuario')
15 | // cy.wait(2000)
16 | // })
17 |
18 | it('Acesso Usuários', () => {
19 | cy.visit('/usuario')
20 | cy.wait(2000)
21 | })
22 |
23 | it('Preenche Campo Nome', () => {
24 | cy.get('input[data-cy="nome"]').focus().type('Patrick')
25 | })
26 |
27 | it('Preenche Campo Sobrenome', () => {
28 | cy.get('input[data-cy="sobrenome"]').focus().type('Monteiro')
29 | })
30 |
31 | it('Preenche Campo CPF', () => {
32 | cy.get('input[data-cy="cpf"]').focus().type('00700800910')
33 | })
34 |
35 | it('Preenche Campo Endereço', () => {
36 | cy.get('input[data-cy="endereco"]').focus().type('Rua Duque de Caxias 555')
37 | })
38 |
39 | it('Seleciono o Gênero', () => {
40 | cy.get('[data-cy="genero"]').click()
41 | cy.wait(500)
42 | cy.get('div.q-item-division').contains('Masculino').click()
43 | // cy.get('div[link=true]').eq(1).click()
44 | })
45 |
46 | it('Seleciono o Idioma', () => {
47 | cy.get('div[data-cy="idioma"] button').contains('Português').click()
48 | cy.wait(1000)
49 | // cy.get('div.q-item-division').contains('Masculino').click()
50 | // cy.get('div[link=true]').eq(1).click()
51 | })
52 |
53 | it('Clica no Botão Confirmar', () => {
54 | cy.get('button[data-cy="salvarUsuario"]').click()
55 | })
56 |
57 | it('Aguardo 1 Segundo', () => {
58 | cy.wait(500)
59 | cy.get('[data-cy="msg-success"]').scrollIntoView()
60 | cy.wait(500)
61 | })
62 |
63 | it('Verifico mensagem de confirmação', () => {
64 | cy.get('span[data-cy="alert-sucesso"]').contains("Usuário cadastrado com sucesso")
65 | })
66 |
67 | })
--------------------------------------------------------------------------------
/cypress/plugins/index.js:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example plugins/index.js can be used to load plugins
3 | //
4 | // You can change the location of this file or turn off loading
5 | // the plugins file with the 'pluginsFile' configuration option.
6 | //
7 | // You can read more here:
8 | // https://on.cypress.io/plugins-guide
9 | // ***********************************************************
10 |
11 | // This function is called when a project is opened or re-opened (e.g. due to
12 | // the project's config changing)
13 |
14 | module.exports = (on, config) => {
15 | // `on` is used to hook into various events Cypress emits
16 | // `config` is the resolved Cypress config
17 | }
18 |
--------------------------------------------------------------------------------
/cypress/support/commands.js:
--------------------------------------------------------------------------------
1 | // ***********************************************
2 | // This example commands.js shows you how to
3 | // create various custom commands and overwrite
4 | // existing commands.
5 | //
6 | // For more comprehensive examples of custom
7 | // commands please read more here:
8 | // https://on.cypress.io/custom-commands
9 | // ***********************************************
10 | //
11 | //
12 | // -- This is a parent command --
13 | // Cypress.Commands.add("login", (email, password) => { ... })
14 | //
15 | //
16 | // -- This is a child command --
17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
18 | //
19 | //
20 | // -- This is a dual command --
21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
22 | //
23 | //
24 | // -- This is will overwrite an existing command --
25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
26 |
27 | // -------------------------------------------------------------------------------------------------------
28 | // COMANDOS PARA GUARDAR O LOCALSTORAGE E RESTORELOCALSTORAGE
29 | // let LOCAL_STORAGE_MEMORY = {};
30 |
31 | // Cypress.Commands.add("saveLocalStorage", () => {
32 | // Object.keys(localStorage).forEach(key => {
33 | // LOCAL_STORAGE_MEMORY[key] = localStorage[key];
34 | // });
35 | // });
36 |
37 | // Cypress.Commands.add("restoreLocalStorage", () => {
38 | // Object.keys(LOCAL_STORAGE_MEMORY).forEach(key => {
39 | // localStorage.setItem(key, LOCAL_STORAGE_MEMORY[key]);
40 | // });
41 | // });
--------------------------------------------------------------------------------
/cypress/support/index.js:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands'
18 |
19 | Cypress.on('uncaught:exception', (err, runnable) => {
20 | // returning false here prevents Cypress from
21 | // failing the test
22 | return false
23 | })
24 |
25 | // Alternatively you can use CommonJS syntax:
26 | // require('./commands')
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "quasar-cypress",
3 | "version": "0.0.1",
4 | "description": "A Quasar Framework app",
5 | "productName": "Quasar App",
6 | "cordovaId": "org.cordova.quasar.app",
7 | "author": "patryckx",
8 | "private": true,
9 | "scripts": {
10 | "lint": "eslint --ext .js,.vue src",
11 | "test": "cypress run",
12 | "test:e2e": "cypress open -d"
13 | },
14 | "dependencies": {
15 | "axios": "^0.19.0",
16 | "vue-i18n": "^7.3.3",
17 | "vue-the-mask": "^0.11.1"
18 | },
19 | "devDependencies": {
20 | "babel-eslint": "^8.2.1",
21 | "cypress": "^3.3.2",
22 | "eslint": "^4.18.2",
23 | "eslint-config-standard": "^11.0.0",
24 | "eslint-friendly-formatter": "^4.0.1",
25 | "eslint-loader": "^2.0.0",
26 | "eslint-plugin-import": "^2.9.0",
27 | "eslint-plugin-node": "^6.0.1",
28 | "eslint-plugin-promise": "^3.7.0",
29 | "eslint-plugin-standard": "^3.0.1",
30 | "eslint-plugin-vue": "^4.3.0",
31 | "mocha": "^5.2.0",
32 | "mochawesome": "^3.1.1",
33 | "quasar-cli": "^0.17.24",
34 | "strip-ansi": "=3.0.1"
35 | },
36 | "engines": {
37 | "node": ">= 8.9.0",
38 | "npm": ">= 5.6.0",
39 | "yarn": ">= 1.6.0"
40 | },
41 | "browserslist": [
42 | "> 1%",
43 | "last 2 versions",
44 | "not ie <= 10"
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/quasar.conf.js:
--------------------------------------------------------------------------------
1 | // Configuration for your app
2 |
3 | module.exports = function (ctx) {
4 | return {
5 | // app plugins (/src/plugins)
6 | plugins: [
7 | 'i18n',
8 | 'axios',
9 | 'vue-the-mask'
10 | ],
11 | css: [
12 | 'app.styl'
13 | ],
14 | extras: [
15 | ctx.theme.mat ? 'roboto-font' : null,
16 | 'material-icons' // optional, you are not bound to it
17 | // 'ionicons',
18 | // 'mdi',
19 | // 'fontawesome'
20 | ],
21 | supportIE: false,
22 | build: {
23 | scopeHoisting: true,
24 | // vueRouterMode: 'history',
25 | // vueCompiler: true,
26 | // gzip: true,
27 | // analyze: true,
28 | // extractCSS: false,
29 | extendWebpack (cfg) {
30 | cfg.module.rules.push({
31 | enforce: 'pre',
32 | test: /\.(js|vue)$/,
33 | loader: 'eslint-loader',
34 | exclude: /node_modules/
35 | })
36 | }
37 | },
38 | devServer: {
39 | // https: true,
40 | // port: 8080,
41 | open: true // opens browser window automatically
42 | },
43 | // framework: 'all' --- includes everything; for dev only!
44 | framework: {
45 | components: [
46 | 'QLayout',
47 | 'QLayoutHeader',
48 | 'QLayoutDrawer',
49 | 'QPageContainer',
50 | 'QPage',
51 | 'QToolbar',
52 | 'QToolbarTitle',
53 | 'QBtn',
54 | 'QIcon',
55 | 'QList',
56 | 'QListHeader',
57 | 'QItem',
58 | 'QItemMain',
59 | 'QItemSide',
60 | 'QInput',
61 | 'QSelect',
62 | 'QBtnToggle'
63 | ],
64 | directives: [
65 | 'Ripple'
66 | ],
67 | // Quasar plugins
68 | plugins: [
69 | 'Notify'
70 | ]
71 | // iconSet: ctx.theme.mat ? 'material-icons' : 'ionicons'
72 | // i18n: 'de' // Quasar language
73 | },
74 | // animations: 'all' --- includes all animations
75 | animations: [],
76 | ssr: {
77 | pwa: false
78 | },
79 | pwa: {
80 | // workboxPluginMode: 'InjectManifest',
81 | // workboxOptions: {},
82 | manifest: {
83 | // name: 'Quasar App',
84 | // short_name: 'Quasar-PWA',
85 | // description: 'Best PWA App in town!',
86 | display: 'standalone',
87 | orientation: 'portrait',
88 | background_color: '#ffffff',
89 | theme_color: '#027be3',
90 | icons: [
91 | {
92 | 'src': 'statics/icons/icon-128x128.png',
93 | 'sizes': '128x128',
94 | 'type': 'image/png'
95 | },
96 | {
97 | 'src': 'statics/icons/icon-192x192.png',
98 | 'sizes': '192x192',
99 | 'type': 'image/png'
100 | },
101 | {
102 | 'src': 'statics/icons/icon-256x256.png',
103 | 'sizes': '256x256',
104 | 'type': 'image/png'
105 | },
106 | {
107 | 'src': 'statics/icons/icon-384x384.png',
108 | 'sizes': '384x384',
109 | 'type': 'image/png'
110 | },
111 | {
112 | 'src': 'statics/icons/icon-512x512.png',
113 | 'sizes': '512x512',
114 | 'type': 'image/png'
115 | }
116 | ]
117 | }
118 | },
119 | cordova: {
120 | // id: 'org.cordova.quasar.app'
121 | },
122 | electron: {
123 | // bundler: 'builder', // or 'packager'
124 | extendWebpack (cfg) {
125 | // do something with Electron process Webpack cfg
126 | },
127 | packager: {
128 | // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
129 |
130 | // OS X / Mac App Store
131 | // appBundleId: '',
132 | // appCategoryType: '',
133 | // osxSign: '',
134 | // protocol: 'myapp://path',
135 |
136 | // Window only
137 | // win32metadata: { ... }
138 | },
139 | builder: {
140 | // https://www.electron.build/configuration/configuration
141 |
142 | // appId: 'quasar-app'
143 | }
144 | }
145 | }
146 | }
147 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
15 |
--------------------------------------------------------------------------------
/src/assets/quasar-logo-full.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
192 |
--------------------------------------------------------------------------------
/src/assets/sad.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/components/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/components/.gitkeep
--------------------------------------------------------------------------------
/src/css/app.styl:
--------------------------------------------------------------------------------
1 | // app global css
2 |
--------------------------------------------------------------------------------
/src/css/themes/common.variables.styl:
--------------------------------------------------------------------------------
1 | // App Shared Variables
2 | // --------------------------------------------------
3 | // To customize the look and feel of this app, you can override
4 | // the Stylus variables found in Quasar's source Stylus files. Setting
5 | // variables before Quasar's Stylus will use these variables rather than
6 | // Quasar's default Stylus variable values. Stylus variables specific
7 | // to the themes belong in either the variables.ios.styl or variables.mat.styl files.
8 |
9 | // Check documentation for full list of Quasar variables
10 |
11 |
12 | // App Shared Color Variables
13 | // --------------------------------------------------
14 | // It's highly recommended to change the default colors
15 | // to match your app's branding.
16 |
17 | $primary = #027be3
18 | $secondary = #26A69A
19 | $tertiary = #555
20 |
21 | $neutral = #E0E1E2
22 | $positive = #21BA45
23 | $negative = #DB2828
24 | $info = #31CCEC
25 | $warning = #F2C037
26 |
--------------------------------------------------------------------------------
/src/css/themes/variables.ios.styl:
--------------------------------------------------------------------------------
1 | // App Shared Variables
2 | // --------------------------------------------------
3 | // Shared Stylus variables go in the common.variables.styl file
4 | @import 'common.variables'
5 |
6 | // iOS only Quasar variables overwrites
7 | // -----------------------------------------
8 |
--------------------------------------------------------------------------------
/src/css/themes/variables.mat.styl:
--------------------------------------------------------------------------------
1 | // App Shared Variables
2 | // --------------------------------------------------
3 | // Shared Stylus variables go in the common.variables.styl file
4 | @import 'common.variables'
5 |
6 | // Material only Quasar variables overwrites
7 | // -----------------------------------------
8 |
--------------------------------------------------------------------------------
/src/i18n/en-us/index.js:
--------------------------------------------------------------------------------
1 | // This is just an example,
2 | // so you can safely delete all default props below
3 |
4 | export default {
5 | failed: 'Action failed',
6 | success: 'Action was successful'
7 | }
8 |
--------------------------------------------------------------------------------
/src/i18n/index.js:
--------------------------------------------------------------------------------
1 | import enUS from './en-us'
2 |
3 | export default {
4 | 'en-us': enUS
5 | }
6 |
--------------------------------------------------------------------------------
/src/index.template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= htmlWebpackPlugin.options.productName %>
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/layouts/MyLayout.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
16 |
17 |
18 |
19 |
20 | Quasar App
21 | Running on Quasar v{{ $q.version }}
22 |
23 |
24 |
25 |
26 |
30 |
35 | Essential Links
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
80 |
81 |
83 |
--------------------------------------------------------------------------------
/src/pages/Error404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
Sorry, nothing here...(404)
10 |
Go back
15 |
16 |
17 |
18 |
23 |
--------------------------------------------------------------------------------
/src/pages/Index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
15 |
--------------------------------------------------------------------------------
/src/pages/Usuario.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | Usuário
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
31 |
32 |
33 |
48 |
49 |
50 |
52 |
53 |
54 |
55 |
Usuário cadastrado com sucesso
56 |
57 | Nome: {{ nome }}
58 |
59 |
60 | Sobrenome: {{ sobrenome }}
61 |
62 |
63 | Endereco: {{ endereco }}
64 |
65 |
66 | Gênero: {{ selectGenero }}
67 |
68 |
69 | Idioma: {{ idioma }}
70 |
71 |
72 |
73 |
74 |
75 |
106 |
107 |
109 |
--------------------------------------------------------------------------------
/src/plugins/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/plugins/.gitkeep
--------------------------------------------------------------------------------
/src/plugins/axios.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export default ({ Vue }) => {
4 | Vue.prototype.$axios = axios
5 | }
6 |
--------------------------------------------------------------------------------
/src/plugins/i18n.js:
--------------------------------------------------------------------------------
1 | import VueI18n from 'vue-i18n'
2 | import messages from 'src/i18n'
3 |
4 | export default ({ app, Vue }) => {
5 | Vue.use(VueI18n)
6 |
7 | // Set i18n instance on app
8 | app.i18n = new VueI18n({
9 | locale: 'en-us',
10 | fallbackLocale: 'en-us',
11 | messages
12 | })
13 | }
14 |
--------------------------------------------------------------------------------
/src/plugins/vue-the-mask.js:
--------------------------------------------------------------------------------
1 | import VueTheMask from 'vue-the-mask'
2 |
3 | export default ({ Vue }) => {
4 | Vue.use(VueTheMask)
5 | }
6 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from 'vue-router'
3 |
4 | import routes from './routes'
5 |
6 | Vue.use(VueRouter)
7 |
8 | /*
9 | * If not building with SSR mode, you can
10 | * directly export the Router instantiation
11 | */
12 |
13 | export default function (/* { store, ssrContext } */) {
14 | const Router = new VueRouter({
15 | scrollBehavior: () => ({ y: 0 }),
16 | routes,
17 |
18 | // Leave these as is and change from quasar.conf.js instead!
19 | // quasar.conf.js -> build -> vueRouterMode
20 | // quasar.conf.js -> build -> publicPath
21 | mode: process.env.VUE_ROUTER_MODE,
22 | base: process.env.VUE_ROUTER_BASE
23 | })
24 |
25 | return Router
26 | }
27 |
--------------------------------------------------------------------------------
/src/router/routes.js:
--------------------------------------------------------------------------------
1 |
2 | const routes = [
3 | {
4 | path: '/',
5 | component: () => import('layouts/MyLayout.vue'),
6 | children: [
7 | { path: '', component: () => import('pages/Index.vue') },
8 | { path: 'usuario', component: () => import('pages/Usuario.vue') }
9 | ]
10 | }
11 | ]
12 |
13 | // Always leave this as last one
14 | if (process.env.MODE !== 'ssr') {
15 | routes.push({
16 | path: '*',
17 | component: () => import('pages/Error404.vue')
18 | })
19 | }
20 |
21 | export default routes
22 |
--------------------------------------------------------------------------------
/src/statics/cypress-mocha-awesome.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/cypress-mocha-awesome.PNG
--------------------------------------------------------------------------------
/src/statics/icons/apple-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/apple-icon-152x152.png
--------------------------------------------------------------------------------
/src/statics/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/src/statics/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/src/statics/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/icon-128x128.png
--------------------------------------------------------------------------------
/src/statics/icons/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/icon-192x192.png
--------------------------------------------------------------------------------
/src/statics/icons/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/icon-256x256.png
--------------------------------------------------------------------------------
/src/statics/icons/icon-384x384.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/icon-384x384.png
--------------------------------------------------------------------------------
/src/statics/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/icon-512x512.png
--------------------------------------------------------------------------------
/src/statics/icons/ms-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/icons/ms-icon-144x144.png
--------------------------------------------------------------------------------
/src/statics/interface-cypress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/interface-cypress.png
--------------------------------------------------------------------------------
/src/statics/quasar-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/patrickmonteiro/quasar-cypress/26753f8896262daa489283bc0beb032a4d84b183/src/statics/quasar-logo.png
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 |
4 | import example from './module-example'
5 |
6 | Vue.use(Vuex)
7 |
8 | /*
9 | * If not building with SSR mode, you can
10 | * directly export the Store instantiation
11 | */
12 |
13 | export default function (/* { ssrContext } */) {
14 | const Store = new Vuex.Store({
15 | modules: {
16 | example
17 | }
18 | })
19 |
20 | return Store
21 | }
22 |
--------------------------------------------------------------------------------
/src/store/module-example/actions.js:
--------------------------------------------------------------------------------
1 | /*
2 | export function someAction (context) {
3 | }
4 | */
5 |
--------------------------------------------------------------------------------
/src/store/module-example/getters.js:
--------------------------------------------------------------------------------
1 | /*
2 | export function someGetter (state) {
3 | }
4 | */
5 |
--------------------------------------------------------------------------------
/src/store/module-example/index.js:
--------------------------------------------------------------------------------
1 | import state from './state'
2 | import * as getters from './getters'
3 | import * as mutations from './mutations'
4 | import * as actions from './actions'
5 |
6 | export default {
7 | namespaced: true,
8 | state,
9 | getters,
10 | mutations,
11 | actions
12 | }
13 |
--------------------------------------------------------------------------------
/src/store/module-example/mutations.js:
--------------------------------------------------------------------------------
1 | /*
2 | export function someMutation (state) {
3 | }
4 | */
5 |
--------------------------------------------------------------------------------
/src/store/module-example/state.js:
--------------------------------------------------------------------------------
1 | export default {
2 | //
3 | }
4 |
--------------------------------------------------------------------------------