Permalink
Browse files

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

  • Loading branch information...
1 parent a081239 commit 329be5e3a67842b7fc399bd088c688d91ec989f5 Sam.IO.Hsiao committed Oct 18, 2016
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/TodoSeleniumTest.php
@@ -43,4 +43,19 @@ public function 一啟動顯示3筆task()
$this->assertContains('Task 2', $this->byTag('body')->text());
$this->assertContains('Task 3', $this->byTag('body')->text());
}
+
+ /** @test */
+ public function 新增1task並顯示在下方()
+ {
+ $this->url($this->rootURL);
+ $this->assertNotContains('Task 1', $this->byTag('body')->text());
+
+ $this->url($this->rootURL);
+ $this->byName('name')->value('Task 1');
+ $this->byXPath("//button[contains(text(), 'Add Task')]")->click();
+
+ sleep($this->ajaxDelay);
+
+ $this->assertContains('Task 1', $this->byTag('body')->text());
+ }
}

0 comments on commit 329be5e

Please sign in to comment.