private void PostSalesOrder(UserContext userContext, ClientLogicalForm newSalesOrderPage)
        {
            ClientLogicalForm postConfirmationDialog;

            using (new TestTransaction(TestContext, "Post"))
            {
                postConfirmationDialog = newSalesOrderPage.Action("Post...").InvokeCatchDialog();
            }

            if (postConfirmationDialog == null)
            {
                userContext.ValidateForm(newSalesOrderPage);
                Assert.Inconclusive("Post dialog can't be found");
            }

            using (new TestTransaction(TestContext, "ConfirmShipAndInvoice"))
            {
                ClientLogicalForm dialog = userContext.CatchDialog(postConfirmationDialog.Action("OK").Invoke);
                if (dialog != null)
                {
                    // The order has been posted and moved to the posted invoices tab, do you want to open...
                    dialog.Action("No").Invoke();
                }
            }
        }
Esempio n. 2
0
        private void PostSalesOrder(UserContext userContext, ClientLogicalForm newSalesOrderPage)
        {
            ClientLogicalForm postConfirmationDialog;

            using (new TestTransaction(TestContext, "Post"))
            {
                postConfirmationDialog = newSalesOrderPage.Action("Post...").InvokeCatchDialog();
            }

            if (postConfirmationDialog == null)
            {
                userContext.ValidateForm(newSalesOrderPage);
                Assert.Inconclusive("Post dialog can't be found");
            }

            ClientLogicalForm openPostedInvoiceDialog;

            using (new TestTransaction(TestContext, "ConfirmShipAndInvoice"))
            {
                openPostedInvoiceDialog = userContext.CatchDialog(postConfirmationDialog.Action("OK").Invoke);
            }

            ClientLogicalForm postedInvoicePage;

            using (new TestTransaction(TestContext, "OpenPostedInvoice"))
            {
                if (openPostedInvoiceDialog != null)
                {
                    postedInvoicePage = userContext.CatchForm(openPostedInvoiceDialog.Action("Yes").Invoke);
                    var newSalesInvoiceNo = postedInvoicePage.Control("No.").StringValue;
                    TestContext.WriteLine("Posted Sales Invoice No. {0}", newSalesInvoiceNo);
                    TestScenario.ClosePage(TestContext, userContext, postedInvoicePage);
                }
            }
        }
Esempio n. 3
0
        private void PostSalesOrder(UserContext userContext, ClientLogicalForm newSalesOrderPage)
        {
            ClientLogicalForm postConfirmationDialog;

            using (new TestTransaction(TestContext, "Post"))
            {
                postConfirmationDialog = newSalesOrderPage.Action("Post...").InvokeCatchDialog();
            }

            if (postConfirmationDialog == null)
            {
                userContext.ValidateForm(newSalesOrderPage);
                Assert.Inconclusive("Post dialog can't be found");
            }

            using (new TestTransaction(TestContext, "ConfirmShipAndInvoice"))
            {
                ClientLogicalForm dialog = userContext.CatchDialog(postConfirmationDialog.Action("OK").Invoke);
                if (dialog != null)
                {
                    // after confiming the post we dont expect more dialogs
                    Assert.Fail("Unexpected Dialog on Post - Caption: {0} Message: {1}", dialog.Caption, dialog.FindMessage());
                }
            }
        }
Esempio n. 4
0
        private void PostPurchaseInvoice(
            UserContext userContext,
            ClientLogicalForm purchaseInvoicePage)
        {
            ClientLogicalForm openPostedInvoiceDialog;

            using (new TestTransaction(TestContext, "Post"))
            {
                var postConfirmationDialog = purchaseInvoicePage.Action("Post")
                                             .InvokeCatchDialog();
                if (postConfirmationDialog == null)
                {
                    userContext.ValidateForm(purchaseInvoicePage);
                    Assert.Fail("Confirm Post dialog not found");
                }
                openPostedInvoiceDialog = postConfirmationDialog.Action("Yes")
                                          .InvokeCatchDialog();
            }

            if (openPostedInvoiceDialog == null)
            {
                Assert.Fail("Open Posted Invoice dialog not found");
            }

            ClientLogicalForm postedPurchaseInvoicePage;

            using (new TestTransaction(TestContext, "OpenPostedPurchaseInvoice"))
            {
                postedPurchaseInvoicePage = userContext.EnsurePage(
                    PostedPurchaseInvoiceCard,
                    openPostedInvoiceDialog.Action("Yes").InvokeCatchForm());
            }

            TestContext.WriteLine(
                "Posted Purchase Invoice {0}",
                postedPurchaseInvoicePage.Caption);

            TestScenario.ClosePage(
                TestContext,
                userContext,
                postedPurchaseInvoicePage);
        }
        private void PostPurchaseInvoice(
            UserContext userContext,
            ClientLogicalForm purchaseInvoicePage)
        {
            ClientLogicalForm openPostedInvoiceDialog;
            using (new TestTransaction(TestContext, "Post"))
            {
                var postConfirmationDialog = purchaseInvoicePage.Action("Post")
                    .InvokeCatchDialog();
                if (postConfirmationDialog == null)
                {
                    userContext.ValidateForm(purchaseInvoicePage);
                    Assert.Fail("Confirm Post dialog not found");
                }
                openPostedInvoiceDialog = postConfirmationDialog.Action("Yes")
                    .InvokeCatchDialog();
            }

            if (openPostedInvoiceDialog == null)
            {
                Assert.Fail("Open Posted Invoice dialog not found");
            }

            ClientLogicalForm postedPurchaseInvoicePage;
            using (new TestTransaction(TestContext, "OpenPostedPurchaseInvoice"))
            {
                postedPurchaseInvoicePage = userContext.EnsurePage(
                        PostedPurchaseInvoiceCard,
                        openPostedInvoiceDialog.Action("Yes").InvokeCatchForm());

            }

            TestContext.WriteLine(
                    "Posted Purchase Invoice {0}",
                    postedPurchaseInvoicePage.Caption);

            TestScenario.ClosePage(
                TestContext,
                userContext,
                postedPurchaseInvoicePage);
        }
        private void PostSalesOrder(UserContext userContext, ClientLogicalForm newSalesOrderPage)
        {
            ClientLogicalForm postConfirmationDialog;
            using (new TestTransaction(TestContext, "Post"))
            {
                postConfirmationDialog = newSalesOrderPage.Action("Post...").InvokeCatchDialog();
            }

            if (postConfirmationDialog == null)
            {
                userContext.ValidateForm(newSalesOrderPage);
                Assert.Inconclusive("Post dialog can't be found");
            }

            using (new TestTransaction(TestContext, "ConfirmShipAndInvoice"))
            {
                ClientLogicalForm dialog = userContext.CatchDialog(postConfirmationDialog.Action("OK").Invoke);
                if (dialog != null)
                {
                    // after confiming the post we dont expect more dialogs
                    Assert.Fail("Unexpected Dialog on Post - Caption: {0} Message: {1}", dialog.Caption, dialog.FindMessage());
                }
            }
        }