forked from verdnatura/salix-front
e2e and unt test runners working
This commit is contained in:
parent
7f576d3af4
commit
52d4dba950
11
package.json
11
package.json
|
@ -9,15 +9,12 @@
|
||||||
"lint": "eslint --ext .js,.ts,.vue ./",
|
"lint": "eslint --ext .js,.ts,.vue ./",
|
||||||
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
||||||
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
||||||
"test:unit": "cypress open-ct",
|
|
||||||
"test:unit:ci": "cypress run-ct",
|
|
||||||
"test:unit:coverage": "jest --coverage",
|
"test:unit:coverage": "jest --coverage",
|
||||||
"test:unit:watch": "jest --watch",
|
"test:unit": "jest --watchAll",
|
||||||
"test:unit:watchAll": "jest --watchAll",
|
"test:e2e": "cross-env E2E_TEST=true start-test \"quasar dev\" http-get://localhost:8080 \"cypress open --config-file cypress.json\"",
|
||||||
|
"test:e2e:ci": "cross-env E2E_TEST=true start-test \"quasar dev\" http-get://localhost:8080 \"cypress run\"",
|
||||||
"serve:test:coverage": "quasar serve test/jest/coverage/lcov-report/ --port 8788",
|
"serve:test:coverage": "quasar serve test/jest/coverage/lcov-report/ --port 8788",
|
||||||
"concurrently:dev:jest": "concurrently \"quasar dev\" \"jest --watch\"",
|
"concurrently:dev:jest": "concurrently \"quasar dev\" \"jest --watch\""
|
||||||
"test:e2e": "cross-env E2E_TEST=true start-test \"quasar dev\" http-get://localhost:8080 \"cypress open\"",
|
|
||||||
"test:e2e:ci": "cross-env E2E_TEST=true start-test \"quasar dev\" http-get://localhost:8080 \"cypress run\""
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "^1.0.0",
|
"@quasar/extras": "^1.0.0",
|
||||||
|
|
|
@ -10,7 +10,7 @@ describe('Landing', () => {
|
||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
});
|
});
|
||||||
it('.should() - assert that <title> is correct', () => {
|
it('.should() - assert that <title> is correct', () => {
|
||||||
cy.title().should('include', 'Quasar');
|
cy.title().should('include', 'Salix');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@ const {
|
||||||
module.exports = async (on, config) => {
|
module.exports = async (on, config) => {
|
||||||
// Enable component testing, you can safely remove this
|
// Enable component testing, you can safely remove this
|
||||||
// if you don't plan to use Cypress for unit tests
|
// if you don't plan to use Cypress for unit tests
|
||||||
if (config.testingType === 'component') {
|
// if (config.testingType === 'component') {
|
||||||
await injectDevServer(on, config);
|
// await injectDevServer(on, config);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,7 @@ describe('MyButton', () => {
|
||||||
const wrapper = mount(MyButton);
|
const wrapper = mount(MyButton);
|
||||||
const { vm } = wrapper;
|
const { vm } = wrapper;
|
||||||
|
|
||||||
expect((vm.$el as HTMLElement).textContent).toContain('rocket muffin');
|
expect((vm.$el).textContent).toContain('rocket muffin');
|
||||||
expect(wrapper.find('.content').text()).toContain('rocket muffin');
|
expect(wrapper.find('.content').text()).toContain('rocket muffin');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue