mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/asset/TestAssetObservations.java
@Test
    public void testObservationImages()
    {
        WebDriverWait wait = new WebDriverWait(m_Driver, 5);
        
        //list of all the panels
        wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.cssSelector("div[id$='observationPanel']")));
        List<WebElement> panels = m_Driver.findElements(By.cssSelector("div[id$='observationPanel']"));
        
        //make sure there are actually observations to verify
        assertThat(panels.size(), greaterThan(0));
        
        //verify all the observations show the correct asset image
        for (WebElement webElement : panels)
        {
            WebElement assetImg = webElement.findElement(By.cssSelector("img[id$='obsAssetImg']"));
            assertThat(assetImg.isDisplayed(), is(true));
            
            String source = assetImg.getAttribute("src");
            String img = ImageHelper.getPictureOrIconName(source, ".png");
            
            assertThat(img, is(ObservationConstants.IMG_MOD_ACOUSTIC));
        }
    }
/**
     * Verify the correct asset image shows up for the observation page.
     */
Verify the correct asset image shows up for the observation page.
Verify the correct asset image shows up for the observation page .
@Test
    public void testObservationImages()
    {
        WebDriverWait wait = new WebDriverWait(m_Driver, 5);
        wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.cssSelector("div[id$='observationPanel']")));
        List<WebElement> panels = m_Driver.findElements(By.cssSelector("div[id$='observationPanel']"));
        assertThat(panels.size(), greaterThan(0));
        for (WebElement webElement : panels)
        {
            WebElement assetImg = webElement.findElement(By.cssSelector("img[id$='obsAssetImg']"));
            assertThat(assetImg.isDisplayed(), is(true));
            String source = assetImg.getAttribute("src");
            String img = ImageHelper.getPictureOrIconName(source, ".png");
            assertThat(img, is(ObservationConstants.IMG_MOD_ACOUSTIC));
        }
    }
@ Test public void testObservationImages ( ) { WebDriverWait wait = new WebDriverWait ( m_Driver , 5 ) ; wait . until ( ExpectedConditions . presenceOfAllElementsLocatedBy ( By . cssSelector ( "div[id$='observationPanel']" ) ) ) ; List < WebElement > panels = m_Driver . findElements ( By . cssSelector ( "div[id$='observationPanel']" ) ) ; assertThat ( panels . size ( ) , greaterThan ( 0 ) ) ; for ( WebElement webElement : panels ) { WebElement assetImg = webElement . findElement ( By . cssSelector ( "img[id$='obsAssetImg']" ) ) ; assertThat ( assetImg . isDisplayed ( ) , is ( true ) ) ; String source = assetImg . getAttribute ( "src" ) ; String img = ImageHelper . getPictureOrIconName ( source , ".png" ) ; assertThat ( img , is ( ObservationConstants . IMG_MOD_ACOUSTIC ) ) ; } }
Verify the correct asset image shows up for the observation page.
Verify the correct asset image shows up for the observation page .
//list of all the panels //make sure there are actually observations to verify //verify all the observations show the correct asset image