Skip to content

Commit

Permalink
Update testing on the boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
NdagiStanley committed May 11, 2018
1 parent 453352d commit 821893a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 12 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<a href="https://codeclimate.com/github/NdagiStanley/vue-django"><img src="https://codeclimate.com/github/NdagiStanley/vue-django/badges/issue_count.svg" /></a>
[![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.

Expand Down Expand Up @@ -52,7 +54,7 @@ $ npm run dev
```

## Deploy
To deploy your django project
To deploy your django project, still within `my-project` directory, run:

`$ .deploy.sh`

Expand Down
7 changes: 4 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<a href="https://codeclimate.com/github/NdagiStanley/vue-django"><img src="https://codeclimate.com/github/NdagiStanley/vue-django/badges/issue_count.svg" /></a>
[![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
Expand Down
2 changes: 1 addition & 1 deletion template/app/tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.test import TestCase

from views import index
from app.views import index


# Create your tests here.
Expand Down
2 changes: 1 addition & 1 deletion template/format_index_html.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import fileinput

file = 'templates/index.html'
file = 'index.html'

with open(file, "r+") as f:
s = f.read()
Expand Down
2 changes: 1 addition & 1 deletion template/test/e2e/specs/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
4 changes: 2 additions & 2 deletions template/vuedj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]
21 changes: 21 additions & 0 deletions vue-cli-interaction.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/expect -f
# To be used primarily in CI (continuous integration)
set timeout 360
set BRANCH_NAME $env(BRANCH_NAME)

spawn vue init NdagiStanley/vue-django#$BRANCH_NAME 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
}

0 comments on commit 821893a

Please sign in to comment.