mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/mp/TestMissionAppStatusPage.java
@Test
    public void testCreateAndExecuteImmediateTestMission() throws 
        InterruptedException, ExecutionException, TimeoutException
    {
        MissionSetupHelper.createMissionAndLoadToController(m_Driver, "Mission 1", false, false);
        
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_MISSIONS);
        
        WebElement theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 1");
        assertThat(theMissionCard, notNullValue());
        
        verifyCommonHeaders(theMissionCard, "RUNNING", "test-mission");
        
        //since only default times are used should be showing Stop: Indefinite
        WebElement stopIndef = theMissionCard.findElement(By.cssSelector("td[id*='mStopIndefinite']"));
        
        assertThat(stopIndef, notNullValue());
        assertThat(stopIndef.getText(), is("Indefinite"));
        
        //verify button stop is showing
        MissionHelper.executeStopOnMission(m_Driver, "Mission 1");
        
        //need to regrab the mission card since it has been updated
        theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 1");
        assertThat(theMissionCard, notNullValue());
        
        //verify mission state is shutdown and click shutdown button
        WebElement status2 = theMissionCard.findElement(By.cssSelector("td[id*='mStatus']"));
        
        assertThat(status2, notNullValue());
        assertThat(status2.getText(), is("SHUTDOWN"));
        
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("button[id*='removeButton']")));
       
        //remove the mission
        MissionHelper.executeRemoveOnMission(m_Driver, "Mission 1");
    }
/**
     * Creates a mission with no time interval and verifies that it executes immediately.
     * Removes the mission at the end.
     */
Creates a mission with no time interval and verifies that it executes immediately.
Removes the mission at the end.
Creates a mission with no time interval and verifies that it executes immediately . Removes the mission at the end .
@Test
    public void testCreateAndExecuteImmediateTestMission() throws 
        InterruptedException, ExecutionException, TimeoutException
    {
        MissionSetupHelper.createMissionAndLoadToController(m_Driver, "Mission 1", false, false);
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_MISSIONS);
        WebElement theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 1");
        assertThat(theMissionCard, notNullValue());
        verifyCommonHeaders(theMissionCard, "RUNNING", "test-mission");
        WebElement stopIndef = theMissionCard.findElement(By.cssSelector("td[id*='mStopIndefinite']"));
        assertThat(stopIndef, notNullValue());
        assertThat(stopIndef.getText(), is("Indefinite"));
        MissionHelper.executeStopOnMission(m_Driver, "Mission 1");
        theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 1");
        assertThat(theMissionCard, notNullValue());
        WebElement status2 = theMissionCard.findElement(By.cssSelector("td[id*='mStatus']"));
        assertThat(status2, notNullValue());
        assertThat(status2.getText(), is("SHUTDOWN"));
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("button[id*='removeButton']")));
        MissionHelper.executeRemoveOnMission(m_Driver, "Mission 1");
    }
@ Test public void testCreateAndExecuteImmediateTestMission ( ) throws InterruptedException , ExecutionException , TimeoutException { MissionSetupHelper . createMissionAndLoadToController ( m_Driver , "Mission 1" , false , false ) ; NavigationHelper . navigateToPage ( m_Driver , NavigationButtonNameConstants . NAVBUT_PROP_MISSIONS ) ; WebElement theMissionCard = MissionHelper . findCorrectRunningMissionCard ( m_Driver , "Mission 1" ) ; assertThat ( theMissionCard , notNullValue ( ) ) ; verifyCommonHeaders ( theMissionCard , "RUNNING" , "test-mission" ) ; WebElement stopIndef = theMissionCard . findElement ( By . cssSelector ( "td[id*='mStopIndefinite']" ) ) ; assertThat ( stopIndef , notNullValue ( ) ) ; assertThat ( stopIndef . getText ( ) , is ( "Indefinite" ) ) ; MissionHelper . executeStopOnMission ( m_Driver , "Mission 1" ) ; theMissionCard = MissionHelper . findCorrectRunningMissionCard ( m_Driver , "Mission 1" ) ; assertThat ( theMissionCard , notNullValue ( ) ) ; WebElement status2 = theMissionCard . findElement ( By . cssSelector ( "td[id*='mStatus']" ) ) ; assertThat ( status2 , notNullValue ( ) ) ; assertThat ( status2 . getText ( ) , is ( "SHUTDOWN" ) ) ; WebDriverWait wait = new WebDriverWait ( m_Driver , 10 ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "button[id*='removeButton']" ) ) ) ; MissionHelper . executeRemoveOnMission ( m_Driver , "Mission 1" ) ; }
Creates a mission with no time interval and verifies that it executes immediately.
Creates a mission with no time interval and verifies that it executes immediately .
//since only default times are used should be showing Stop: Indefinite //verify button stop is showing //need to regrab the mission card since it has been updated //verify mission state is shutdown and click shutdown button //remove the mission