mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/asset/TestAssetPage.java
@Test
    public void testRemoveAsset() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleAsset", "testExampleAsset");
        
        //remove asset
        WebElement removeButton = m_Driver.findElement(By.cssSelector("button[id*='removeButton']"));
        removeButton.click();
        
        //cancel removing the asset and verify the asset is still present
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("button[id*='cancelRemoveAsset']")));
        WebElement cancelRemove = m_Driver.findElement(By.cssSelector("button[id*='cancelRemoveAsset']"));
        cancelRemove.click();
        
        //verify asset is still present
        WebElement editPanel = m_Driver.findElement(By.cssSelector("span[id*='editPanel']"));
        assertThat(editPanel.getText(), is("testExampleAsset"));
        
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
        
        //---verify asset is gone---
        WebElement tabView = m_Driver.findElement(By.cssSelector("div[id*='tabView']"));
        WebElement noRecords = tabView.findElement(By.cssSelector("div[id*='assetObjData']"));
        assertThat(noRecords.getText(), is("No records found."));
    }
/**
     * Assuming an Asset was created using the exampleAsset type. Verify the example exception asset and example asset 
     * show up in the asset type list.. verify we can cancel removing an asset and verify the asset can be removed.
     */
Assuming an Asset was created using the exampleAsset type. Verify the example exception asset and example asset
show up in the asset type list.. verify we can cancel removing an asset and verify the asset can be removed.
Assuming an Asset was created using the exampleAsset type . Verify the example exception asset and example asset show up in the asset type list .. verify we can cancel removing an asset and verify the asset can be removed .
@Test
    public void testRemoveAsset() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleAsset", "testExampleAsset");
        WebElement removeButton = m_Driver.findElement(By.cssSelector("button[id*='removeButton']"));
        removeButton.click();
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("button[id*='cancelRemoveAsset']")));
        WebElement cancelRemove = m_Driver.findElement(By.cssSelector("button[id*='cancelRemoveAsset']"));
        cancelRemove.click();
        WebElement editPanel = m_Driver.findElement(By.cssSelector("span[id*='editPanel']"));
        assertThat(editPanel.getText(), is("testExampleAsset"));
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
        WebElement tabView = m_Driver.findElement(By.cssSelector("div[id*='tabView']"));
        WebElement noRecords = tabView.findElement(By.cssSelector("div[id*='assetObjData']"));
        assertThat(noRecords.getText(), is("No records found."));
    }
@ Test public void testRemoveAsset ( ) throws InterruptedException { AssetHelper . createAsset ( m_Driver , "ExampleAsset" , "testExampleAsset" ) ; WebElement removeButton = m_Driver . findElement ( By . cssSelector ( "button[id*='removeButton']" ) ) ; removeButton . click ( ) ; wait . until ( ExpectedConditions . presenceOfElementLocated ( By . cssSelector ( "button[id*='cancelRemoveAsset']" ) ) ) ; WebElement cancelRemove = m_Driver . findElement ( By . cssSelector ( "button[id*='cancelRemoveAsset']" ) ) ; cancelRemove . click ( ) ; WebElement editPanel = m_Driver . findElement ( By . cssSelector ( "span[id*='editPanel']" ) ) ; assertThat ( editPanel . getText ( ) , is ( "testExampleAsset" ) ) ; AssetHelper . removeAsset ( m_Driver , "testExampleAsset" ) ; WebElement tabView = m_Driver . findElement ( By . cssSelector ( "div[id*='tabView']" ) ) ; WebElement noRecords = tabView . findElement ( By . cssSelector ( "div[id*='assetObjData']" ) ) ; assertThat ( noRecords . getText ( ) , is ( "No records found." ) ) ; }
Assuming an Asset was created using the exampleAsset type.
Assuming an Asset was created using the exampleAsset type .
//remove asset //cancel removing the asset and verify the asset is still present //verify asset is still present //---verify asset is gone---