mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/comms/TestCommsPage.java
@Test
    public void testRemoveStack() throws InterruptedException, ExecutionException, TimeoutException
    {        
        String physName = CommsGeneralHelper.getAvailablePhysicalLink(m_Driver);

        //create stack containing transport
        CommsGeneralHelper.createStack(m_Driver, physName, "beer", 
                "example.ccomms.ExampleLinkLayer", "kibble", "example.ccomms.DirectTransport");

        //remove stack
        m_Driver.findElement(By.cssSelector("button[id*='removeButton']")).click();
        
        //wait until cancel button from remove confirmation dialog is visible
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("button[id$='deleteCancelButton']")));
        
        //cancel removing the stack and verify the stack is still present
        WebElement cancelRemove = m_Driver.findElement(By.cssSelector("button[id$='deleteCancelButton']"));
        cancelRemove.click();
        
        //verify stack is still present
        WebElement stackTable = CommsGeneralHelper.retrieveStack(m_Driver, "kibble");
        assertThat(stackTable, is(notNullValue()));
        
        //verify that both layers are removed from stack - assert is contained in helper method
        CommsGeneralHelper.removeStack(m_Driver, "kibble");    
        
        //verify physical link still exists
        stackTable = CommsGeneralHelper.retrieveStack(m_Driver, physName);
        assertThat(stackTable, is(notNullValue()));
    }
/**
     * Verify stacks containing only a link layer can be deleted.
     * Verify stacks containing both link layer and transport layer can be deleted.
     * Verify removing a stack does not remove the physical link.
     * Verify we can cancel removing a stack.
     */
Verify stacks containing only a link layer can be deleted.
Verify stacks containing both link layer and transport layer can be deleted.
Verify removing a stack does not remove the physical link.
Verify we can cancel removing a stack.
Verify stacks containing only a link layer can be deleted . Verify stacks containing both link layer and transport layer can be deleted . Verify removing a stack does not remove the physical link . Verify we can cancel removing a stack .
@Test
    public void testRemoveStack() throws InterruptedException, ExecutionException, TimeoutException
    {        
        String physName = CommsGeneralHelper.getAvailablePhysicalLink(m_Driver);
        CommsGeneralHelper.createStack(m_Driver, physName, "beer", 
                "example.ccomms.ExampleLinkLayer", "kibble", "example.ccomms.DirectTransport");
        m_Driver.findElement(By.cssSelector("button[id*='removeButton']")).click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("button[id$='deleteCancelButton']")));
        WebElement cancelRemove = m_Driver.findElement(By.cssSelector("button[id$='deleteCancelButton']"));
        cancelRemove.click();
        WebElement stackTable = CommsGeneralHelper.retrieveStack(m_Driver, "kibble");
        assertThat(stackTable, is(notNullValue()));
        CommsGeneralHelper.removeStack(m_Driver, "kibble");    
        stackTable = CommsGeneralHelper.retrieveStack(m_Driver, physName);
        assertThat(stackTable, is(notNullValue()));
    }
@ Test public void testRemoveStack ( ) throws InterruptedException , ExecutionException , TimeoutException { String physName = CommsGeneralHelper . getAvailablePhysicalLink ( m_Driver ) ; CommsGeneralHelper . createStack ( m_Driver , physName , "beer" , "example.ccomms.ExampleLinkLayer" , "kibble" , "example.ccomms.DirectTransport" ) ; m_Driver . findElement ( By . cssSelector ( "button[id*='removeButton']" ) ) . click ( ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "button[id$='deleteCancelButton']" ) ) ) ; WebElement cancelRemove = m_Driver . findElement ( By . cssSelector ( "button[id$='deleteCancelButton']" ) ) ; cancelRemove . click ( ) ; WebElement stackTable = CommsGeneralHelper . retrieveStack ( m_Driver , "kibble" ) ; assertThat ( stackTable , is ( notNullValue ( ) ) ) ; CommsGeneralHelper . removeStack ( m_Driver , "kibble" ) ; stackTable = CommsGeneralHelper . retrieveStack ( m_Driver , physName ) ; assertThat ( stackTable , is ( notNullValue ( ) ) ) ; }
Verify stacks containing only a link layer can be deleted.
Verify stacks containing only a link layer can be deleted .
//create stack containing transport //remove stack //wait until cancel button from remove confirmation dialog is visible //cancel removing the stack and verify the stack is still present //verify stack is still present //verify that both layers are removed from stack - assert is contained in helper method //verify physical link still exists