mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/asset/TestAssetLocation.java
@Test
    public void testGetPositionCapabilsDefaults() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleAsset", "testExampleAsset");
        
        WebElement latitude = m_Driver.findElement(By.cssSelector("input[id$='" + LAT_INPUT_ID + "']"));
        assertThat(latitude.getAttribute("value"), is(""));
        assertThat(latitude.isEnabled(), is(false));
        
        WebElement longitude = m_Driver.findElement(By.cssSelector("input[id$='" + LON_INPUT_ID +"']"));
        assertThat(longitude.getAttribute("value"), is(""));
        assertThat(longitude.isEnabled(), is(false));
        
        WebElement altitude = m_Driver.findElement(By.cssSelector("input[id$='" + ALT_INPUT_ID + "']"));
        assertThat(altitude.getAttribute("value"), is(""));
        assertThat(altitude.isEnabled(), is(false));
        
        WebElement bank = m_Driver.findElement(By.cssSelector("input[id$='" + BANK_INPUT_ID + "']"));
        assertThat(bank.getAttribute("value"), is(""));
        assertThat(bank.isEnabled(), is(false));
        
        WebElement heading = m_Driver.findElement(By.cssSelector("input[id$='" + HEAD_INPUT_ID + "']"));
        assertThat(heading.getAttribute("value"), is(""));
        assertThat(heading.isEnabled(), is(false));
        
        WebElement elevation = m_Driver.findElement(By.cssSelector("input[id$='" + ELV_INPUT_ID + "']"));
        assertThat(elevation.getAttribute("value"), is(""));
        assertThat(elevation.isEnabled(), is(false));
        
        //verify edit location button shows up
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + EDIT_LOC_BUT_ID + "']")).size(), is(1));
        
        //verify sync button shows up
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + SYNC_LOC_BUT_ID + "']")).size(), is(1));
        
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
    }
/**
     * Test the defaults of the ExampleAsset asset location handling
     * ExampleAsset: has getPosition capability, does not have setPosition capability
     * Asset position handling config property: not set yet so the flag is not registered
     * Verify default values are shown in the location fields, verify the edit location button does not
     * show up yet.
     */
Test the defaults of the ExampleAsset asset location handling
ExampleAsset: has getPosition capability, does not have setPosition capability
Asset position handling config property: not set yet so the flag is not registered
Verify default values are shown in the location fields, verify the edit location button does not
show up yet.
Test the defaults of the ExampleAsset asset location handling ExampleAsset : has getPosition capability does not have setPosition capability Asset position handling config property : not set yet so the flag is not registered Verify default values are shown in the location fields verify the edit location button does not show up yet .
@Test
    public void testGetPositionCapabilsDefaults() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleAsset", "testExampleAsset");
        WebElement latitude = m_Driver.findElement(By.cssSelector("input[id$='" + LAT_INPUT_ID + "']"));
        assertThat(latitude.getAttribute("value"), is(""));
        assertThat(latitude.isEnabled(), is(false));
        WebElement longitude = m_Driver.findElement(By.cssSelector("input[id$='" + LON_INPUT_ID +"']"));
        assertThat(longitude.getAttribute("value"), is(""));
        assertThat(longitude.isEnabled(), is(false));
        WebElement altitude = m_Driver.findElement(By.cssSelector("input[id$='" + ALT_INPUT_ID + "']"));
        assertThat(altitude.getAttribute("value"), is(""));
        assertThat(altitude.isEnabled(), is(false));
        WebElement bank = m_Driver.findElement(By.cssSelector("input[id$='" + BANK_INPUT_ID + "']"));
        assertThat(bank.getAttribute("value"), is(""));
        assertThat(bank.isEnabled(), is(false));
        WebElement heading = m_Driver.findElement(By.cssSelector("input[id$='" + HEAD_INPUT_ID + "']"));
        assertThat(heading.getAttribute("value"), is(""));
        assertThat(heading.isEnabled(), is(false));
        WebElement elevation = m_Driver.findElement(By.cssSelector("input[id$='" + ELV_INPUT_ID + "']"));
        assertThat(elevation.getAttribute("value"), is(""));
        assertThat(elevation.isEnabled(), is(false));
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + EDIT_LOC_BUT_ID + "']")).size(), is(1));
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + SYNC_LOC_BUT_ID + "']")).size(), is(1));
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
    }
@ Test public void testGetPositionCapabilsDefaults ( ) throws InterruptedException { AssetHelper . createAsset ( m_Driver , "ExampleAsset" , "testExampleAsset" ) ; WebElement latitude = m_Driver . findElement ( By . cssSelector ( "input[id$='" + LAT_INPUT_ID + "']" ) ) ; assertThat ( latitude . getAttribute ( "value" ) , is ( "" ) ) ; assertThat ( latitude . isEnabled ( ) , is ( false ) ) ; WebElement longitude = m_Driver . findElement ( By . cssSelector ( "input[id$='" + LON_INPUT_ID + "']" ) ) ; assertThat ( longitude . getAttribute ( "value" ) , is ( "" ) ) ; assertThat ( longitude . isEnabled ( ) , is ( false ) ) ; WebElement altitude = m_Driver . findElement ( By . cssSelector ( "input[id$='" + ALT_INPUT_ID + "']" ) ) ; assertThat ( altitude . getAttribute ( "value" ) , is ( "" ) ) ; assertThat ( altitude . isEnabled ( ) , is ( false ) ) ; WebElement bank = m_Driver . findElement ( By . cssSelector ( "input[id$='" + BANK_INPUT_ID + "']" ) ) ; assertThat ( bank . getAttribute ( "value" ) , is ( "" ) ) ; assertThat ( bank . isEnabled ( ) , is ( false ) ) ; WebElement heading = m_Driver . findElement ( By . cssSelector ( "input[id$='" + HEAD_INPUT_ID + "']" ) ) ; assertThat ( heading . getAttribute ( "value" ) , is ( "" ) ) ; assertThat ( heading . isEnabled ( ) , is ( false ) ) ; WebElement elevation = m_Driver . findElement ( By . cssSelector ( "input[id$='" + ELV_INPUT_ID + "']" ) ) ; assertThat ( elevation . getAttribute ( "value" ) , is ( "" ) ) ; assertThat ( elevation . isEnabled ( ) , is ( false ) ) ; assertThat ( m_Driver . findElements ( By . cssSelector ( "button[id$='" + EDIT_LOC_BUT_ID + "']" ) ) . size ( ) , is ( 1 ) ) ; assertThat ( m_Driver . findElements ( By . cssSelector ( "button[id$='" + SYNC_LOC_BUT_ID + "']" ) ) . size ( ) , is ( 1 ) ) ; AssetHelper . removeAsset ( m_Driver , "testExampleAsset" ) ; }
Test the defaults of the ExampleAsset asset location handling
 ExampleAsset: has getPosition capability, does not have setPosition capability
 Asset position handling config property: not set yet so the flag is not registered
 Verify default values are shown in the location fields, verify the edit location button does not
 show up yet.
Test the defaults of the ExampleAsset asset location handling ExampleAsset : has getPosition capability does not have setPosition capability Asset position handling config property : not set yet so the flag is not registered Verify default values are shown in the location fields verify the edit location button does not show up yet .
//verify edit location button shows up //verify sync button shows up