예제 #1
0
 /**
  * Tests that help editor loads with the permission
  *
  * @return void
  */
 function testHelpEditorPermission()
 {
     $this->setupPermissions(array("context_help"));
     $this->safeGet($this->url . "/help_editor/");
     $bodyText = $this->safeFindElement(WebDriverBy::XPath("//*[@id='lorisworkspace']/table/tbody/tr/td[1]"))->getText();
     $this->assertContains("List of Topics", $bodyText);
     $this->resetPermissions();
 }
예제 #2
0
 /**
  * Tests research function in unresolved conflicts
  * author: Wang Shen
  *
  * @return void
  */
 function testSearchUnresolvedConflicts()
 {
     $this->safeGet($this->url . "/conflict_resolver/");
     $keywordElement = $this->webDriver->findElement(WebDriverBy::Name("Question"));
     $keywordElement->sendkeys('TestTestTest');
     //click show data button
     $this->webDriver->findElement(WebDriverBy::ID("testShowData1"))->click();
     $bodyText = $this->webDriver->findElement(WebDriverBy::XPath("//*[@id='conflict_resolver']/div/div/div/" . "table/tbody/tr[1]/td[6]"))->getText();
     $this->assertContains("TestTestTest", $bodyText);
 }
예제 #3
0
 public function testGeneralDescriptionTabLoads()
 {
     $this->webDriver->get($this->url . '?test_name=statistics&subtest=stats_general&dynamictabs=dynamictabs');
     $header = $this->webDriver->findElement(WebDriverBy::XPath("//div[@id = 'page']/h2"));
     $this->assertContains("Welcome to the statistics page", $header->getText());
 }
예제 #4
0
 /**
  * To test that, when loading the Dashboard, click the Views button of
  * Recruitment, the items "View overall recruitment" and "View site breakdown"
  * appear
  * author : Wang Shen
  *
  * @return void
  */
 public function testDashboardRecruitmentView()
 {
     $this->safeGet($this->url . '/dashboard/');
     $views = $this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='lorisworkspace']/div/di" . "v[1]/div[2]/div[1]/div/div/button"));
     $views->click();
     $assertText1 = $this->webDriver->findElement(WebDriverBy::XPath("//*[@id='lorisworkspace']/div/div[1]" . "/div[2]/div[1]/div/div/ul/li[1]/a"))->getText();
     $assertText2 = $this->webDriver->findElement(WebDriverBy::XPath("//*[@id='lorisworkspace']/div/div[1]" . "/div[2]/div[1]/div/div/ul/li[2]/a"))->getText();
     $this->assertContains("View overall recruitment", $assertText1);
     $this->assertContains("View site breakdown", $assertText2);
 }