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;
public class NAVAIDView_VORMagVarRadials_TrueNorthRadial0_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("jMnuNewVOR").click();
		windowFrame.tabbedPane("jTabs").selectTab("Scatterers");
		windowFrame.button("jButOpenScattererGroup").click();
		TargetFileChooserAtFile(windowFrame, "A380_VOR.PSC", "para", false);
		this.robot().settings().delayBetweenEvents(10);
		windowFrame.table("jTableScatGrpED").cell(TableCell.row(0).column(windowFrame.table("jTableScatGrpED").columnIndexFor("E Offset (ft)"))).enterValue("1000");
		this.setDefaultDelayBetweenEvents();
		windowFrame.tabbedPane("jTabs").selectTab("Traces");
		windowFrame.radioButton("jRadioButtonRadial").click();
		windowFrame.tabbedPane("jTabs").selectTab("VOR Model");
	}
	@Test
	public void testTrueNorthRadial0(){
		windowFrame.tabbedPane("jTabs").selectTab("Flight Editor");
		windowFrame.button("jButFPVORRemoveAllFlights").click();
		windowFrame.button("jButFPVORAddFlight").click();
		windowFrame.comboBox("jcboFPVORFlightProfileType").selectItem("Radial");
		windowFrame.textBox("jtxtFPVORRadialRadial").enterText("270");
		windowFrame.radioButton("jRadioButtonVORFlightTrueNorth").click();
		windowFrame.tabbedPane("jTabs").selectTab("VOR Model");
		windowFrame.textBox("jtxtVORMagneticVariation").enterText("0");
		windowFrame.button("jButSaveModel").click();
		TargetFileChooserAtFile(windowFrame, "1997.TrueNorthRadia0.dat", true);
		windowFrame.button("jButRunSimulation").click();
	}
}
