create_disease_IVA2.php 1.01 KB
Newer Older
1
<?php
mkroon's avatar
mkroon committed
2
require_once 'LOVDSeleniumBaseTestCase.php';
3

4 5 6 7
use \Facebook\WebDriver\WebDriverBy;
use \Facebook\WebDriver\WebDriverExpectedCondition;

class CreateDiseaseIVATest extends LOVDSeleniumWebdriverBaseTestCase
mkroon's avatar
mkroon committed
8 9 10
{
    public function testCreateDiseaseIVA()
    {
11 12
        $this->driver->get(ROOT_URL . "/src/diseases?create");
        $this->enterValue(WebDriverBy::name("symbol"), "IVA2");
Ivo Fokkema's avatar
Ivo Fokkema committed
13
        $this->enterValue(WebDriverBy::name("name"), "isovaleric acidemia 2");
14 15 16 17 18
        $this->enterValue(WebDriverBy::name("id_omim"), "243522");
        $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="genes[]"]/option[text()="IVD (isovaleryl-CoA dehydrogenase)"]'));
        $option->click();
        $element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create disease information entry']"));
        $element->click();
Ivo Fokkema's avatar
Ivo Fokkema committed
19

20
        $this->assertEquals("Successfully created the disease information entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
mkroon's avatar
mkroon committed
21
    }
22
}