File tree Expand file tree Collapse file tree 5 files changed +31
-4
lines changed Expand file tree Collapse file tree 5 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
- import { sync } from 'vuex-router-sync'
2
+ import { sync } from 'vuex-router-sync'
3
3
import App from './components/App'
4
4
import router from './router'
5
5
import store from './store'
@@ -11,4 +11,4 @@ const app = new Vue({
11
11
...App
12
12
} )
13
13
14
- export { app , router , store }
14
+ export { app , router , store }
Original file line number Diff line number Diff line change 1
1
import './promise-polyfill'
2
- import { app } from './app'
2
+ import { app } from './app'
3
3
4
4
// enable progressive web app support (with offline-plugin)
5
5
if ( process . env . NODE_ENV === 'production' ) {
Original file line number Diff line number Diff line change 4
4
"description" : " {{ description }}" ,
5
5
"main" : " client/index.js" ,
6
6
"scripts" : {
7
- "test" : " echo lol " ,
7
+ "test" : " testcafe all tests/index.js --app \" npm run dev \" --app-init-delay 10000 " ,
8
8
"build" : " webpack --config build/webpack.prod.js" ,
9
9
"dev" : " node build/server.js" {{#electron }},
10
10
"app" : " cross-env NODE_ENV=development electron app/" {{/electron }}{{#eslint }},
43
43
"eslint" : " ^3.6.0" ,
44
44
"eslint-config-vue" : " latest" ,
45
45
"eslint-plugin-vue" : " latest" ,
46
+ "eslint-plugin-testcafe" : " ^0.2.0" ,
46
47
{{/eslint }}
47
48
"express" : " ^4.14.0" ,
48
49
"extract-text-webpack-plugin" : " ^2.0.0-beta.3" ,
54
55
"postcss-loader" : " ^0.9.1" ,
55
56
"postcss-nested" : " ^1.0.0" ,
56
57
"style-loader" : " ^0.13.1" ,
58
+ "testcafe" : " ^0.12.1" ,
57
59
"vue-loader" : " ^10.0.2" ,
58
60
"vue-template-compiler" : " ^2.1.3" ,
59
61
"webpack" : " 2.2.0-rc.3" ,
Original file line number Diff line number Diff line change
1
+ import IndexPage from './page-model' ;
2
+
3
+ fixture `Index page`
4
+ . page ( 'http://localhost:4000' ) ;
5
+
6
+ const page = new IndexPage ( ) ;
7
+
8
+ test ( 'first test' , async t => {
9
+ await t . expect ( page . counter . innerText ) . contains ( '0' )
10
+ . click ( page . increment )
11
+ . expect ( page . counter . innerText ) . contains ( '1' )
12
+ . click ( page . desrement )
13
+ . expect ( page . counter . innerText ) . contains ( '0' ) ;
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { Selector } from 'testcafe' ;
2
+
3
+ export default class IndexPage {
4
+ constructor ( ) {
5
+ const counterWrapper = Selector ( '.counter-wrapper' ) ;
6
+
7
+ this . counter = counterWrapper . child ( '.counter' ) ;
8
+ this . increment = counterWrapper . child ( 'button' ) . withText ( 'Increment' ) ;
9
+ this . desrement = counterWrapper . child ( 'button' ) . withText ( 'Decrement' ) ;
10
+ }
11
+ }
You can’t perform that action at this time.
0 commit comments