Permalink
Browse files

TodoSeleniumAppTest (新增 1 筆 task 立即刪除)

  • Loading branch information...
1 parent 03a151b commit df45e362b472598ae2bc92a489dfcee52d180576 Sam.IO.Hsiao committed Oct 18, 2016
Showing with 26 additions and 0 deletions.
  1. +26 −0 tests/TodoSeleniumAppTest.php
@@ -55,4 +55,30 @@ public function 新增1筆task並顯示在下方()
'name' => 'Task 1'
]);
}
+
+ /** @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'
+ ]);
+
+ $this->press('Delete')
+ ->hold($this->ajaxDelay)
+ ->dontSee('Task 1')
+ ->dontSeeInDatabase('tasks', [
+ 'name' => 'Task 1'
+ ]);
+ }
}

0 comments on commit df45e36

Please sign in to comment.