예제 #1
0
 /**
  * Tests that, SNP 'Show brief fields' filter works.
  *
  * Note: the brief fields option should have been tested in
  * testGenomicBrowserSNPDataSortableBrief
  *
  * @-depends testGenomicBrowserSNPDatatable
  *
  * @return void
  */
 function testGenomicBrowserSNPShowBriefFields()
 {
     $this->markTestIncomplete('Test should be updated for new main genomic browser tab.');
     $expected_headers = array('No.', 'PSC', 'DCCID', 'PSCID', 'Gender', 'Subproject', 'DoB', 'ExternalID', 'Chromosome', 'Strand', 'StartLoc', 'EndLoc', 'Size', 'Gene Symbol', 'Gene Name', 'Platform', 'RsID', 'SNP Name', 'SNP Description', 'External Source', 'Observed Base', 'Reference Base', 'Array Report', 'Markers', 'Validation Method', 'Validated', 'Function Prediction', 'Damaging', 'Genotype Quality', 'Exonic Function');
     $this->safeGet($this->url . "/genomic_browser/?submendu=snp_browser");
     // Apply filter
     $this->webDriver->findElement(WebDriverBy::Name('Show_Brief_Results'))->sendKeys("All fields");
     $button = $this->webDriver->findElement(WebDriverBy::xPath("\n                //input[@name='filter']\n            "));
     $this->clickToLoadNewPage($button);
     // Check column count
     $this->safeGet($this->url . "/genomic_browser/?submenu=snp_browser");
     $headers = $this->webDriver->findElements(WebDriverBy::xPath("\n                //div[@id='lorisworkspace']\n                //table[contains(@class, 'dynamictable')]\n                /thead\n                /tr\n                /th\n            "));
     $this->assertCount(count($expected_headers), $headers, "There should be " . count($expected_headers) . " columns in the table.");
 }
예제 #2
0
 /**
  * Link to visit level comments editable with proper permissions
  *
  * @return void
  */
 function testImageCommentsWindowEditable()
 {
     $this->markTestSkipped('React components can not be tested');
     // Setting permissions to view all sites to view all datasets
     $this->setupPermissions(array('imaging_browser_view_allsites', 'imaging_browser_qc'));
     $this->safeGet($this->url . "/imaging_browser/");
     $NativeLink = $this->webDriver->findElement(WebDriverBy::xPath('//*[@id="lorisworkspace"]/div[2]/div/div/table/tbody/tr/td[12]/a'));
     $this->clickToLoadNewPage($NativeLink);
     $ImageQCFeedback = $this->webDriver->findElement(WebDriverBy::cssSelector(".mri-second-row-panel > a:nth-child(1) > " . "span:nth-child(1) > span:nth-child(2)"));
     $handleList = $this->webDriver->getWindowHandles();
     $ImageQCFeedback->click();
     $newHandleList = $this->webDriver->getWindowHandles();
     $diff = array_diff($newHandleList, $handleList);
     $this->assertCount(1, $diff);
     $this->webDriver->switchTo()->window($diff[1]);
     // First clear the field then send the comments/text
     $this->webDriver->findElement(WebDriverBy::Name("savecomments[text][1]"))->clear();
     $this->webDriver->findElement(WebDriverBy::Name("savecomments[text][1]"))->sendKeys("Testing comment field within Geometric Intensity");
     $SaveButton = $this->webDriver->findElement(WebDriverBy::Name("fire_away"));
     $SaveButton->click();
     $GeometricDistortionText = $this->webDriver->findElement(WebDriverBy::Name("savecomments[text][1]"))->getText();
     $this->assertEquals("Testing comment field within Geometric Intensity", $GeometricDistortionText);
     $this->webDriver->switchTo()->window($diff[1])->close();
 }