Ejemplo n.º 1
0
        public void NewPartOrderAndDeleteTest()
        {
            Act(() =>
            {
                var parts = HomeZone.GotoParts();
                parts.Toolbar.New();
                parts.SingleDetail.Id         = "TestPart";
                parts.SingleDetail.Name.Value = "TestPart";
                parts.Toolbar.Save();

                var partOrders = HomeZone.GotoPartOrders();
                var toolbar    = partOrders.Toolbar;

                toolbar.New();

                //TODO complete test
                Assert.IsFalse(toolbar.CanSave);

                partOrders.BaseInfo.ID.Value = "TestOrder";
                partOrders.PartInfo.SelectPart("TestPart");
                partOrders.Toolbar.Save();

                partOrders.ResultColumn.SelectItem("TestOrder");

                Assert.IsTrue(toolbar.CanDelete);
                toolbar.Delete();
                Assert.IsFalse(toolbar.CanDelete);

                parts = HomeZone.GotoParts();
                parts.ResultColumn.SelectItem("TestPart");
                parts.Toolbar.Delete();
            });
        }
        public void CreateTestPartOrders()
        {
            Log.OpenFolder("CreateTestPartOrders");

            var partOrders = HomeZone.GotoPartOrders();

            partOrders.Toolbar.New();
            //TODO
            partOrders.Toolbar.Delete();

            Log.CloseFolder();
        }
Ejemplo n.º 3
0
        public void ImportPartOrderTest()
        {
            var partOrders = HomeZone.GotoPartOrders();

            partOrders.Toolbar.Import(@"c:\Users\Public\Documents\TRUMPF\TruTops\Samples\Showcase\Demoteil.geo");
            partOrders.WaitForDetailOverlayAppear();
            partOrders.WaitForDetailOverlayDisappear();

            partOrders.PartInfo.Design.Boost();
            partOrders.WaitForDetailOverlayAppear();
            partOrders.WaitForDetailOverlayDisappear();
        }
Ejemplo n.º 4
0
        public void SelectPartIntoOrderTest()
        {
            var parts = HomeZone.GotoParts();

            parts.Toolbar.New();
            parts.SingleDetail.Id         = "TestPart";
            parts.SingleDetail.Name.Value = "TestPart";
            parts.Toolbar.Save();

            var partOrders = HomeZone.GotoPartOrders();

            partOrders.Toolbar.New();
            partOrders.PartInfo.SelectPart("TestPart");

            Assert.IsTrue(partOrders.Toolbar.CanSave);
        }
Ejemplo n.º 5
0
        public void OrdersTableTest()
        {
            const string PartName     = "UiT_Demoteil";
            const string OrderName    = "UiT_OR_OrdersTable";
            const string NestingName  = "UiT_N_OrdersTable";
            const string CustomerName = "UiT_OrdersTableTest";
            var          FinishDate   = new DateTime(2018, 7, 31);

            Act(() =>
            {
                var parts = HomeZone.GotoParts();
                parts.Toolbar.Import(@"c:\Users\Public\Documents\TRUMPF\TruTops\Samples\Showcase\Demoteil.geo");
                parts.SingleDetail.Name.Value = PartName;
                parts.SingleDetail.Id         = PartName;
                parts.SingleDetail.Note.Value = "Noote";

                var customerAdmin = parts.SingleDetail.OpenCustomerAdministration();
                if (customerAdmin.Count() == 1 && customerAdmin.Name.Value == string.Empty)
                {
                    customerAdmin.Name.Value = CustomerName;
                    customerAdmin.Apply();
                    customerAdmin.Select();
                }
                else if (!customerAdmin.SelectCustomer(CustomerName))
                {
                    customerAdmin.NewCustomer(CustomerName, "", "", "", "", "", "");
                    customerAdmin.Apply();
                    customerAdmin.Select();
                }
                else
                {
                    customerAdmin.Select();
                }

                parts.Toolbar.Save();

                var partOrders = HomeZone.GotoPartOrders();
                partOrders.Toolbar.New();
                partOrders.BaseInfo.ID.Value         = OrderName;
                partOrders.BaseInfo.FinishDate.Value = FinishDate;
                partOrders.PartInfo.SelectPart(PartName);
                partOrders.Toolbar.Save();

                var nestings = HomeZone.GotoCutJobs();
                nestings.Toolbar.New();
                nestings.BaseInfo.Id.Value = NestingName;
                nestings.ContainedOrders.AddPartOrder(OrderName);
                nestings.Toolbar.Save();

                var row = nestings.ContainedOrders.GetRow(0);

                Assert.IsNotNull(row.DrawingButton);
                Assert.AreEqual($"{PartName} ({PartName})", row.PartLink.Label);
                Assert.AreEqual(0, row.Pending);
                Assert.AreEqual(1, row.Total);
                Assert.AreEqual(OrderName, row.OrderLink.Label);
                Assert.AreEqual(CustomerName, row.Customer);
                Assert.AreEqual(StripTime(FinishDate), StripTime(row.TargetDate.Value));
                Assert.AreEqual("Reprocessing", row.CuttingProgram);
                Assert.IsTrue(row.AngularPositions.Contains("0"));
                Assert.AreEqual("Grid machining", row.DistanceMode);
                Assert.IsFalse(row.IgnoreProcessings.Value);
                Assert.AreEqual(0, row.SamplePartsCount);
                Assert.AreEqual("Noote", row.Note);

                row.DrawingButton.Click();
                Thread.Sleep(5000);

                Assert.IsTrue(parts.IsVisible);

                HomeZone.GotoCutJobs();
                nestings.ResultColumn.SelectItem(NestingName);
                nestings.Toolbar.Delete();

                HomeZone.GotoPartOrders();
                partOrders.ResultColumn.SelectItem(OrderName);
                partOrders.Toolbar.Delete();

                HomeZone.GotoParts();
                parts.ResultColumn.SelectItem(PartName);
                parts.Toolbar.Delete();
            });
        }
Ejemplo n.º 6
0
        public void BulkChangeTest()
        {
            var name    = TestSettings.NamePrefix + "BulkChangeTest";
            var machine = "TruBend 5320 (6-axes) B23";

            Log.Info("---Create workplace---");
            var workplace = HomeZone.GotoMachines();

            workplace.NewBendMachine(machine, name);

            Log.Info("---Create customer---");
            var customers = HomeZone.GotoCustomers();

            customers.NewCustomer(
                name,
                "C" + Guid.NewGuid(),
                "TRUMPF Allee 1",
                "71254",
                "Ditzingen",
                "Deutschland",
                "no comment");
            customers.Apply();
            customers.Cancel();

            Log.Info("---Import 2 parts---");
            var parts = HomeZone.GotoParts();

            parts.Toolbar.Import(@"C:\Users\Public\Documents\TRUMPF\TruTops\Samples\Showcase\Eckwinkel.scdoc");
            parts.WaitForDetailOverlayAppear();
            parts.WaitForDetailOverlayDisappear();
            parts.SingleDetail.Name.Value = TestSettings.NamePrefix + "Bulk1";
            parts.SingleDetailBendSolutions.New();
            parts.Toolbar.Save();
            parts.Toolbar.Import(@"C:\Users\Public\Documents\TRUMPF\TruTops\Samples\Showcase\Zugwinkel.scdoc");
            parts.WaitForDetailOverlayAppear();
            parts.WaitForDetailOverlayDisappear();
            parts.SingleDetail.Name.Value = TestSettings.NamePrefix + "Bulk2";
            parts.SingleDetailBendSolutions.New();
            parts.Toolbar.Save();

            Log.Info("---Select the imported parts and create part orders---");
            parts.ResultColumn.SelectItems(TestSettings.NamePrefix + "Bulk");
            parts.Toolbar.CreatePartOrder();

            Log.Info("---Modify part orders---");
            var partOrders = HomeZone.GotoPartOrders();

            partOrders.BaseInfoBulk.ID.Value                  = "BulkID";
            partOrders.BaseInfoBulk.FinishDate.Value          = (DateTime.Today + TimeSpan.FromDays(2));
            partOrders.BaseInfoBulk.QuantityValue.Value       = 42;
            partOrders.BaseInfoBulk.Customer.Value            = name;
            partOrders.PartInfoBulk.Design.Material.Value     = "AlMg3";
            partOrders.PartInfoBulk.Design.RawMaterial.Value  = "AL0M0200---";
            partOrders.PartInfoBulk.Bend.BendingProgram.Value = TcAppLangDependentStrings.NoBending;

            partOrders.Toolbar.Save();
            partOrders.WaitForDetailOverlayDisappear();


            Log.Info("---Clean up---");
            partOrders.Toolbar.Delete();
            partOrders.ResultColumn.ClearSearch();

            parts.Goto();
            parts.ResultColumn.SelectItems(TestSettings.NamePrefix + "Bulk");
            parts.Toolbar.Delete();
            parts.ResultColumn.ClearSearch();

            customers.Goto();
            var amount = customers.DeleteCustomersWithNameContaining(name);

            if (amount > 0)
            {
                customers.Apply();
            }
            customers.Cancel();

            workplace.Goto();
            workplace.DeleteMachine(name);

            var mainTabControl = HomeZone.MainTabControl;

            mainTabControl.CloseCurrentTab();
        }
Ejemplo n.º 7
0
        public void BulkImportTest()
        {
            var partOrders = HomeZone.GotoPartOrders();

            partOrders.ImportDirectory(@"c:\Users\Public\Documents\TRUMPF\TruTops\Samples\Showcase");
        }