mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/base/TestControllerSideBar.java
@Test
    public void testControllerSpecs() throws InterruptedException
    {
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        
        ControllerHelper.displayControllerInfo(m_Driver, ControllerHelper.DEFAULT_CONTROLLER_NAME);
        
        //open controller specs
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("button[id*='specsButton']")));
        WebElement specButton = m_Driver.findElement(By.cssSelector("button[id*='specsButton']"));
        specButton.click();

        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[id*='ctlrCapabilitiesHeader']")));
        WebElement capabilHeader = m_Driver.findElement(By.cssSelector("div[id*='ctlrCapabilitiesHeader']"));
        WebElement header = capabilHeader.findElement(By.cssSelector("span[class='ui-dialog-title']"));
        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.tagName("BODY"), "Capabilities Document"));
        assertThat(header.getText(), is("Capabilities Document"));
        
        //--verify capabilities are displayed---
        capabilHeader = m_Driver.findElement(By.cssSelector("div[id*='ctlrCapabilitiesHeader']"));
        WebElement assetCapabils = capabilHeader.findElement(By.cssSelector("div[id*='ctlrTreeTable']"));
        assertThat(assetCapabils.getText().isEmpty(), is(false));
        
        //--verify specific item to capabilities
        //TODO: TH-1274 Improve testing.
        WebElement caps = capabilHeader.findElement(By.cssSelector("div[id*='TreeTable']"));
        assertThat(caps.getText().isEmpty(), is(false));
        assertThat(caps.getText(), containsString("Example Controller"));
        
        //---close the specs dialog---
        WebElement closeDialog = capabilHeader.findElement(By.cssSelector("span[class='ui-icon ui-icon-closethick']"));
        assertThat(closeDialog.isDisplayed(), is(true));
        closeDialog.click();
        
        WebElement infoHeader = m_Driver.findElement(By.cssSelector("div[id$='controllerInfoDlg']"));
        
        //---close the info dialog---
        closeDialog = infoHeader.findElement(By.cssSelector("span[class='ui-icon ui-icon-closethick']"));
        assertThat(closeDialog.isDisplayed(), is(true));
        closeDialog.click();
    }
/**
     * Verify the Specs for a Controller exist.
     */
Verify the Specs for a Controller exist.
Verify the Specs for a Controller exist .
@Test
    public void testControllerSpecs() throws InterruptedException
    {
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        ControllerHelper.displayControllerInfo(m_Driver, ControllerHelper.DEFAULT_CONTROLLER_NAME);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("button[id*='specsButton']")));
        WebElement specButton = m_Driver.findElement(By.cssSelector("button[id*='specsButton']"));
        specButton.click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[id*='ctlrCapabilitiesHeader']")));
        WebElement capabilHeader = m_Driver.findElement(By.cssSelector("div[id*='ctlrCapabilitiesHeader']"));
        WebElement header = capabilHeader.findElement(By.cssSelector("span[class='ui-dialog-title']"));
        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.tagName("BODY"), "Capabilities Document"));
        assertThat(header.getText(), is("Capabilities Document"));
        capabilHeader = m_Driver.findElement(By.cssSelector("div[id*='ctlrCapabilitiesHeader']"));
        WebElement assetCapabils = capabilHeader.findElement(By.cssSelector("div[id*='ctlrTreeTable']"));
        assertThat(assetCapabils.getText().isEmpty(), is(false));
        WebElement caps = capabilHeader.findElement(By.cssSelector("div[id*='TreeTable']"));
        assertThat(caps.getText().isEmpty(), is(false));
        assertThat(caps.getText(), containsString("Example Controller"));
        WebElement closeDialog = capabilHeader.findElement(By.cssSelector("span[class='ui-icon ui-icon-closethick']"));
        assertThat(closeDialog.isDisplayed(), is(true));
        closeDialog.click();
        WebElement infoHeader = m_Driver.findElement(By.cssSelector("div[id$='controllerInfoDlg']"));
        closeDialog = infoHeader.findElement(By.cssSelector("span[class='ui-icon ui-icon-closethick']"));
        assertThat(closeDialog.isDisplayed(), is(true));
        closeDialog.click();
    }
@ Test public void testControllerSpecs ( ) throws InterruptedException { WebDriverWait wait = new WebDriverWait ( m_Driver , 10 ) ; ControllerHelper . displayControllerInfo ( m_Driver , ControllerHelper . DEFAULT_CONTROLLER_NAME ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "button[id*='specsButton']" ) ) ) ; WebElement specButton = m_Driver . findElement ( By . cssSelector ( "button[id*='specsButton']" ) ) ; specButton . click ( ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "div[id*='ctlrCapabilitiesHeader']" ) ) ) ; WebElement capabilHeader = m_Driver . findElement ( By . cssSelector ( "div[id*='ctlrCapabilitiesHeader']" ) ) ; WebElement header = capabilHeader . findElement ( By . cssSelector ( "span[class='ui-dialog-title']" ) ) ; wait . until ( ExpectedConditions . textToBePresentInElementLocated ( By . tagName ( "BODY" ) , "Capabilities Document" ) ) ; assertThat ( header . getText ( ) , is ( "Capabilities Document" ) ) ; capabilHeader = m_Driver . findElement ( By . cssSelector ( "div[id*='ctlrCapabilitiesHeader']" ) ) ; WebElement assetCapabils = capabilHeader . findElement ( By . cssSelector ( "div[id*='ctlrTreeTable']" ) ) ; assertThat ( assetCapabils . getText ( ) . isEmpty ( ) , is ( false ) ) ; WebElement caps = capabilHeader . findElement ( By . cssSelector ( "div[id*='TreeTable']" ) ) ; assertThat ( caps . getText ( ) . isEmpty ( ) , is ( false ) ) ; assertThat ( caps . getText ( ) , containsString ( "Example Controller" ) ) ; WebElement closeDialog = capabilHeader . findElement ( By . cssSelector ( "span[class='ui-icon ui-icon-closethick']" ) ) ; assertThat ( closeDialog . isDisplayed ( ) , is ( true ) ) ; closeDialog . click ( ) ; WebElement infoHeader = m_Driver . findElement ( By . cssSelector ( "div[id$='controllerInfoDlg']" ) ) ; closeDialog = infoHeader . findElement ( By . cssSelector ( "span[class='ui-icon ui-icon-closethick']" ) ) ; assertThat ( closeDialog . isDisplayed ( ) , is ( true ) ) ; closeDialog . click ( ) ; }
Verify the Specs for a Controller exist.
Verify the Specs for a Controller exist .
//open controller specs //--verify capabilities are displayed--- //--verify specific item to capabilities //TODO: TH-1274 Improve testing. //---close the specs dialog--- //---close the info dialog---