mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/mp/TestMissionAppStatusPage.java
@Test
    public void testCreateAndCancelTestMission() throws 
        InterruptedException, ExecutionException, TimeoutException
    {
        String start = MissionSetupHelper.createMissionAndLoadToController(m_Driver, "Mission 3", true, false);
        
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_MISSIONS);
        
        WebElement theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 3");
        assertThat(theMissionCard, notNullValue());
        
        verifyCommonHeaders(theMissionCard, "SCHEDULED", "test-mission");
        
        WebElement startTime = theMissionCard.findElement(By.cssSelector("span[id*='mStartTime']"));
        assertThat(startTime, notNullValue());
        assertThat(startTime.getText(), is(start + "Z"));
        
        //execute a test
        WebElement testButton = theMissionCard.findElement(By.cssSelector("button[id*='testButton']"));
        assertThat(testButton, notNullValue());
        
        //execute mission
        WebElement executeButton = theMissionCard.findElement(By.cssSelector("button[id*='execButton']"));
        assertThat(executeButton, notNullValue());
        
        //cancel mission
        WebElement cancelButton = theMissionCard.findElement(By.cssSelector("button[id*='cancelButton']"));
        assertThat(cancelButton, notNullValue());
        
        //cancel the mission
        MissionHelper.executeCancelOnMission(m_Driver, "Mission 3");
        
        theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 3");
        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("CANCELED"));
        
        //remove 
        MissionHelper.executeRemoveOnMission(m_Driver, "Mission 3");
    }
/**
     * Creates a timed mission and then cancels it. Removes the mission at the end.
     */
Creates a timed mission and then cancels it. Removes the mission at the end.
Creates a timed mission and then cancels it . Removes the mission at the end .
@Test
    public void testCreateAndCancelTestMission() throws 
        InterruptedException, ExecutionException, TimeoutException
    {
        String start = MissionSetupHelper.createMissionAndLoadToController(m_Driver, "Mission 3", true, false);
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_MISSIONS);
        WebElement theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 3");
        assertThat(theMissionCard, notNullValue());
        verifyCommonHeaders(theMissionCard, "SCHEDULED", "test-mission");
        WebElement startTime = theMissionCard.findElement(By.cssSelector("span[id*='mStartTime']"));
        assertThat(startTime, notNullValue());
        assertThat(startTime.getText(), is(start + "Z"));
        WebElement testButton = theMissionCard.findElement(By.cssSelector("button[id*='testButton']"));
        assertThat(testButton, notNullValue());
        WebElement executeButton = theMissionCard.findElement(By.cssSelector("button[id*='execButton']"));
        assertThat(executeButton, notNullValue());
        WebElement cancelButton = theMissionCard.findElement(By.cssSelector("button[id*='cancelButton']"));
        assertThat(cancelButton, notNullValue());
        MissionHelper.executeCancelOnMission(m_Driver, "Mission 3");
        theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 3");
        assertThat(theMissionCard, notNullValue());
        WebElement status2 = theMissionCard.findElement(By.cssSelector("td[id*='mStatus']"));
        assertThat(status2, notNullValue());
        assertThat(status2.getText(), is("CANCELED"));
        MissionHelper.executeRemoveOnMission(m_Driver, "Mission 3");
    }
@ Test public void testCreateAndCancelTestMission ( ) throws InterruptedException , ExecutionException , TimeoutException { String start = MissionSetupHelper . createMissionAndLoadToController ( m_Driver , "Mission 3" , true , false ) ; NavigationHelper . navigateToPage ( m_Driver , NavigationButtonNameConstants . NAVBUT_PROP_MISSIONS ) ; WebElement theMissionCard = MissionHelper . findCorrectRunningMissionCard ( m_Driver , "Mission 3" ) ; assertThat ( theMissionCard , notNullValue ( ) ) ; verifyCommonHeaders ( theMissionCard , "SCHEDULED" , "test-mission" ) ; WebElement startTime = theMissionCard . findElement ( By . cssSelector ( "span[id*='mStartTime']" ) ) ; assertThat ( startTime , notNullValue ( ) ) ; assertThat ( startTime . getText ( ) , is ( start + "Z" ) ) ; WebElement testButton = theMissionCard . findElement ( By . cssSelector ( "button[id*='testButton']" ) ) ; assertThat ( testButton , notNullValue ( ) ) ; WebElement executeButton = theMissionCard . findElement ( By . cssSelector ( "button[id*='execButton']" ) ) ; assertThat ( executeButton , notNullValue ( ) ) ; WebElement cancelButton = theMissionCard . findElement ( By . cssSelector ( "button[id*='cancelButton']" ) ) ; assertThat ( cancelButton , notNullValue ( ) ) ; MissionHelper . executeCancelOnMission ( m_Driver , "Mission 3" ) ; theMissionCard = MissionHelper . findCorrectRunningMissionCard ( m_Driver , "Mission 3" ) ; assertThat ( theMissionCard , notNullValue ( ) ) ; WebElement status2 = theMissionCard . findElement ( By . cssSelector ( "td[id*='mStatus']" ) ) ; assertThat ( status2 , notNullValue ( ) ) ; assertThat ( status2 . getText ( ) , is ( "CANCELED" ) ) ; MissionHelper . executeRemoveOnMission ( m_Driver , "Mission 3" ) ; }
Creates a timed mission and then cancels it.
Creates a timed mission and then cancels it .
//execute a test //execute mission //cancel mission //cancel the mission //verify mission state is shutdown and click shutdown button //remove 