mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/asset/TestAssetPage.java
@Test
    public void testAssetBITStatusChanged() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleAsset", "testExampleAsset");
        
        //---verify asset status is unknown and it is deactivated---
        WebElement assetElement = AssetHelper.retrieveAsset(m_Driver, "testExampleAsset");
        assertThat(assetElement, is(notNullValue()));
        WebElement assetStatusDesc = assetElement.findElement(By.cssSelector("span[id*='assetStatusDescription']"));
        assertThat(assetStatusDesc.getText(), is("A status has not been established."));
        WebElement assetActiveStatus = assetElement.findElement(By.cssSelector("span[id*='assetActiveStatus']"));
        assertThat(assetActiveStatus.getText(), is("DEACTIVATED"));
        
        //---perform BIT---
        WebElement performBit = m_Driver.findElement(By.cssSelector("button[id*='performBit']"));
        GrowlVerifier.verifyAndWaitToDisappear(20, performBit, "Asset completed BIT test.");
        
        //---verify status changed to GOOD---
        wait.until(ExpectedConditions.textToBePresentInElementLocated(
                By.cssSelector("span[id$='assetStatusDescription']"), "BIT Passed"));
        assetElement = AssetHelper.retrieveAsset(m_Driver, "testExampleAsset");
        assertThat(assetElement, is(notNullValue()));
        //verify status light
        WebElement statusLed = assetElement.findElement(By.cssSelector("div[id*='assetStatusLed']"));
        assertThat(statusLed.isDisplayed(), is(true));
        //the status led class expected
        WebElement statusDiv = assetElement.findElement(By.cssSelector("div[class='led-GOOD']"));
        assertThat(statusDiv.isDisplayed(), is(true));
        
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
    }
/**
     * Verify the asset's BIT can be run and the status updates appropriately.
     */
Verify the asset's BIT can be run and the status updates appropriately.
Verify the asset ' s BIT can be run and the status updates appropriately .
@Test
    public void testAssetBITStatusChanged() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleAsset", "testExampleAsset");
        WebElement assetElement = AssetHelper.retrieveAsset(m_Driver, "testExampleAsset");
        assertThat(assetElement, is(notNullValue()));
        WebElement assetStatusDesc = assetElement.findElement(By.cssSelector("span[id*='assetStatusDescription']"));
        assertThat(assetStatusDesc.getText(), is("A status has not been established."));
        WebElement assetActiveStatus = assetElement.findElement(By.cssSelector("span[id*='assetActiveStatus']"));
        assertThat(assetActiveStatus.getText(), is("DEACTIVATED"));
        WebElement performBit = m_Driver.findElement(By.cssSelector("button[id*='performBit']"));
        GrowlVerifier.verifyAndWaitToDisappear(20, performBit, "Asset completed BIT test.");
        wait.until(ExpectedConditions.textToBePresentInElementLocated(
                By.cssSelector("span[id$='assetStatusDescription']"), "BIT Passed"));
        assetElement = AssetHelper.retrieveAsset(m_Driver, "testExampleAsset");
        assertThat(assetElement, is(notNullValue()));
        WebElement statusLed = assetElement.findElement(By.cssSelector("div[id*='assetStatusLed']"));
        assertThat(statusLed.isDisplayed(), is(true));
        WebElement statusDiv = assetElement.findElement(By.cssSelector("div[class='led-GOOD']"));
        assertThat(statusDiv.isDisplayed(), is(true));
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
    }
@ Test public void testAssetBITStatusChanged ( ) throws InterruptedException { AssetHelper . createAsset ( m_Driver , "ExampleAsset" , "testExampleAsset" ) ; WebElement assetElement = AssetHelper . retrieveAsset ( m_Driver , "testExampleAsset" ) ; assertThat ( assetElement , is ( notNullValue ( ) ) ) ; WebElement assetStatusDesc = assetElement . findElement ( By . cssSelector ( "span[id*='assetStatusDescription']" ) ) ; assertThat ( assetStatusDesc . getText ( ) , is ( "A status has not been established." ) ) ; WebElement assetActiveStatus = assetElement . findElement ( By . cssSelector ( "span[id*='assetActiveStatus']" ) ) ; assertThat ( assetActiveStatus . getText ( ) , is ( "DEACTIVATED" ) ) ; WebElement performBit = m_Driver . findElement ( By . cssSelector ( "button[id*='performBit']" ) ) ; GrowlVerifier . verifyAndWaitToDisappear ( 20 , performBit , "Asset completed BIT test." ) ; wait . until ( ExpectedConditions . textToBePresentInElementLocated ( By . cssSelector ( "span[id$='assetStatusDescription']" ) , "BIT Passed" ) ) ; assetElement = AssetHelper . retrieveAsset ( m_Driver , "testExampleAsset" ) ; assertThat ( assetElement , is ( notNullValue ( ) ) ) ; WebElement statusLed = assetElement . findElement ( By . cssSelector ( "div[id*='assetStatusLed']" ) ) ; assertThat ( statusLed . isDisplayed ( ) , is ( true ) ) ; WebElement statusDiv = assetElement . findElement ( By . cssSelector ( "div[class='led-GOOD']" ) ) ; assertThat ( statusDiv . isDisplayed ( ) , is ( true ) ) ; AssetHelper . removeAsset ( m_Driver , "testExampleAsset" ) ; }
Verify the asset's BIT can be run and the status updates appropriately.
Verify the asset ' s BIT can be run and the status updates appropriately .
//---verify asset status is unknown and it is deactivated--- //---perform BIT--- //---verify status changed to GOOD--- //verify status light //the status led class expected