From 773e4c9a86bab9a6353eb4eff575b94695d5c334 Mon Sep 17 00:00:00 2001 From: NdagiStanley Date: Fri, 11 May 2018 20:07:37 +0300 Subject: [PATCH] Update testing on the boilerplate --- README.md | 8 +++++--- docs/README.md | 7 ++++--- template/app/tests.py | 2 +- template/test/e2e/specs/test.js | 2 +- template/vuedj/settings.py | 4 ++-- vue-cli-interaction.exp | 19 +++++++++++++++++++ 6 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 vue-cli-interaction.exp diff --git a/README.md b/README.md index b117ea9..29ba56f 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,13 @@ If you are using `vue-cli@1.x`, it will be pulling the `master` branch of this t Common topics are discussed in the [docs](http://vuejs-templates.github.io/webpack). Make sure to read it! # Vue Django -[![Code Climate](https://codeclimate.com/github/NdagiStanley/vue-django/badges/gpa.svg)](https://codeclimate.com/github/NdagiStanley/vue-django) - +[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://github.com/ellerbrock/open-source-badge/) +[![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://github.com/ellerbrock/open-source-badge/) +[![Help Contribute to Open Source](https://www.codetriage.com/ndagistanley/vue-django/badges/users.svg)](https://www.codetriage.com/ndagistanley/vue-django) + +[![Build Status](https://semaphoreci.com/api/v1/stanmd/vue-django/branches/develop/badge.svg)](https://semaphoreci.com/stanmd/vue-django) [![Updates](https://pyup.io/repos/github/NdagiStanley/vue-django/shield.svg)](https://pyup.io/repos/github/NdagiStanley/vue-django/) [![Python 3](https://pyup.io/repos/github/NdagiStanley/vue-django/python-3-shield.svg)](https://pyup.io/repos/github/NdagiStanley/vue-django/) -[![Help Contribute to Open Source](https://www.codetriage.com/ndagistanley/vue-django/badges/users.svg)](https://www.codetriage.com/ndagistanley/vue-django) [https://vuedjango.herokuapp.com/](https://vuedjango.herokuapp.com/) is a deployed instance of this boilerplate. diff --git a/docs/README.md b/docs/README.md index 1eea9ca..529f541 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,11 +9,12 @@ [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://github.com/ellerbrock/open-source-badge/) [![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://github.com/ellerbrock/open-source-badge/) -[![Code Climate](https://codeclimate.com/github/NdagiStanley/vue-django/badges/gpa.svg)](https://codeclimate.com/github/NdagiStanley/vue-django) - +[![Help Contribute to Open Source](https://www.codetriage.com/ndagistanley/vue-django/badges/users.svg)](https://www.codetriage.com/ndagistanley/vue-django) + +[![Build Status](https://semaphoreci.com/api/v1/stanmd/vue-django/branches/develop/badge.svg)](https://semaphoreci.com/stanmd/vue-django) [![Updates](https://pyup.io/repos/github/NdagiStanley/vue-django/shield.svg)](https://pyup.io/repos/github/NdagiStanley/vue-django/) [![Python 3](https://pyup.io/repos/github/NdagiStanley/vue-django/python-3-shield.svg)](https://pyup.io/repos/github/NdagiStanley/vue-django/) -[![Help Contribute to Open Source](https://www.codetriage.com/ndagistanley/vue-django/badges/users.svg)](https://www.codetriage.com/ndagistanley/vue-django) + [https://vuedjango.herokuapp.com/](https://vuedjango.herokuapp.com/) is a deployed instance of this boilerplate. There is a docker image for vue-django that you can run to check it out locally: ```bash diff --git a/template/app/tests.py b/template/app/tests.py index aca04f1..c73919a 100644 --- a/template/app/tests.py +++ b/template/app/tests.py @@ -1,6 +1,6 @@ from django.test import TestCase -from views import index +from app.views import index # Create your tests here. diff --git a/template/test/e2e/specs/test.js b/template/test/e2e/specs/test.js index 0a936e2..860a6db 100644 --- a/template/test/e2e/specs/test.js +++ b/template/test/e2e/specs/test.js @@ -14,7 +14,7 @@ module.exports = { .assert.elementPresent('.hello') .assert.elementPresent('.logo') .assert.containsText('h1', 'Hello World!') - .assert.elementCount('p', 2) + .assert.elementCount('p', 1) .end(){{#if_eq lintConfig "airbnb"}};{{/if_eq}} }{{#if_eq lintConfig "airbnb"}},{{/if_eq}} }{{#if_eq lintConfig "airbnb"}};{{/if_eq}} diff --git a/template/vuedj/settings.py b/template/vuedj/settings.py index 6bec56b..58cd09a 100644 --- a/template/vuedj/settings.py +++ b/template/vuedj/settings.py @@ -133,8 +133,8 @@ # Use nose to run all tests TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' -# Tell nose to measure coverage on the 'foo' and 'bar' apps +# Tell nose to measure coverage on the apps NOSE_ARGS = [ '--with-coverage', - '--cover-package=foo,bar', + '--cover-package=app', # For multiple apps use '--cover-package=foo, bar' ] diff --git a/vue-cli-interaction.exp b/vue-cli-interaction.exp new file mode 100644 index 0000000..4441e21 --- /dev/null +++ b/vue-cli-interaction.exp @@ -0,0 +1,19 @@ +#!/usr/bin/expect -f +set timeout 360 + +spawn vue init NdagiStanley/vue-django my-project +expect { + "Project name" { send "\n"; exp_continue } + "Project version" { send "\n"; exp_continue } + "Project description" { send "\n"; exp_continue } + "Author" { send "\n"; exp_continue } + "private" { send "\n"; exp_continue } + "Vue build" { send "\n"; exp_continue } + "Install vue-router?" { send "\n"; exp_continue } + "Use ESLint to lint your code?" { send "\n"; exp_continue } + "Pick an ESLint preset" { send "\n"; exp_continue } + "Setup unit tests" { send "\n"; exp_continue } + "Pick a test runner" { send "\n"; exp_continue } + "Setup e2e tests with Nightwatch?" { send "\n"; exp_continue } + eof +}