CombineGridTest.php 1016 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Tests\Feature;
  3. use Tests\TestCase;
  4. class CombineGridTest extends TestCase
  5. {
  6. public function test()
  7. {
  8. $this->visit('admin/tests/report')
  9. ->assertResponseStatus(200)
  10. ->see('报表')
  11. ->see('avgMonthCost')
  12. ->see('avgVist')
  13. ->see('avgCost')
  14. ->see('top');
  15. // Column::help
  16. $this->assertCount(1, $this->crawler()->filter('th a i[class*=fa-question-circle]'));
  17. $this->assertCount(2, $this->crawler()->filter('thead tr'));
  18. $firstTr = $this->crawler()->filter('thead tr')->first()->filter('th');
  19. // cost
  20. $this->assertEquals('2', (string) $firstTr->eq(2)->attr('rowspan'));
  21. // avgCost
  22. $this->assertEquals('3', (string) $firstTr->eq(3)->attr('colspan'));
  23. // avgVist
  24. $this->assertEquals('3', (string) $firstTr->eq(4)->attr('colspan'));
  25. // top
  26. $this->assertEquals('3', (string) $firstTr->eq(5)->attr('colspan'));
  27. }
  28. }