mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/observation/TestObservationFilters.java
@Test
    public void testFilterObservationsByFilterExpressionAndDate()
        throws TimeoutException, InterruptedException, ExecutionException
    {
        //setup mission
        final Calendar beforeTime = Calendar.getInstance();
        AssetHelper.assetCaptureData(m_Driver, ASSET_NAME, 3);
        final Calendar middleTime = Calendar.getInstance();
        
        LOG.log(Level.INFO, "Will look for observations between {0} and {1}", 
                new Object[] {TimeUtil.getFormattedTime(beforeTime), TimeUtil.getFormattedTime(middleTime)});
        
        //Thread sleep needed to ensure time difference between initial set of observations.
        Thread.sleep(5000);
        
        AssetHelper.assetCaptureData(m_Driver, ASSET_NAME, 2);
        
        AssetHelper.chooseAssetTab(m_Driver, AssetTabConstants.OBSERVATION_TAB);
        
        // navigate to asset page again to cause a refresh of the obs table
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_ASSETS);
        
        // ensure all 7 obs show up on the page before proceeding
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 5, 30);
        
        //enter dates
        ObservationFilterHelper.clickFilterByDateAndEnterDates(m_Driver, beforeTime, middleTime);
        ObservationFilterHelper.executeFiltering(m_Driver);
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 3, 10);
        
        //enter expression
        ObservationFilterHelper.clickFilterByExpressionAndEnterExpression(m_Driver, 
                "assetName!='testExampleAsset'");
        ObservationFilterHelper.executeFiltering(m_Driver);
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 0, 10);

        //view all obs again
        ObservationFilterHelper.clickFilterByExpressionCheckBox(m_Driver);
        ObservationFilterHelper.clickFilterByDateCheckBox(m_Driver);
        ObservationFilterHelper.executeFiltering(m_Driver);
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 5, 10);
    }
/**
     * Tests the observation tab's filter by string expression and date.
     * Verify that the filter displays the correct number of observations.
     */
Tests the observation tab's filter by string expression and date.
Verify that the filter displays the correct number of observations.
Tests the observation tab ' s filter by string expression and date . Verify that the filter displays the correct number of observations .
@Test
    public void testFilterObservationsByFilterExpressionAndDate()
        throws TimeoutException, InterruptedException, ExecutionException
    {
        final Calendar beforeTime = Calendar.getInstance();
        AssetHelper.assetCaptureData(m_Driver, ASSET_NAME, 3);
        final Calendar middleTime = Calendar.getInstance();
        LOG.log(Level.INFO, "Will look for observations between {0} and {1}", 
                new Object[] {TimeUtil.getFormattedTime(beforeTime), TimeUtil.getFormattedTime(middleTime)});
        Thread.sleep(5000);
        AssetHelper.assetCaptureData(m_Driver, ASSET_NAME, 2);
        AssetHelper.chooseAssetTab(m_Driver, AssetTabConstants.OBSERVATION_TAB);
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_ASSETS);
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 5, 30);
        ObservationFilterHelper.clickFilterByDateAndEnterDates(m_Driver, beforeTime, middleTime);
        ObservationFilterHelper.executeFiltering(m_Driver);
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 3, 10);
        ObservationFilterHelper.clickFilterByExpressionAndEnterExpression(m_Driver, 
                "assetName!='testExampleAsset'");
        ObservationFilterHelper.executeFiltering(m_Driver);
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 0, 10);
        ObservationFilterHelper.clickFilterByExpressionCheckBox(m_Driver);
        ObservationFilterHelper.clickFilterByDateCheckBox(m_Driver);
        ObservationFilterHelper.executeFiltering(m_Driver);
        ObservationFilterHelper.waitTillObsTableUpdates(m_Driver, 5, 10);
    }
@ Test public void testFilterObservationsByFilterExpressionAndDate ( ) throws TimeoutException , InterruptedException , ExecutionException { final Calendar beforeTime = Calendar . getInstance ( ) ; AssetHelper . assetCaptureData ( m_Driver , ASSET_NAME , 3 ) ; final Calendar middleTime = Calendar . getInstance ( ) ; LOG . log ( Level . INFO , "Will look for observations between {0} and {1}" , new Object [ ] { TimeUtil . getFormattedTime ( beforeTime ) , TimeUtil . getFormattedTime ( middleTime ) } ) ; Thread . sleep ( 5000 ) ; AssetHelper . assetCaptureData ( m_Driver , ASSET_NAME , 2 ) ; AssetHelper . chooseAssetTab ( m_Driver , AssetTabConstants . OBSERVATION_TAB ) ; NavigationHelper . navigateToPage ( m_Driver , NavigationButtonNameConstants . NAVBUT_PROP_ASSETS ) ; ObservationFilterHelper . waitTillObsTableUpdates ( m_Driver , 5 , 30 ) ; ObservationFilterHelper . clickFilterByDateAndEnterDates ( m_Driver , beforeTime , middleTime ) ; ObservationFilterHelper . executeFiltering ( m_Driver ) ; ObservationFilterHelper . waitTillObsTableUpdates ( m_Driver , 3 , 10 ) ; ObservationFilterHelper . clickFilterByExpressionAndEnterExpression ( m_Driver , "assetName!='testExampleAsset'" ) ; ObservationFilterHelper . executeFiltering ( m_Driver ) ; ObservationFilterHelper . waitTillObsTableUpdates ( m_Driver , 0 , 10 ) ; ObservationFilterHelper . clickFilterByExpressionCheckBox ( m_Driver ) ; ObservationFilterHelper . clickFilterByDateCheckBox ( m_Driver ) ; ObservationFilterHelper . executeFiltering ( m_Driver ) ; ObservationFilterHelper . waitTillObsTableUpdates ( m_Driver , 5 , 10 ) ; }
Tests the observation tab's filter by string expression and date.
Tests the observation tab ' s filter by string expression and date .
//setup mission //Thread sleep needed to ensure time difference between initial set of observations. // navigate to asset page again to cause a refresh of the obs table // ensure all 7 obs show up on the page before proceeding //enter dates //enter expression //view all obs again