mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/comms/TestAddCommsDlg.java
private void assertSpecsButton(String layerType, String productName)
    {
        String selector = "tr[data-rk='" + layerType + "']>td:nth-child(3)>div>button";

        // assert that specs buttons are working for each layer
        WebElement button = m_Driver.findElement(By.cssSelector(selector));
        wait.until(ExpectedConditions.visibilityOf(button));
        button.click();

        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[id*='CapabilitiesHeader']")));
        WebElement capabilHeader = m_Driver.findElement(By.cssSelector("div[id*='CapabilitiesHeader']"));
        WebElement header = capabilHeader.findElement(By.cssSelector("span[class='ui-dialog-title']"));
        assertThat(header.getText(), containsString("Capabilities Document"));

        // --verify capabilities are displayed---
        WebElement caps = capabilHeader.findElement(By.cssSelector("div[id*='TreeTable']"));
        assertThat(caps.getText().isEmpty(), is(false));

        // --verify specific item to capabilities
        // TODO: TH-1274 Improve testing.
        assertThat(caps.getText(), containsString(productName));

        // ---close the dialog---
        WebElement closeDialog = capabilHeader.findElement(By.cssSelector("span[class='ui-icon ui-icon-closethick']"));
        assertThat(closeDialog.isDisplayed(), is(true));
        closeDialog.click();
    }
/**
     * For a given partial id, find the element in the add comms accordion.
     * 
     * @param layerType
     *            layer type as listed in the layer tables (e.g. example.ccomms.ExampleLinkLayer)
     * @param productName
     *            the product name, from the Capabilities document; used for validation.
     */
For a given partial id, find the element in the add comms accordion.

@param layerType
layer type as listed in the layer tables
@param productName
the product name, from the Capabilities document; used for validation.
For a given partial id find the element in the add comms accordion . @param layerType layer type as listed in the layer tables @param productName the product name from the Capabilities document ; used for validation .
private void assertSpecsButton(String layerType, String productName)
    {
        String selector = "tr[data-rk='" + layerType + "']>td:nth-child(3)>div>button";
        WebElement button = m_Driver.findElement(By.cssSelector(selector));
        wait.until(ExpectedConditions.visibilityOf(button));
        button.click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[id*='CapabilitiesHeader']")));
        WebElement capabilHeader = m_Driver.findElement(By.cssSelector("div[id*='CapabilitiesHeader']"));
        WebElement header = capabilHeader.findElement(By.cssSelector("span[class='ui-dialog-title']"));
        assertThat(header.getText(), containsString("Capabilities Document"));
        WebElement caps = capabilHeader.findElement(By.cssSelector("div[id*='TreeTable']"));
        assertThat(caps.getText().isEmpty(), is(false));
        assertThat(caps.getText(), containsString(productName));
        WebElement closeDialog = capabilHeader.findElement(By.cssSelector("span[class='ui-icon ui-icon-closethick']"));
        assertThat(closeDialog.isDisplayed(), is(true));
        closeDialog.click();
    }
private void assertSpecsButton ( String layerType , String productName ) { String selector = "tr[data-rk='" + layerType + "']>td:nth-child(3)>div>button" ; WebElement button = m_Driver . findElement ( By . cssSelector ( selector ) ) ; wait . until ( ExpectedConditions . visibilityOf ( button ) ) ; button . click ( ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "div[id*='CapabilitiesHeader']" ) ) ) ; WebElement capabilHeader = m_Driver . findElement ( By . cssSelector ( "div[id*='CapabilitiesHeader']" ) ) ; WebElement header = capabilHeader . findElement ( By . cssSelector ( "span[class='ui-dialog-title']" ) ) ; assertThat ( header . getText ( ) , containsString ( "Capabilities Document" ) ) ; WebElement caps = capabilHeader . findElement ( By . cssSelector ( "div[id*='TreeTable']" ) ) ; assertThat ( caps . getText ( ) . isEmpty ( ) , is ( false ) ) ; assertThat ( caps . getText ( ) , containsString ( productName ) ) ; WebElement closeDialog = capabilHeader . findElement ( By . cssSelector ( "span[class='ui-icon ui-icon-closethick']" ) ) ; assertThat ( closeDialog . isDisplayed ( ) , is ( true ) ) ; closeDialog . click ( ) ; }
For a given partial id, find the element in the add comms accordion.
For a given partial id find the element in the add comms accordion .
// assert that specs buttons are working for each layer // --verify capabilities are displayed--- // --verify specific item to capabilities // TODO: TH-1274 Improve testing. // ---close the dialog---