|
|
@@ -1,4 +1,8 @@
|
|
|
-casper.test.begin('commits', 14, function (test) {
|
|
|
+casper.on('remote.message', function (e) {
|
|
|
+ console.log(e)
|
|
|
+})
|
|
|
+
|
|
|
+casper.test.begin('commits', 26, function (test) {
|
|
|
|
|
|
casper
|
|
|
.start('../../examples/commits/index.html')
|
|
|
@@ -13,16 +17,28 @@ casper.test.begin('commits', 14, function (test) {
|
|
|
test.assertField('branch', 'master')
|
|
|
test.assertSelectorHasText('p', 'yyx990803/vue@master')
|
|
|
test.assertElementCount('li', 3)
|
|
|
+ test.assertSelectorHasText('li:first-child a.commit', '1111111')
|
|
|
+ test.assertSelectorHasText('li:first-child span.message', 'one')
|
|
|
+ test.assertSelectorHasText('li:first-child span.author', 'Evan')
|
|
|
+ test.assertSelectorHasText('li:first-child span.date', '2014-10-15 13:52:58')
|
|
|
})
|
|
|
.thenClick('input[value="dev"]', function () {
|
|
|
test.assertField('branch', 'dev')
|
|
|
test.assertSelectorHasText('p', 'yyx990803/vue@dev')
|
|
|
test.assertElementCount('li', 3)
|
|
|
+ test.assertSelectorHasText('li:first-child a.commit', '2222222')
|
|
|
+ test.assertSelectorHasText('li:first-child span.message', 'two')
|
|
|
+ test.assertSelectorHasText('li:first-child span.author', 'Evan')
|
|
|
+ test.assertSelectorHasText('li:first-child span.date', '2014-10-15 13:52:58')
|
|
|
})
|
|
|
.thenClick('input[value="next"]', function () {
|
|
|
test.assertField('branch', 'next')
|
|
|
test.assertSelectorHasText('p', 'yyx990803/vue@next')
|
|
|
test.assertElementCount('li', 3)
|
|
|
+ test.assertSelectorHasText('li:first-child a.commit', '3333333')
|
|
|
+ test.assertSelectorHasText('li:first-child span.message', 'three')
|
|
|
+ test.assertSelectorHasText('li:first-child span.author', 'Evan')
|
|
|
+ test.assertSelectorHasText('li:first-child span.date', '2014-10-15 13:52:58')
|
|
|
})
|
|
|
// run
|
|
|
.run(function () {
|