Permalink
Browse files

TodoSeleniumAppTest (新增 1 筆 task 並顯示在下方)

  • Loading branch information...
1 parent 4a6b32c commit 03a151bbf7b4be9ba023998902b2aa63da64976b Sam.IO.Hsiao committed Oct 18, 2016
Showing with 19 additions and 0 deletions.
  1. +19 −0 tests/TodoSeleniumAppTest.php
@@ -36,4 +36,23 @@ public function 一啟動顯示3筆task()
'name' => 'Task 3',
]);
}
+
+ /** @test */
+ public function 新增1task並顯示在下方()
+ {
+ $this->visit($this->rootURL)
+ ->dontSee('Task 1')
+ ->dontSeeInDatabase('tasks', [
+ 'name' => 'Task 1'
+ ]);
+
+ $this->visit($this->rootURL)
+ ->type('Task 1', 'name')
+ ->press('Add Task')
+ ->hold($this->ajaxDelay)
+ ->see('Task 1')
+ ->seeInDatabase('tasks', [
+ 'name' => 'Task 1'
+ ]);
+ }
}

0 comments on commit 03a151b

Please sign in to comment.