mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/mp/TestAddMissionAppSetup.java
@Test
    public void testChooseMissionTab() throws InterruptedException
    {
        //Wait to assure the page has loaded.
        WebDriverWait wait = new WebDriverWait(m_Driver, 5);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//button[contains(@id, 'selectInfo')]")));
        
        //Retrieve the test mission.
        WebElement testMission = MissionSetupHelper.retrieveMissionByName(m_Driver, "test-mission");
        
        //Brings up the information dialog for the integration test mission.
        WebElement infoButton = testMission.findElement(By.cssSelector("span[class='ui-panel-title']")).findElement(
                By.tagName("button"));
        assertThat(infoButton, is(notNullValue()));
        infoButton.click();
        
        //Wait needed to insure the information dialog has opened.
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[contains(@id, 'infoBox')]")));
        
        //Select and click on the information dialog box.
        WebElement infoDialogBox = m_Driver.findElement(By.xpath("//div[contains(@id, 'infoBox')]"));
        assertThat(infoDialogBox, is(notNullValue()));
        infoDialogBox.click();
        
        //Verify that the mission name on the information dialog is appropriate.
        WebElement infoMissionName = m_Driver.findElement(By.xpath("//div[contains(@id, 'mInfo')]")).findElement(
                By.tagName("span"));
        assertThat(infoMissionName.getText(), is("test-mission"));
        
        //Gets a list of all parameters displayed on the information dialog.
        List<WebElement> infoParameters = m_Driver.findElement(
                By.cssSelector("ul[class='ui-datalist-data']")).findElements(By.tagName("li"));
        assertThat(infoParameters.size(), is(4));
        
        //Verify the first parameter displayed on the information dialog.
        WebElement parameter = infoParameters.get(0).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testInt"));
        
        //Verify the second parameter displayed on the information dialog.
        parameter = infoParameters.get(1).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testDouble"));
        
        //Verify the third parameter displayed on the information dialog.
        parameter = infoParameters.get(2).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testString"));
        
        //Verify the fourth parameter displayed on the information dialog.
        parameter = infoParameters.get(3).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testDropDown"));
        
        //Select and click the close button for information dialog box.
        WebElement closeDialogButton = infoDialogBox.findElement(
                By.cssSelector("a[class='ui-dialog-titlebar-icon ui-dialog-titlebar-close ui-corner-all']"));
        assertThat(closeDialogButton, is(notNullValue()));
        closeDialogButton.click();
        
        //Select and click the select mission button to proceed to the parameters tab.
        WebElement selectMissionButton = testMission.findElement(
                By.cssSelector("div[class='ui-panel-content ui-widget-content']")).findElement(By.tagName("button"));
        assertThat(selectMissionButton, is(notNullValue()));
        selectMissionButton.click();
    }
/**
     * Tests the mission selection tab on the mission setup page. 
     * Verify that the test mission shows up, the information dialog box appears with appropriate information, and that 
     * a mission can be selected. 
     */
Tests the mission selection tab on the mission setup page.
Verify that the test mission shows up, the information dialog box appears with appropriate information, and that
a mission can be selected.
Tests the mission selection tab on the mission setup page . Verify that the test mission shows up the information dialog box appears with appropriate information and that a mission can be selected .
@Test
    public void testChooseMissionTab() throws InterruptedException
    {
        WebDriverWait wait = new WebDriverWait(m_Driver, 5);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//button[contains(@id, 'selectInfo')]")));
        WebElement testMission = MissionSetupHelper.retrieveMissionByName(m_Driver, "test-mission");
        WebElement infoButton = testMission.findElement(By.cssSelector("span[class='ui-panel-title']")).findElement(
                By.tagName("button"));
        assertThat(infoButton, is(notNullValue()));
        infoButton.click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[contains(@id, 'infoBox')]")));
        WebElement infoDialogBox = m_Driver.findElement(By.xpath("//div[contains(@id, 'infoBox')]"));
        assertThat(infoDialogBox, is(notNullValue()));
        infoDialogBox.click();
        WebElement infoMissionName = m_Driver.findElement(By.xpath("//div[contains(@id, 'mInfo')]")).findElement(
                By.tagName("span"));
        assertThat(infoMissionName.getText(), is("test-mission"));
        List<WebElement> infoParameters = m_Driver.findElement(
                By.cssSelector("ul[class='ui-datalist-data']")).findElements(By.tagName("li"));
        assertThat(infoParameters.size(), is(4));
        WebElement parameter = infoParameters.get(0).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testInt"));
        parameter = infoParameters.get(1).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testDouble"));
        parameter = infoParameters.get(2).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testString"));
        parameter = infoParameters.get(3).findElement(By.tagName("span"));
        assertThat(parameter.getText(), is("testDropDown"));
        WebElement closeDialogButton = infoDialogBox.findElement(
                By.cssSelector("a[class='ui-dialog-titlebar-icon ui-dialog-titlebar-close ui-corner-all']"));
        assertThat(closeDialogButton, is(notNullValue()));
        closeDialogButton.click();
        WebElement selectMissionButton = testMission.findElement(
                By.cssSelector("div[class='ui-panel-content ui-widget-content']")).findElement(By.tagName("button"));
        assertThat(selectMissionButton, is(notNullValue()));
        selectMissionButton.click();
    }
@ Test public void testChooseMissionTab ( ) throws InterruptedException { WebDriverWait wait = new WebDriverWait ( m_Driver , 5 ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . xpath ( "//button[contains(@id, 'selectInfo')]" ) ) ) ; WebElement testMission = MissionSetupHelper . retrieveMissionByName ( m_Driver , "test-mission" ) ; WebElement infoButton = testMission . findElement ( By . cssSelector ( "span[class='ui-panel-title']" ) ) . findElement ( By . tagName ( "button" ) ) ; assertThat ( infoButton , is ( notNullValue ( ) ) ) ; infoButton . click ( ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . xpath ( "//div[contains(@id, 'infoBox')]" ) ) ) ; WebElement infoDialogBox = m_Driver . findElement ( By . xpath ( "//div[contains(@id, 'infoBox')]" ) ) ; assertThat ( infoDialogBox , is ( notNullValue ( ) ) ) ; infoDialogBox . click ( ) ; WebElement infoMissionName = m_Driver . findElement ( By . xpath ( "//div[contains(@id, 'mInfo')]" ) ) . findElement ( By . tagName ( "span" ) ) ; assertThat ( infoMissionName . getText ( ) , is ( "test-mission" ) ) ; List < WebElement > infoParameters = m_Driver . findElement ( By . cssSelector ( "ul[class='ui-datalist-data']" ) ) . findElements ( By . tagName ( "li" ) ) ; assertThat ( infoParameters . size ( ) , is ( 4 ) ) ; WebElement parameter = infoParameters . get ( 0 ) . findElement ( By . tagName ( "span" ) ) ; assertThat ( parameter . getText ( ) , is ( "testInt" ) ) ; parameter = infoParameters . get ( 1 ) . findElement ( By . tagName ( "span" ) ) ; assertThat ( parameter . getText ( ) , is ( "testDouble" ) ) ; parameter = infoParameters . get ( 2 ) . findElement ( By . tagName ( "span" ) ) ; assertThat ( parameter . getText ( ) , is ( "testString" ) ) ; parameter = infoParameters . get ( 3 ) . findElement ( By . tagName ( "span" ) ) ; assertThat ( parameter . getText ( ) , is ( "testDropDown" ) ) ; WebElement closeDialogButton = infoDialogBox . findElement ( By . cssSelector ( "a[class='ui-dialog-titlebar-icon ui-dialog-titlebar-close ui-corner-all']" ) ) ; assertThat ( closeDialogButton , is ( notNullValue ( ) ) ) ; closeDialogButton . click ( ) ; WebElement selectMissionButton = testMission . findElement ( By . cssSelector ( "div[class='ui-panel-content ui-widget-content']" ) ) . findElement ( By . tagName ( "button" ) ) ; assertThat ( selectMissionButton , is ( notNullValue ( ) ) ) ; selectMissionButton . click ( ) ; }
Tests the mission selection tab on the mission setup page.
Tests the mission selection tab on the mission setup page .
//Wait to assure the page has loaded. //Retrieve the test mission. //Brings up the information dialog for the integration test mission. //Wait needed to insure the information dialog has opened. //Select and click on the information dialog box. //Verify that the mission name on the information dialog is appropriate. //Gets a list of all parameters displayed on the information dialog. //Verify the first parameter displayed on the information dialog. //Verify the second parameter displayed on the information dialog. //Verify the third parameter displayed on the information dialog. //Verify the fourth parameter displayed on the information dialog. //Select and click the close button for information dialog box. //Select and click the select mission button to proceed to the parameters tab.