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 org.assertj.swing.data.TableCell;
import navaid.Iterators.Widgets.FrameIteratorScattererVOR;
import OUNPPMTest.SwingElements.Finder.TableCellFinders;
import navaid.Iterators.Widgets.FrameIteratorScattererXYZAngle;
import navaid.Iterators.Widgets.IterationFileViewer;
import static OUNPPMTest.Testers.Directory.containsDirectoryWithJustCreatedByName;
public class NAVAIDView_LocalizerUserPropertiesTab_272SelectInvertYAxes_Test extends SwingJUnitTestCase{
	@Override
	protected void prepare(){
		application(NAVAIDApp.class).withArgs(new String[]{"SINGLE_THREAD_MODE"}).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("jMnuNewLocalizer").click();
		windowFrame.tabbedPane("jTabs").selectTab("Localizer Model");
		windowFrame.comboBox("jCboArrayType").selectItem("WI14-10");
		windowFrame.comboBox("jCboFreq").selectItem("109.7");
		windowFrame.textBox("jtxtFrequencyCL").enterText("109.696 MHz");
		windowFrame.textBox("jtxtRwyHeading").enterText("298.0 deg");
		windowFrame.textBox("jtxtRwyLen").enterText("10000.0 ft");
		windowFrame.textBox("jtxtRwyWidth").enterText("150.0 ft");
		windowFrame.textBox("jtxtILSPtC").enterText("1000.0 ft");
		windowFrame.comboBox("jCboElementTypeCO").selectItem("LPD");
		windowFrame.textBox("jtxtAntSetbackCO").enterText("1000.0 ft");
		windowFrame.textBox("jtxtMainOffsetCO").enterText("0 ft");
		windowFrame.textBox("jtxtMainHeightCO").enterText("5.57 ft");
		windowFrame.textBox("jtxtArrayRotCO").enterText("0.0 deg");
		windowFrame.textBox("jtxtAntennaRotCO").enterText("0.0 deg");
		windowFrame.textBox("jtxtAntennaElevationCO").enterText("0.0 ft");
		windowFrame.textBox("jtxtLocClrWidth").enterText("2.2 deg");
		windowFrame.textBox("jtxtLocClrCrsSeparation").enterText("-17.0 dB");
		windowFrame.comboBox("jComboBoxFields").selectItem("Automatic");
		windowFrame.tabbedPane("jTabs").selectTab("Scatterers");
		windowFrame.button("jButOpenScattererGroup").click();
		TargetFileChooserAtFile(windowFrame, "A380.PSC", "para", false);
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCell.row(0).column(windowFrame.table("jTableScatGrpED").columnIndexFor("X Offset (ft)"))).enterValue("-5000");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCell.row(0).column(windowFrame.table("jTableScatGrpED").columnIndexFor("Y Offset (ft)"))).enterValue("900");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCell.row(0).column(windowFrame.table("jTableScatGrpED").columnIndexFor("Z Offset (ft)"))).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCell.row(0).column(windowFrame.table("jTableScatGrpED").columnIndexFor("Angle(deg)"))).enterValue("0");
		this.setDefaultDelayBetweenEvents();
		windowFrame.tabbedPane("jTabs").selectTab("Flight Editor");
		windowFrame.comboBox("jCboFlightType").selectItem("ILS 3 / Approach");
		windowFrame.comboBox("jCboCourseApproach").selectItem("Front Course");
		windowFrame.textBox("jtxtFPILS3RngAtStart").enterText("24304.0 ft");
		windowFrame.textBox("jtxtFPILS3RngAtStop").enterText("-10000.0 ft");
		windowFrame.textBox("jtxtFPILS3LinearIncrement").enterText("50.0 ft");
		windowFrame.textBox("jtxtFPILS3AzimuthAngle").enterText("0.0 deg");
		windowFrame.textBox("jtxtFPILS3RngAtIntercept").enterText("24304.0 ft");
		windowFrame.textBox("jtxtFPILS3AltAtThresh").enterText("55.0 ft");
		windowFrame.textBox("jtxtFPILS3MinAlt").enterText("20.0 ft");
		windowFrame.textBox("jtxtFPILS3Velocity").enterText("118.5 knots");
		windowFrame.tabbedPane("jTabs").selectTab("Traces");
		windowFrame.list("jListTraceList").selectItem(0);
		windowFrame.radioButton("jRadioButtonAnalysisFAA").click();
		windowFrame.tabbedPane("jTabs").selectTab("User Properties");
	}
	@Test
	public void test272SelectInvertYAxes(){
		windowFrame.checkBox("jCheckBoxHideZonesInPlots").click();
		windowFrame.checkBox("jCheckBoxHideTolerencesInPlots").click();
		windowFrame.checkBox("jCheckBoxHideAnalysisBox").click();
		windowFrame.checkBox("jCheckBoxInvertYAxes").click();
		windowFrame.button("jButSaveModel").click();
		TargetFileChooserAtFile(windowFrame, "1997.272SelectInvertYAxes.dat", true);
		windowFrame.button("jButRunSimulation").click();
	}
}
