mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/mp/TestMissionAppStatusPage.java
@Test
    public void testCreateAndTestTestMission() throws InterruptedException, ExecutionException, TimeoutException
    {
        String start = MissionSetupHelper.createMissionAndLoadToController(m_Driver, "Mission 4", true, false);
        
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_MISSIONS);
        
        WebElement theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 4");
        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
        MissionHelper.executeTestOnMission(m_Driver, "Mission 4");
        
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("td[id='mLastResult']")));
        
        theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 4");
        assertThat(theMissionCard, notNullValue());
        
        WebElement lastTestResult = theMissionCard.findElement(By.cssSelector("td[id='mLastResult']"));
        assertThat(lastTestResult.getText(), is("PASSED"));
        
        //cancel mission
        MissionHelper.executeCancelOnMission(m_Driver, "Mission 4");
        
        //remove
        MissionHelper.executeRemoveOnMission(m_Driver, "Mission 4");
    }
/**
     * Creates a mission and verifies that it can be tested. Mission is then canceled and removed.
     */
Creates a mission and verifies that it can be tested. Mission is then canceled and removed.
Creates a mission and verifies that it can be tested . Mission is then canceled and removed .
@Test
    public void testCreateAndTestTestMission() throws InterruptedException, ExecutionException, TimeoutException
    {
        String start = MissionSetupHelper.createMissionAndLoadToController(m_Driver, "Mission 4", true, false);
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_MISSIONS);
        WebElement theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 4");
        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"));
        MissionHelper.executeTestOnMission(m_Driver, "Mission 4");
        WebDriverWait wait = new WebDriverWait(m_Driver, 10);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("td[id='mLastResult']")));
        theMissionCard = MissionHelper.findCorrectRunningMissionCard(m_Driver, "Mission 4");
        assertThat(theMissionCard, notNullValue());
        WebElement lastTestResult = theMissionCard.findElement(By.cssSelector("td[id='mLastResult']"));
        assertThat(lastTestResult.getText(), is("PASSED"));
        MissionHelper.executeCancelOnMission(m_Driver, "Mission 4");
        MissionHelper.executeRemoveOnMission(m_Driver, "Mission 4");
    }
@ Test public void testCreateAndTestTestMission ( ) throws InterruptedException , ExecutionException , TimeoutException { String start = MissionSetupHelper . createMissionAndLoadToController ( m_Driver , "Mission 4" , true , false ) ; NavigationHelper . navigateToPage ( m_Driver , NavigationButtonNameConstants . NAVBUT_PROP_MISSIONS ) ; WebElement theMissionCard = MissionHelper . findCorrectRunningMissionCard ( m_Driver , "Mission 4" ) ; 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" ) ) ; MissionHelper . executeTestOnMission ( m_Driver , "Mission 4" ) ; WebDriverWait wait = new WebDriverWait ( m_Driver , 10 ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "td[id='mLastResult']" ) ) ) ; theMissionCard = MissionHelper . findCorrectRunningMissionCard ( m_Driver , "Mission 4" ) ; assertThat ( theMissionCard , notNullValue ( ) ) ; WebElement lastTestResult = theMissionCard . findElement ( By . cssSelector ( "td[id='mLastResult']" ) ) ; assertThat ( lastTestResult . getText ( ) , is ( "PASSED" ) ) ; MissionHelper . executeCancelOnMission ( m_Driver , "Mission 4" ) ; MissionHelper . executeRemoveOnMission ( m_Driver , "Mission 4" ) ; }
Creates a mission and verifies that it can be tested.
Creates a mission and verifies that it can be tested .
//execute a test //cancel mission //remove