mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/asset/TestAssetLocation.java
@Test
    public void testNoGetLocationCapabilsConfigHandlePositionTrue() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleObservationsAsset", "testExampleAsset");
        
        //set config property to true to use the asset plugin
        WebElement configButton = m_Driver.findElement(By.cssSelector("button[id*='configurationButton']"));
        configButton.click();
        
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("assetEditConfiguration")));
        
        WebElement configDialog = m_Driver.findElement(By.id("assetEditConfiguration"));
        WebElement configTable = configDialog.findElement(By.cssSelector("tbody[id$='compositeConfigTable_data']"));
        
        ConfigurationHelper.updateValue(configTable, "Plugin overrides position", true);
        
        configDialog = m_Driver.findElement(By.id("assetEditConfiguration"));
        WebElement saveConfig = configDialog.findElement(By.cssSelector("button[id*='saveConfig']"));
        saveConfig.click();
        
        //TODO TH-1189: Alter to verify save requested has been completed.
        //Sleep needed. Ajax may not be finished updating the page at the point an attempt is made to remove the 
        //asset.
        Thread.sleep(7000);
        
        //---refresh is required in order for asset location display to be updated---
        m_Driver.get(m_Driver.getCurrentUrl());
        
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("span[id$='positionNotAvailable']")));
        
        //verify edit location button doesn't show up
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + EDIT_LOC_BUT_ID + "']")).size(), is(0));
        
        //verify sync button doesn't show up
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + SYNC_LOC_BUT_ID + "']")).size(), is(0));
        
        //verify that the asset location is not available text shows up
        assertThat(m_Driver.findElements(By.cssSelector("span[id$='positionNotAvailable']")).size(), is(1));
        assertThat(m_Driver.findElement(By.cssSelector("span[id$='positionNotAvailable']")).getText(), 
                is("Position is not available"));
 
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
    }
/**
     * ExampleObservationsAsset: does not have getPosition capability, or setPosition capability
     * Asset position handling config property: set to true
     * Verify that the text the position is not available is displayed and the edit location button does not
     * show up and the sync button does not show up.
     */
does not have getPosition capability, or setPosition capability
Asset position handling config property: set to true
Verify that the text the position is not available is displayed and the edit location button does not
show up and the sync button does not show up.
does not have getPosition capability or setPosition capability Asset position handling config property : set to true Verify that the text the position is not available is displayed and the edit location button does not show up and the sync button does not show up .
@Test
    public void testNoGetLocationCapabilsConfigHandlePositionTrue() throws InterruptedException
    {
        AssetHelper.createAsset(m_Driver, "ExampleObservationsAsset", "testExampleAsset");
        WebElement configButton = m_Driver.findElement(By.cssSelector("button[id*='configurationButton']"));
        configButton.click();
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("assetEditConfiguration")));
        WebElement configDialog = m_Driver.findElement(By.id("assetEditConfiguration"));
        WebElement configTable = configDialog.findElement(By.cssSelector("tbody[id$='compositeConfigTable_data']"));
        ConfigurationHelper.updateValue(configTable, "Plugin overrides position", true);
        configDialog = m_Driver.findElement(By.id("assetEditConfiguration"));
        WebElement saveConfig = configDialog.findElement(By.cssSelector("button[id*='saveConfig']"));
        saveConfig.click();
        Thread.sleep(7000);
        m_Driver.get(m_Driver.getCurrentUrl());
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("span[id$='positionNotAvailable']")));
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + EDIT_LOC_BUT_ID + "']")).size(), is(0));
        assertThat(m_Driver.findElements(By.cssSelector("button[id$='" + SYNC_LOC_BUT_ID + "']")).size(), is(0));
        assertThat(m_Driver.findElements(By.cssSelector("span[id$='positionNotAvailable']")).size(), is(1));
        assertThat(m_Driver.findElement(By.cssSelector("span[id$='positionNotAvailable']")).getText(), 
                is("Position is not available"));
        AssetHelper.removeAsset(m_Driver, "testExampleAsset");
    }
@ Test public void testNoGetLocationCapabilsConfigHandlePositionTrue ( ) throws InterruptedException { AssetHelper . createAsset ( m_Driver , "ExampleObservationsAsset" , "testExampleAsset" ) ; WebElement configButton = m_Driver . findElement ( By . cssSelector ( "button[id*='configurationButton']" ) ) ; configButton . click ( ) ; WebDriverWait wait = new WebDriverWait ( m_Driver , 10 ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . id ( "assetEditConfiguration" ) ) ) ; WebElement configDialog = m_Driver . findElement ( By . id ( "assetEditConfiguration" ) ) ; WebElement configTable = configDialog . findElement ( By . cssSelector ( "tbody[id$='compositeConfigTable_data']" ) ) ; ConfigurationHelper . updateValue ( configTable , "Plugin overrides position" , true ) ; configDialog = m_Driver . findElement ( By . id ( "assetEditConfiguration" ) ) ; WebElement saveConfig = configDialog . findElement ( By . cssSelector ( "button[id*='saveConfig']" ) ) ; saveConfig . click ( ) ; Thread . sleep ( 7000 ) ; m_Driver . get ( m_Driver . getCurrentUrl ( ) ) ; wait . until ( ExpectedConditions . presenceOfElementLocated ( By . cssSelector ( "span[id$='positionNotAvailable']" ) ) ) ; assertThat ( m_Driver . findElements ( By . cssSelector ( "button[id$='" + EDIT_LOC_BUT_ID + "']" ) ) . size ( ) , is ( 0 ) ) ; assertThat ( m_Driver . findElements ( By . cssSelector ( "button[id$='" + SYNC_LOC_BUT_ID + "']" ) ) . size ( ) , is ( 0 ) ) ; assertThat ( m_Driver . findElements ( By . cssSelector ( "span[id$='positionNotAvailable']" ) ) . size ( ) , is ( 1 ) ) ; assertThat ( m_Driver . findElement ( By . cssSelector ( "span[id$='positionNotAvailable']" ) ) . getText ( ) , is ( "Position is not available" ) ) ; AssetHelper . removeAsset ( m_Driver , "testExampleAsset" ) ; }
ExampleObservationsAsset: does not have getPosition capability, or setPosition capability
 Asset position handling config property: set to true
 Verify that the text the position is not available is displayed and the edit location button does not
 show up and the sync button does not show up.
ExampleObservationsAsset : does not have getPosition capability or setPosition capability Asset position handling config property : set to true Verify that the text the position is not available is displayed and the edit location button does not show up and the sync button does not show up .
//set config property to true to use the asset plugin //TODO TH-1189: Alter to verify save requested has been completed. //Sleep needed. Ajax may not be finished updating the page at the point an attempt is made to remove the  //asset. //---refresh is required in order for asset location display to be updated--- //verify edit location button doesn't show up //verify sync button doesn't show up //verify that the asset location is not available text shows up