mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/observation/ObservationHelper.java
private static void verifyGeneralObservationInformation(
            GeneralObservationInformation information, WebElement obsPanel)
    {
        //check the header 
        WebElement infoHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeader']"));
        assertThat(infoHeader.getText(), is("General Information"));
        
        //check uuid (should always be there)
        WebElement uuidHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderUuid']"));
        assertThat(uuidHeader.getText(), is("UUID"));
       
        WebElement uuidValue = obsPanel.findElement(By.cssSelector("span[id$='genObsUuid']"));
        assertThat(uuidValue.getText(), not(isEmptyOrNullString()));
        
        //check system id (should always be there)
        WebElement sysIdHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderSysId']"));
        assertThat(sysIdHeader.getText(), is("System Id"));
        
        WebElement sysIdValue = obsPanel.findElement(By.cssSelector("span[id$='genSysId']"));
        assertThat(sysIdValue.getText(), not(isEmptyOrNullString()));
        
        if (information != null)
        {
            if (information.isSetAssetLocation())
            {
                //check uuid (should always be there)
                WebElement assetLocHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderAssetLoc']"));
                assertThat(assetLocHeader.getText(), is("Asset Location"));
               
                WebElement assetLocValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoAssetLoc']"));
                assertThat(assetLocValue.getText(), not(isEmptyOrNullString()));
            }
            
            if (information.isSetAssetOrientation())
            {
                //check uuid (should always be there)
                WebElement assetOrientationHeader = obsPanel.findElement(
                        By.cssSelector("span[id$='genHeaderAssetOrient']"));
                assertThat(assetOrientationHeader.getText(), is("Asset Orientation"));
               
                WebElement assetOrientValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoAssetOrient']"));
                assertThat(assetOrientValue.getText(), not(isEmptyOrNullString()));
            }
            
            if (information.isSetPlatformOrientation())
            {
                //check uuid (should always be there)
                WebElement pltOrientationHeader = obsPanel.findElement(
                        By.cssSelector("span[id$='genHeaderPltOrient']"));
                assertThat(pltOrientationHeader.getText(), is("Platform Orientation"));
               
                WebElement pltOrientValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoPltOrient']"));
                assertThat(pltOrientValue.getText(), not(isEmptyOrNullString()));
            }
            
            if (information.isSetPointingLocation())
            {
                //check uuid (should always be there)
                WebElement pointingLocHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderPointingLoc']"));
                assertThat(pointingLocHeader.getText(), is("Pointing Location"));
               
                WebElement pointingLocValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoPointingLoc']"));
                assertThat(pointingLocValue.getText(), not(isEmptyOrNullString()));
            }
            
            if (information.hasReservedField())
            {
                verifyReservedFieldPanel(obsPanel, information);
            }
        }
    }
/**
     * Verifies general information information is displayed for a given observation panel.
     * @param information
     *  the object which contains the general information that is to be displayed in the given observation panel
     * @param obsPanel 
     *  the observation panel that should hold the given general information
     *  
     */
Verifies general information information is displayed for a given observation panel.
@param information
the object which contains the general information that is to be displayed in the given observation panel
@param obsPanel
the observation panel that should hold the given general information
Verifies general information information is displayed for a given observation panel . @param information the object which contains the general information that is to be displayed in the given observation panel @param obsPanel the observation panel that should hold the given general information
private static void verifyGeneralObservationInformation(
            GeneralObservationInformation information, WebElement obsPanel)
    {
        WebElement infoHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeader']"));
        assertThat(infoHeader.getText(), is("General Information"));
        WebElement uuidHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderUuid']"));
        assertThat(uuidHeader.getText(), is("UUID"));
        WebElement uuidValue = obsPanel.findElement(By.cssSelector("span[id$='genObsUuid']"));
        assertThat(uuidValue.getText(), not(isEmptyOrNullString()));
        WebElement sysIdHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderSysId']"));
        assertThat(sysIdHeader.getText(), is("System Id"));
        WebElement sysIdValue = obsPanel.findElement(By.cssSelector("span[id$='genSysId']"));
        assertThat(sysIdValue.getText(), not(isEmptyOrNullString()));
        if (information != null)
        {
            if (information.isSetAssetLocation())
            {
                WebElement assetLocHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderAssetLoc']"));
                assertThat(assetLocHeader.getText(), is("Asset Location"));
                WebElement assetLocValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoAssetLoc']"));
                assertThat(assetLocValue.getText(), not(isEmptyOrNullString()));
            }
            if (information.isSetAssetOrientation())
            {
                WebElement assetOrientationHeader = obsPanel.findElement(
                        By.cssSelector("span[id$='genHeaderAssetOrient']"));
                assertThat(assetOrientationHeader.getText(), is("Asset Orientation"));
                WebElement assetOrientValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoAssetOrient']"));
                assertThat(assetOrientValue.getText(), not(isEmptyOrNullString()));
            }
            if (information.isSetPlatformOrientation())
            {
                WebElement pltOrientationHeader = obsPanel.findElement(
                        By.cssSelector("span[id$='genHeaderPltOrient']"));
                assertThat(pltOrientationHeader.getText(), is("Platform Orientation"));
                WebElement pltOrientValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoPltOrient']"));
                assertThat(pltOrientValue.getText(), not(isEmptyOrNullString()));
            }
            if (information.isSetPointingLocation())
            {
                WebElement pointingLocHeader = obsPanel.findElement(By.cssSelector("span[id$='genHeaderPointingLoc']"));
                assertThat(pointingLocHeader.getText(), is("Pointing Location"));
                WebElement pointingLocValue = obsPanel.findElement(By.cssSelector("span[id$='genInfoPointingLoc']"));
                assertThat(pointingLocValue.getText(), not(isEmptyOrNullString()));
            }
            if (information.hasReservedField())
            {
                verifyReservedFieldPanel(obsPanel, information);
            }
        }
    }
private static void verifyGeneralObservationInformation ( GeneralObservationInformation information , WebElement obsPanel ) { WebElement infoHeader = obsPanel . findElement ( By . cssSelector ( "span[id$='genHeader']" ) ) ; assertThat ( infoHeader . getText ( ) , is ( "General Information" ) ) ; WebElement uuidHeader = obsPanel . findElement ( By . cssSelector ( "span[id$='genHeaderUuid']" ) ) ; assertThat ( uuidHeader . getText ( ) , is ( "UUID" ) ) ; WebElement uuidValue = obsPanel . findElement ( By . cssSelector ( "span[id$='genObsUuid']" ) ) ; assertThat ( uuidValue . getText ( ) , not ( isEmptyOrNullString ( ) ) ) ; WebElement sysIdHeader = obsPanel . findElement ( By . cssSelector ( "span[id$='genHeaderSysId']" ) ) ; assertThat ( sysIdHeader . getText ( ) , is ( "System Id" ) ) ; WebElement sysIdValue = obsPanel . findElement ( By . cssSelector ( "span[id$='genSysId']" ) ) ; assertThat ( sysIdValue . getText ( ) , not ( isEmptyOrNullString ( ) ) ) ; if ( information != null ) { if ( information . isSetAssetLocation ( ) ) { WebElement assetLocHeader = obsPanel . findElement ( By . cssSelector ( "span[id$='genHeaderAssetLoc']" ) ) ; assertThat ( assetLocHeader . getText ( ) , is ( "Asset Location" ) ) ; WebElement assetLocValue = obsPanel . findElement ( By . cssSelector ( "span[id$='genInfoAssetLoc']" ) ) ; assertThat ( assetLocValue . getText ( ) , not ( isEmptyOrNullString ( ) ) ) ; } if ( information . isSetAssetOrientation ( ) ) { WebElement assetOrientationHeader = obsPanel . findElement ( By . cssSelector ( "span[id$='genHeaderAssetOrient']" ) ) ; assertThat ( assetOrientationHeader . getText ( ) , is ( "Asset Orientation" ) ) ; WebElement assetOrientValue = obsPanel . findElement ( By . cssSelector ( "span[id$='genInfoAssetOrient']" ) ) ; assertThat ( assetOrientValue . getText ( ) , not ( isEmptyOrNullString ( ) ) ) ; } if ( information . isSetPlatformOrientation ( ) ) { WebElement pltOrientationHeader = obsPanel . findElement ( By . cssSelector ( "span[id$='genHeaderPltOrient']" ) ) ; assertThat ( pltOrientationHeader . getText ( ) , is ( "Platform Orientation" ) ) ; WebElement pltOrientValue = obsPanel . findElement ( By . cssSelector ( "span[id$='genInfoPltOrient']" ) ) ; assertThat ( pltOrientValue . getText ( ) , not ( isEmptyOrNullString ( ) ) ) ; } if ( information . isSetPointingLocation ( ) ) { WebElement pointingLocHeader = obsPanel . findElement ( By . cssSelector ( "span[id$='genHeaderPointingLoc']" ) ) ; assertThat ( pointingLocHeader . getText ( ) , is ( "Pointing Location" ) ) ; WebElement pointingLocValue = obsPanel . findElement ( By . cssSelector ( "span[id$='genInfoPointingLoc']" ) ) ; assertThat ( pointingLocValue . getText ( ) , not ( isEmptyOrNullString ( ) ) ) ; } if ( information . hasReservedField ( ) ) { verifyReservedFieldPanel ( obsPanel , information ) ; } } }
Verifies general information information is displayed for a given observation panel.
Verifies general information information is displayed for a given observation panel .
//check the header  //check uuid (should always be there) //check system id (should always be there) //check uuid (should always be there) //check uuid (should always be there) //check uuid (should always be there) //check uuid (should always be there)