Evan You пре 9 година
родитељ
комит
24604e70ea
4 измењених фајлова са 20 додато и 17 уклоњено
  1. 4 2
      build/nightwatch.config.js
  2. 13 12
      package.json
  3. 1 1
      test/e2e/runner.js
  4. 2 2
      test/e2e/specs/select2.js

+ 4 - 2
build/nightwatch.config.js

@@ -7,11 +7,12 @@ module.exports = {
 
   'selenium': {
     'start_process': true,
-    'server_path': 'node_modules/selenium-server/lib/runner/selenium-server-standalone-2.53.1.jar',
+    'server_path': 'node_modules/selenium-server/lib/runner/selenium-server-standalone-3.0.1.jar',
     'host': '127.0.0.1',
     'port': 4444,
     'cli_args': {
       'webdriver.chrome.driver': require('chromedriver').path
+      // , 'webdriver.gecko.driver': require('geckodriver').path
     }
   },
 
@@ -40,7 +41,8 @@ module.exports = {
       'desiredCapabilities': {
         'browserName': 'firefox',
         'javascriptEnabled': true,
-        'acceptSslCerts': true
+        'acceptSslCerts': true,
+        'marionette': true
       }
     },
 

+ 13 - 12
package.json

@@ -58,7 +58,7 @@
   "homepage": "https://github.com/vuejs/vue#readme",
   "devDependencies": {
     "babel-core": "^6.9.0",
-    "babel-eslint": "^6.0.4",
+    "babel-eslint": "^7.1.0",
     "babel-loader": "^6.2.4",
     "babel-plugin-coverage": "^1.0.0",
     "babel-preset-es2015": "^6.9.0",
@@ -66,19 +66,19 @@
     "buble": "^0.14.0",
     "chromedriver": "^2.21.2",
     "codecov.io": "^0.1.6",
-    "cross-spawn": "^4.0.0",
+    "cross-spawn": "^5.0.1",
     "de-indent": "^1.0.2",
-    "es6-promise": "^3.2.1",
-    "eslint": "^3.4.0",
-    "eslint-config-vue": "^2.0.0",
+    "es6-promise": "^4.0.5",
+    "eslint": "^3.10.1",
+    "eslint-config-vue": "^2.0.1",
     "eslint-loader": "^1.3.0",
     "eslint-plugin-flowtype": "^2.16.0",
     "eslint-plugin-vue": "^1.0.0",
     "flow-bin": "^0.33.0",
     "he": "^1.1.0",
     "http-server": "^0.9.0",
-    "jasmine": "2.4.x",
-    "jasmine-core": "2.4.x",
+    "jasmine": "^2.5.2",
+    "jasmine-core": "^2.5.2",
     "karma": "^1.1.0",
     "karma-chrome-launcher": "^2.0.0",
     "karma-coverage": "^1.0.0",
@@ -90,8 +90,8 @@
     "karma-sauce-launcher": "^1.0.0",
     "karma-sourcemap-loader": "^0.3.0",
     "karma-webpack": "^1.7.0",
-    "lodash": "^4.13.1",
-    "nightwatch": "^0.9.0",
+    "lodash": "^4.17.1",
+    "nightwatch": "^0.9.9",
     "nightwatch-helpers": "^1.2.0",
     "phantomjs-prebuilt": "^2.1.1",
     "rollup": "^0.36.1",
@@ -101,11 +101,12 @@
     "rollup-plugin-flow-no-whitespace": "^1.0.0",
     "rollup-plugin-replace": "^1.1.0",
     "rollup-watch": "^2.5.0",
-    "selenium-server": "2.53.1",
-    "typescript": "^2.0.2",
+    "selenium-server": "3.0.1",
+    "typescript": "^2.0.9",
     "uglify-js": "^2.6.2",
     "webpack": "^1.13.2",
     "weex-js-runtime": "^0.17.0-alpha4",
     "weex-vdom-tester": "^0.1.3"
-  }
+  },
+  "dependencies": {}
 }

+ 1 - 1
test/e2e/runner.js

@@ -16,7 +16,7 @@ if (args.indexOf('--env') === -1) {
 }
 var i = args.indexOf('--test')
 if (i > -1) {
-  args[i + 1] = 'test/e2e/specs/' + args[i + 1]
+  args[i + 1] = 'test/e2e/specs/' + args[i + 1] + '.js'
 }
 
 var runner = spawn('./node_modules/.bin/nightwatch', args, {

+ 2 - 2
test/e2e/specs/select2.js

@@ -8,7 +8,7 @@ module.exports = {
       .assert.containsText('p', 'Selected: 0')
       .assert.containsText('span.select2', 'Select one')
 
-      .moveToElement('span.select2', 5, 5).mouseButtonClick()
+      .click('.select2-selection__rendered')
       .assert.count('.select2-results__option', 3)
       .assert.containsText('.select2-results__option:nth-child(1)', 'Select one')
       .assert.containsText('.select2-results__option:nth-child(2)', 'Hello')
@@ -24,7 +24,7 @@ module.exports = {
       .execute(function () {
         vm.options.push({ id: 3, text: 'Vue' })
       })
-      .moveToElement('span.select2', 5, 5).mouseButtonClick()
+      .click('.select2-selection__rendered')
       .assert.count('.select2-results__option', 4)
       .assert.containsText('.select2-results__option:nth-child(1)', 'Select one')
       .assert.containsText('.select2-results__option:nth-child(2)', 'Hello')