Skip to content
Permalink
Browse files

update tests

  • Loading branch information...
ganlanyuan committed Oct 23, 2018
1 parent 10b1551 commit fcf39a416c9f1a3fd9e831bc99331e77af7c7ed5
Showing with 815 additions and 1,329 deletions.
  1. +0 −2 .envs
  2. +2 −2 .gitignore
  3. +96 −0 browserstack.conf.js
  4. +0 −23 globals.js
  5. +0 −110 nightwatch.json
  6. +4 −3 package.json
  7. +143 −51 template/test/index.njk
  8. +3 −3 test/css/test.css
  9. +542 −258 test/index.html
  10. BIN test/screenshot/chrome/animation1.png
  11. BIN test/screenshot/chrome/animation2.png
  12. BIN test/screenshot/chrome/arrowKeys.png
  13. BIN test/screenshot/chrome/autoHeight.png
  14. BIN test/screenshot/chrome/autoplay.png
  15. BIN test/screenshot/chrome/base.png
  16. BIN test/screenshot/chrome/customize.png
  17. BIN test/screenshot/chrome/edgePadding-gutter.png
  18. BIN test/screenshot/chrome/edgePadding.png
  19. BIN test/screenshot/chrome/few-items.png
  20. BIN test/screenshot/chrome/fixedWidth-edgePadding-gutter.png
  21. BIN test/screenshot/chrome/fixedWidth-edgePadding.png
  22. BIN test/screenshot/chrome/fixedWidth-gutter.png
  23. BIN test/screenshot/chrome/fixedWidth.png
  24. BIN test/screenshot/chrome/frame1.png
  25. BIN test/screenshot/chrome/frame2.png
  26. BIN test/screenshot/chrome/frame3.png
  27. BIN test/screenshot/chrome/frame5.png
  28. BIN test/screenshot/chrome/frame6.png
  29. BIN test/screenshot/chrome/gutter.png
  30. BIN test/screenshot/chrome/lazyload.png
  31. BIN test/screenshot/chrome/mouse-drag.png
  32. BIN test/screenshot/chrome/nested.png
  33. BIN test/screenshot/chrome/non-loop.png
  34. BIN test/screenshot/chrome/rewind.png
  35. BIN test/screenshot/chrome/slide-by-page.png
  36. BIN test/screenshot/chrome/vertical-edgePadding-gutter.png
  37. BIN test/screenshot/chrome/vertical-edgePadding.png
  38. BIN test/screenshot/chrome/vertical-gutter.png
  39. BIN test/screenshot/chrome/vertical.png
  40. BIN test/screenshot/edge/animation1.png
  41. BIN test/screenshot/edge/animation2.png
  42. BIN test/screenshot/edge/arrowKeys.png
  43. BIN test/screenshot/edge/autoHeight.png
  44. BIN test/screenshot/edge/autoplay.png
  45. BIN test/screenshot/edge/base.png
  46. BIN test/screenshot/edge/customize.png
  47. BIN test/screenshot/edge/edgePadding-gutter.png
  48. BIN test/screenshot/edge/edgePadding.png
  49. BIN test/screenshot/edge/few-items.png
  50. BIN test/screenshot/edge/fixedWidth-edgePadding-gutter.png
  51. BIN test/screenshot/edge/fixedWidth-edgePadding.png
  52. BIN test/screenshot/edge/fixedWidth-gutter.png
  53. BIN test/screenshot/edge/fixedWidth.png
  54. BIN test/screenshot/edge/frame1.png
  55. BIN test/screenshot/edge/frame2.png
  56. BIN test/screenshot/edge/frame3.png
  57. BIN test/screenshot/edge/frame5.png
  58. BIN test/screenshot/edge/frame6.png
  59. BIN test/screenshot/edge/gutter.png
  60. BIN test/screenshot/edge/lazyload.png
  61. BIN test/screenshot/edge/mouse-drag.png
  62. BIN test/screenshot/edge/nested.png
  63. BIN test/screenshot/edge/non-loop.png
  64. BIN test/screenshot/edge/rewind.png
  65. BIN test/screenshot/edge/slide-by-page.png
  66. BIN test/screenshot/edge/vertical-edgePadding-gutter.png
  67. BIN test/screenshot/edge/vertical-edgePadding.png
  68. BIN test/screenshot/edge/vertical-gutter.png
  69. BIN test/screenshot/edge/vertical.png
  70. BIN test/screenshot/firefox/animation1.png
  71. BIN test/screenshot/firefox/animation2.png
  72. BIN test/screenshot/firefox/arrowKeys.png
  73. BIN test/screenshot/firefox/autoHeight.png
  74. BIN test/screenshot/firefox/autoplay.png
  75. BIN test/screenshot/firefox/base.png
  76. BIN test/screenshot/firefox/customize.png
  77. BIN test/screenshot/firefox/edgePadding-gutter.png
  78. BIN test/screenshot/firefox/edgePadding.png
  79. BIN test/screenshot/firefox/few-items.png
  80. BIN test/screenshot/firefox/fixedWidth-edgePadding-gutter.png
  81. BIN test/screenshot/firefox/fixedWidth-edgePadding.png
  82. BIN test/screenshot/firefox/fixedWidth-gutter.png
  83. BIN test/screenshot/firefox/fixedWidth.png
  84. BIN test/screenshot/firefox/frame1.png
  85. BIN test/screenshot/firefox/frame2.png
  86. BIN test/screenshot/firefox/frame3.png
  87. BIN test/screenshot/firefox/frame5.png
  88. BIN test/screenshot/firefox/frame6.png
  89. BIN test/screenshot/firefox/gutter.png
  90. BIN test/screenshot/firefox/lazyload.png
  91. BIN test/screenshot/firefox/mouse-drag.png
  92. BIN test/screenshot/firefox/nested.png
  93. BIN test/screenshot/firefox/non-loop.png
  94. BIN test/screenshot/firefox/rewind.png
  95. BIN test/screenshot/firefox/slide-by-page.png
  96. BIN test/screenshot/firefox/vertical-edgePadding-gutter.png
  97. BIN test/screenshot/firefox/vertical-edgePadding.png
  98. BIN test/screenshot/firefox/vertical-gutter.png
  99. BIN test/screenshot/firefox/vertical.png
  100. BIN test/screenshot/ie/animation1.png
  101. BIN test/screenshot/ie/animation2.png
  102. BIN test/screenshot/ie/arrowKeys.png
  103. BIN test/screenshot/ie/autoHeight.png
  104. BIN test/screenshot/ie/autoplay.png
  105. BIN test/screenshot/ie/base.png
  106. BIN test/screenshot/ie/customize.png
  107. BIN test/screenshot/ie/edgePadding-gutter.png
  108. BIN test/screenshot/ie/edgePadding.png
  109. BIN test/screenshot/ie/few-items.png
  110. BIN test/screenshot/ie/fixedWidth-edgePadding-gutter.png
  111. BIN test/screenshot/ie/fixedWidth-edgePadding.png
  112. BIN test/screenshot/ie/fixedWidth-gutter.png
  113. BIN test/screenshot/ie/fixedWidth.png
  114. BIN test/screenshot/ie/frame1.png
  115. BIN test/screenshot/ie/frame2.png
  116. BIN test/screenshot/ie/frame3.png
  117. BIN test/screenshot/ie/frame5.png
  118. BIN test/screenshot/ie/frame6.png
  119. BIN test/screenshot/ie/gutter.png
  120. BIN test/screenshot/ie/lazyload.png
  121. BIN test/screenshot/ie/mouse-drag.png
  122. BIN test/screenshot/ie/nested.png
  123. BIN test/screenshot/ie/non-loop.png
  124. BIN test/screenshot/ie/rewind.png
  125. BIN test/screenshot/ie/slide-by-page.png
  126. BIN test/screenshot/ie/vertical-edgePadding-gutter.png
  127. BIN test/screenshot/ie/vertical-edgePadding.png
  128. BIN test/screenshot/ie/vertical-gutter.png
  129. BIN test/screenshot/ie/vertical.png
  130. BIN test/screenshot/new/chrome/animation1.png
  131. BIN test/screenshot/new/chrome/animation2.png
  132. BIN test/screenshot/new/chrome/arrowKeys.png
  133. BIN test/screenshot/new/chrome/autoHeight.png
  134. BIN test/screenshot/new/chrome/autoplay.png
  135. BIN test/screenshot/new/chrome/base.png
  136. BIN test/screenshot/new/chrome/customize.png
  137. BIN test/screenshot/new/chrome/edgePadding-gutter.png
  138. BIN test/screenshot/new/chrome/edgePadding.png
  139. BIN test/screenshot/new/chrome/few-items.png
  140. BIN test/screenshot/new/chrome/fixedWidth-edgePadding-gutter.png
  141. BIN test/screenshot/new/chrome/fixedWidth-edgePadding.png
  142. BIN test/screenshot/new/chrome/fixedWidth-gutter.png
  143. BIN test/screenshot/new/chrome/fixedWidth.png
  144. BIN test/screenshot/new/chrome/frame1.png
  145. BIN test/screenshot/new/chrome/frame2.png
  146. BIN test/screenshot/new/chrome/frame3.png
  147. BIN test/screenshot/new/chrome/frame5.png
  148. BIN test/screenshot/new/chrome/frame6.png
  149. BIN test/screenshot/new/chrome/gutter.png
  150. BIN test/screenshot/new/chrome/lazyload.png
  151. BIN test/screenshot/new/chrome/mouse-drag.png
  152. BIN test/screenshot/new/chrome/nested.png
  153. BIN test/screenshot/new/chrome/non-loop.png
  154. BIN test/screenshot/new/chrome/rewind.png
  155. BIN test/screenshot/new/chrome/slide-by-page.png
  156. BIN test/screenshot/new/chrome/vertical-edgePadding-gutter.png
  157. BIN test/screenshot/new/chrome/vertical-edgePadding.png
  158. BIN test/screenshot/new/chrome/vertical-gutter.png
  159. BIN test/screenshot/new/chrome/vertical.png
  160. BIN test/screenshot/new/ie/animation1.png
  161. BIN test/screenshot/new/ie/animation2.png
  162. BIN test/screenshot/new/ie/arrowKeys.png
  163. BIN test/screenshot/new/ie/autoHeight.png
  164. BIN test/screenshot/new/ie/autoplay.png
  165. BIN test/screenshot/new/ie/base.png
  166. BIN test/screenshot/new/ie/customize.png
  167. BIN test/screenshot/new/ie/edgePadding-gutter.png
  168. BIN test/screenshot/new/ie/edgePadding.png
  169. BIN test/screenshot/new/ie/few-items.png
  170. BIN test/screenshot/new/ie/fixedWidth-edgePadding-gutter.png
  171. BIN test/screenshot/new/ie/fixedWidth-edgePadding.png
  172. BIN test/screenshot/new/ie/fixedWidth-gutter.png
  173. BIN test/screenshot/new/ie/fixedWidth.png
  174. BIN test/screenshot/new/ie/frame1.png
  175. BIN test/screenshot/new/ie/frame2.png
  176. BIN test/screenshot/new/ie/frame3.png
  177. BIN test/screenshot/new/ie/frame5.png
  178. BIN test/screenshot/new/ie/frame6.png
  179. BIN test/screenshot/new/ie/gutter.png
  180. BIN test/screenshot/new/ie/lazyload.png
  181. BIN test/screenshot/new/ie/mouse-drag.png
  182. BIN test/screenshot/new/ie/nested.png
  183. BIN test/screenshot/new/ie/non-loop.png
  184. BIN test/screenshot/new/ie/rewind.png
  185. BIN test/screenshot/new/ie/slide-by-page.png
  186. BIN test/screenshot/new/ie/vertical-edgePadding-gutter.png
  187. BIN test/screenshot/new/ie/vertical-edgePadding.png
  188. BIN test/screenshot/new/ie/vertical-gutter.png
  189. BIN test/screenshot/new/ie/vertical.png
  190. BIN test/screenshot/opera/animation1.png
  191. BIN test/screenshot/opera/animation2.png
  192. BIN test/screenshot/opera/arrowKeys.png
  193. BIN test/screenshot/opera/autoHeight.png
  194. BIN test/screenshot/opera/autoplay.png
  195. BIN test/screenshot/opera/base.png
  196. BIN test/screenshot/opera/customize.png
  197. BIN test/screenshot/opera/edgePadding-gutter.png
  198. BIN test/screenshot/opera/edgePadding.png
  199. BIN test/screenshot/opera/few-items.png
  200. BIN test/screenshot/opera/fixedWidth-edgePadding-gutter.png
  201. BIN test/screenshot/opera/fixedWidth-edgePadding.png
  202. BIN test/screenshot/opera/fixedWidth-gutter.png
  203. BIN test/screenshot/opera/fixedWidth.png
  204. BIN test/screenshot/opera/frame1.png
  205. BIN test/screenshot/opera/frame2.png
  206. BIN test/screenshot/opera/frame3.png
  207. BIN test/screenshot/opera/frame5.png
  208. BIN test/screenshot/opera/frame6.png
  209. BIN test/screenshot/opera/gutter.png
  210. BIN test/screenshot/opera/lazyload.png
  211. BIN test/screenshot/opera/mouse-drag.png
  212. BIN test/screenshot/opera/nested.png
  213. BIN test/screenshot/opera/non-loop.png
  214. BIN test/screenshot/opera/rewind.png
  215. BIN test/screenshot/opera/slide-by-page.png
  216. BIN test/screenshot/opera/vertical-edgePadding-gutter.png
  217. BIN test/screenshot/opera/vertical-edgePadding.png
  218. BIN test/screenshot/opera/vertical-gutter.png
  219. BIN test/screenshot/opera/vertical.png
  220. BIN test/screenshot/safari/animation1.png
  221. BIN test/screenshot/safari/animation2.png
  222. BIN test/screenshot/safari/arrowKeys.png
  223. BIN test/screenshot/safari/autoHeight.png
  224. BIN test/screenshot/safari/autoplay.png
  225. BIN test/screenshot/safari/base.png
  226. BIN test/screenshot/safari/customize.png
  227. BIN test/screenshot/safari/edgePadding-gutter.png
  228. BIN test/screenshot/safari/edgePadding.png
  229. BIN test/screenshot/safari/few-items.png
  230. BIN test/screenshot/safari/fixedWidth-edgePadding-gutter.png
  231. BIN test/screenshot/safari/fixedWidth-edgePadding.png
  232. BIN test/screenshot/safari/fixedWidth-gutter.png
  233. BIN test/screenshot/safari/fixedWidth.png
  234. BIN test/screenshot/safari/frame1.png
  235. BIN test/screenshot/safari/frame2.png
  236. BIN test/screenshot/safari/frame3.png
  237. BIN test/screenshot/safari/frame5.png
  238. BIN test/screenshot/safari/frame6.png
  239. BIN test/screenshot/safari/gutter.png
  240. BIN test/screenshot/safari/lazyload.png
  241. BIN test/screenshot/safari/mouse-drag.png
  242. BIN test/screenshot/safari/nested.png
  243. BIN test/screenshot/safari/non-loop.png
  244. BIN test/screenshot/safari/rewind.png
  245. BIN test/screenshot/safari/slide-by-page.png
  246. BIN test/screenshot/safari/vertical-edgePadding-gutter.png
  247. BIN test/screenshot/safari/vertical-edgePadding.png
  248. BIN test/screenshot/safari/vertical-gutter.png
  249. BIN test/screenshot/safari/vertical.png
  250. +4 −3 test/scripts/screenshot.js
  251. +21 −874 yarn.lock
2 .envs

This file was deleted.

@@ -8,9 +8,9 @@
*.log
/*.html
*.sketch
auth.js

/.codekit-cache/
/bower_components/
/node_modules/
/test/reports/
/test/reports/
/tests_output/
@@ -0,0 +1,96 @@
nightwatch_config = {
src_folders : [ 'test/scripts' ],

selenium : {
'start_process': false,
'host': 'hub-cloud.browserstack.com',
'port': 80
},

common_capabilities: {
'browserstack.user': '${BS_USERNAME}',
'browserstack.key': '${BS_ACCESS_KEY}'
},

test_settings: {
default: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Chrome',
'browser_version': '14.0',
'resolution': '1024x768'
}
},
chrome: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Chrome',
'browser_version': '14.0',
'resolution': '1024x768'
}
},
firefox: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Firefox',
'browser_version': '12.0',
'resolution': '1024x768'
}
},
ie: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'IE',
'browser_version': '9.0',
'resolution': '1024x768'
}
},
edge: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '10',
'browser': 'Edge',
'browser_version': '15.0',
'resolution': '1024x768'
}
},
safari: {
desiredCapabilities: {
'os': 'OS X',
'os_version': 'Snow Leopard',
'browser': 'Safari',
'browser_version': '5.1',
'resolution': '1024x768'
}
},
opera: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Opera',
'browser_version': '12.15',
'resolution': '1024x768'
}
},
}
};

// Code to support common capabilites
for(var i in nightwatch_config.test_settings){
var config = nightwatch_config.test_settings[i],
browser_name = i;
config['selenium_host'] = nightwatch_config.selenium.host;
config['selenium_port'] = nightwatch_config.selenium.port;
config['desiredCapabilities'] = config['desiredCapabilities'] || {};
config['globals'] = { 'browser_name': browser_name };
for(var j in nightwatch_config.common_capabilities){
config['desiredCapabilities'][j] = config['desiredCapabilities'][j] || nightwatch_config.common_capabilities[j];
// config['desiredCapabilities']['browserstack.local'] = true;
}
}

module.exports = nightwatch_config;

This file was deleted.

This file was deleted.

@@ -8,8 +8,10 @@
"test": "test"
},
"scripts": {
"start": "nodemon --watch test/js/tests-async.js --exec npm test",
"test": "npx babel test/js/tests-async.js -o test/js/tests-async-es5.js"
"server": "ngrok http 3000",
"test": "nightwatch -c browserstack.conf.js -e chrome,firefox,ie,edge,safari,opera",
"start": "nodemon --watch test/js/tests-async.js --exec npm run compile",
"compile": "npx babel test/js/tests-async.js -o test/js/tests-async-es5.js"
},
"repository": {
"type": "git",
@@ -27,7 +29,6 @@
"babel-core": "^6.26.3",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"cbt_tunnels": "^0.9.7",
"nightwatch": "^0.9.21",
"nodemon": "^1.17.5"
}

0 comments on commit fcf39a4

Please sign in to comment.
You can’t perform that action at this time.