Evan You 12 лет назад
Родитель
Сommit
c83ce1e4a8
2 измененных файлов с 17 добавлено и 0 удалено
  1. 2 0
      examples/todomvc/index.html
  2. 15 0
      test/functional/specs/todomvc.js

+ 2 - 0
examples/todomvc/index.html

@@ -4,6 +4,8 @@
         <title>Todo</title>
         <meta charset="utf-8">
         <link rel="stylesheet" type="text/css" href="common/base.css">
+        <!-- for PhantomJS/CasperJS testing only -->
+        <script src="../../test/functional/fixtures/bind.js"></script>
     </head>
     <body>
         <section id="todoapp">

+ 15 - 0
test/functional/specs/todomvc.js

@@ -0,0 +1,15 @@
+casper.on('page.error', function (e) {
+    console.log('\n\n' + e + '\n\n')
+})
+
+casper.test.begin('todomvc', 1, function (test) {
+    
+    casper
+    .start('../../examples/todomvc/index.html', function () {
+        test.assertNotVisible('#footer')
+    })
+    .run(function () {
+        test.done()
+    })
+
+})