github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/themes/wind/static/libs/vue-1.0.24/test/e2e/commits.js (about)

     1  casper.on('remote.message', function (e) {
     2    console.log(e)
     3  })
     4  
     5  casper.test.begin('commits', 18, function (test) {
     6    casper
     7    .start('examples/commits/index.html')
     8    .then(function () {
     9      // radio inputs & labels
    10      test.assertElementCount('input', 2)
    11      test.assertElementCount('label', 2)
    12      test.assertSelectorHasText('label[for="master"]', 'master')
    13      test.assertSelectorHasText('label[for="dev"]', 'dev')
    14      // initial fetched commits
    15      test.assertField('branch', 'master')
    16      test.assertSelectorHasText('p', 'vuejs/vue@master')
    17      test.assertElementCount('li', 3)
    18      test.assertSelectorHasText('li:first-child a.commit', '1111111')
    19      test.assertSelectorHasText('li:first-child span.message', 'one')
    20      test.assertSelectorHasText('li:first-child span.author', 'Evan')
    21      test.assertSelectorHasText('li:first-child span.date', '2014-10-15 13:52:58')
    22    })
    23    .thenClick('input[value="dev"]', function () {
    24      test.assertField('branch', 'dev')
    25      test.assertSelectorHasText('p', 'vuejs/vue@dev')
    26      test.assertElementCount('li', 3)
    27      test.assertSelectorHasText('li:first-child a.commit', '2222222')
    28      test.assertSelectorHasText('li:first-child span.message', 'two')
    29      test.assertSelectorHasText('li:first-child span.author', 'Evan')
    30      test.assertSelectorHasText('li:first-child span.date', '2014-10-15 13:52:58')
    31    })
    32    // run
    33    .run(function () {
    34      test.done()
    35    })
    36  })