package navaid;
import OUNPPMTest.TestFramework.*;
import org.junit.Test;
import javax.swing.JFrame;
import static org.assertj.swing.launcher.ApplicationLauncher.application;
import static OUNPPMTest.SwingElements.Finder.JMWindowFinder.findFrame;
import OUNPPMTest.SwingElements.Matcher.FrameMatchers;
import java.io.File;
import OUNPPMTest.SwingElements.Matcher.ButtonMatchers;
import OUNPPMTest.SwingElements.Matcher.DialogMatchers;
import static OUNPPMTest.TestFramework.OperatorHelpers.TargetFileChooserAtFile;
import OUNPPMTest.SwingElements.Finder.TableCellFinders;
import org.assertj.swing.data.TableCell;
public class NAVAIDView_GlideSlope_ScatterersTab_321delete777200_Test extends SwingJUnitTestCase{
	@Override
	protected void prepare(){
		application(NAVAIDApp.class).withArgs(new String[]{"SINGLE_THREAD_MODE","DISABLE_EULA_WINDOW_OVERRIDE","DISABLE_AUTO_UPDATE_WINDOW_OVERRIDE","DISABLE_EULA_WINDOW_OVERRIDE","DISABLE_AUTO_UPDATE_WINDOW_OVERRIDE"}).start();
		windowFrame = findFrame(FrameMatchers.containsTitle("OU Navaids Performance Prediction Model,")).withTimeout(10000).using(robot());
		windowFrame.focus();
		windowFrame.menuItem("fileMenu").click();
		windowFrame.menuItem("jNewModel").click();
		windowFrame.menuItem("jMnuNewGlideSlope").click();
		windowFrame.tabbedPane("jTabs").selectTab("Scatterers");
		windowFrame.button("jButOpenScattererGroup").click();
		TargetFileChooserAtFile(windowFrame, "A380.PSC", "para", false);
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(0, "^X Offset")).enterValue("-500");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(0, "^Y Offset")).enterValue("450");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(0, "^Z Offset")).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(0, "^Angle")).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		windowFrame.button("jButOpenScattererGroup").click();
		TargetFileChooserAtFile(windowFrame, "747.psc", "para", false);
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(1, "^X Offset")).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(1, "^Y Offset")).enterValue("400");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(1, "^Z Offset")).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(1, "^Angle")).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		windowFrame.button("jButOpenScattererGroup").click();
		TargetFileChooserAtFile(windowFrame, "777-200.psc", "para", false);
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(2, "^X Offset")).enterValue("-200");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(2, "^Y Offset")).enterValue("-300");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(2, "^Z Offset")).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(2, "^Angle")).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		windowFrame.tabbedPane("jTabs").selectTab("GlideSlope");
		windowFrame.comboBox("jCboArrayTypeCOGS").selectItem("CAPT_EFF");
		windowFrame.comboBox("jCboFreqGS").selectItem("333.2");
		windowFrame.textBox("jtxtFrequencyCLGS").enterText("333.196");
		windowFrame.comboBox("jCboElementTypeGS").selectItem("FA-8976");
		windowFrame.textBox("jtxtAntSetbackCOGS").enterText("1000");
		windowFrame.textBox("jtxtMainOffsetCOGS").enterText("280");
		windowFrame.textBox("jtxtArrayRotCOGS").enterText("0.0");
		windowFrame.textBox("jtxtGSClrWidth").enterText("0.7");
		windowFrame.textBox("jtxtGSClrCrsSeparation").enterText("1.0");
		windowFrame.comboBox("jComboBox2").selectItem("Automatic");
		windowFrame.checkBox("jChkDUErrorGS").uncheck();
		windowFrame.textBox("jtxtGSGlidePathAngle").enterText("3.0");
		windowFrame.textBox("jtxtGSAntennaHeightRatio").enterText("2.0");
		windowFrame.checkBox("jCheckBoxAutoUpdatePosition").check();
		windowFrame.tabbedPane("jTabs").selectTab("Flight Editor");
		windowFrame.comboBox("jCboFlightType").selectItem("ILS 3 / Approach");
		windowFrame.comboBox("jCboCourseApproach").selectItem("Front Course");
		windowFrame.textBox("jtxtFPILS3RngAtStart").enterText("24304");
		windowFrame.textBox("jtxtFPILS3RngAtStop").enterText("-10000");
		windowFrame.textBox("jtxtFPILS3LinearIncrement").enterText("50");
		windowFrame.textBox("jtxtFPILS3AzimuthAngle").enterText("0.0");
		windowFrame.textBox("jtxtFPILS3RngAtIntercept").enterText("24304");
		windowFrame.textBox("jtxtFPILS3AltAtThresh").enterText("55");
		windowFrame.textBox("jtxtFPILS3MinAlt").enterText("20");
		windowFrame.textBox("jtxtFPILS3Velocity").enterText("118.5");
		windowFrame.tabbedPane("jTabs").selectTab("Traces");
		windowFrame.tabbedPane("jTabs").selectTab("Scatterers");
	}
	@Test
	public void test321delete777200(){
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCellFinders.colTitleRegex(1, "In Use")).unckeck();
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCell.row(2).column(windowFrame.table("jTableScatGrpED").columnIndexFor("Type"))).click();
		this.setDefaultDelayBetweenEvents();
		windowFrame.button("jButRemoveScattererGroup").click();
		windowFrame.button("jButSaveModel").click();
		TargetFileChooserAtFile(windowFrame, "1996.321delete777200.dat", true);
		windowFrame.button("jButRunSimulation").click();
	}
}
