Exemplo n.º 1
0
        public void RaftEnabledPassedToSliceEngine()
        {
            // Run a copy of MatterControl
            Action <AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
            {
                AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
                {
                    MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);

                    //Navigate to Local Library
                    testRunner.ClickByName("Library Tab");
                    MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection");
                    testRunner.Wait(1);
                    testRunner.ClickByName("Row Item Calibration - Box");
                    testRunner.ClickByName("Row Item Calibration - Box Print Button");
                    testRunner.Wait(1);

                    testRunner.ClickByName("Layer View Tab");

                    testRunner.ClickByName("Bread Crumb Button Home");
                    testRunner.Wait(1);
                    testRunner.ClickByName("SettingsAndControls");
                    testRunner.Wait(1);
                    testRunner.ClickByName("User Level Dropdown");
                    testRunner.Wait(1);
                    testRunner.ClickByName("Advanced Menu Item");
                    testRunner.Wait(1);
                    testRunner.ClickByName("Skirt and Raft Tab");
                    testRunner.Wait(1);

                    testRunner.ClickByName("Create Raft Checkbox");
                    testRunner.Wait(1.5);
                    testRunner.ClickByName("Save Slice Settings Button");
                    testRunner.ClickByName("Generate Gcode Button");
                    testRunner.Wait(5);

                    //Call compare slice settings methode here
                    resultsHarness.AddTestResult(MatterControlUtilities.CompareExpectedSliceSettingValueWithActualVaue("enableRaft", "True"));


                    MatterControlUtilities.CloseMatterControl(testRunner);
                }
            };

            AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

            Assert.IsTrue(testHarness.AllTestsPassed);
            Assert.IsTrue(testHarness.TestCount == 1);             // make sure we ran all our tests
        }