Ejemplo n.º 1
0
        public void CISC_CISC_2077PriceTolerancePipsForFXAndPointsForNonFXTest()
        {
            var orderRequestHelper = new OrderRequestHelper(userName);

            orderRequestHelper.CloseAllActiveOrders();

            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);

            var createWin2 = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM(marketFX);

            createWin2.OrderTypesRadComboBox.SelectItem(Enums.OrderTypes.Market);
            Assert.IsTrue(createWin2.priceTolerancePointsLabel.IsVisible,
                          "Error: Price tolerance points label should be visible");
            Assert.IsTrue(createWin2.priceTolerancePointsLabel.Text.Contains(translations.PipValue1),
                          "Error: Pip Value should present in the Price tolerance points label");
            application.ExecuteForeachLanguageMainMenu(() =>
            {
                Assert.IsTrue(createWin2.priceTolerancePointsLabel.Text.Contains(translations.PipValue1),
                              "Error: wrong translation ");
            });
            createWin2.ClickCancelButton();

            var createWin = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM("UK 100 DFT");

            createWin.OrderTypesRadComboBox.SelectItem(Enums.OrderTypes.Market);
            Assert.IsTrue(createWin.priceTolerancePointsLabel.IsVisible,
                          "Error: Price tolerance points label should be visible");
            Assert.IsTrue(createWin.priceTolerancePointsLabel.Text.Contains(translations.PointValue),
                          "Error: Pip Value should present in the Price tolerance points label");
            application.ExecuteForeachLanguageMainMenu(() =>
            {
                Assert.IsTrue(createWin.priceTolerancePointsLabel.Text.Contains(translations.PointValue),
                              "Error: wrong translation ");
            });
        }
        public void CISC_2072TranslationForPriceToleranceFieldTest()
        {
            new OrderRequestHelper(userName).CloseAllActiveOrders();

            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);

            var createWin2 = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM(market.Name);

            createWin2.OrderTypesRadComboBox.SelectItem(Enums.OrderTypes.Market);

            application.ExecuteForeachLanguageMainMenu(() =>
            {
                createWin2.PriceToleranceComboBox.SelectItem(Enums.comboPriceToleranceValues.Other);
                Assert.AreEqual(translations.PriceTolerance, createWin2.PriceToleranceLbl.Text,
                                "Error: PriceTolerance is not transalted");
                Assert.AreEqual(translations.Other, createWin2.PriceToleranceComboBox.Text,
                                "Error: Other from the tolerance list is not transalted");
                Assert.AreEqual(translations.ToleranceValue, createWin2.PriceToleranceValueLbl.Text,
                                "Error: Price Tolerance Value is not translated");
            });
        }
Ejemplo n.º 3
0
        public void CICS_1331NewPriceReportsWindowTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin1();
            string typeInto = "CAD/CHF";

            Assert.IsTrue(application.MainMenu.Reports.IsEnabled, "Error: expected that Reports menu item is enabled");
            Assert.IsTrue(application.MainMenu.Reports.PriceReport.IsEnabled,
                          "Error: expected that Reports -> PriceReport menu item is enabled");
            application.MainMenu.Reports.PriceReport.Click();
            var priceReportWin = new PriceReportWindow(application);

            Assert.IsTrue(priceReportWin.Panel.SearchComboBox.IsVisible,
                          "Error: SearchComboBox should be visible on PriceReportWindow");
            Assert.IsTrue(priceReportWin.Panel.SubmitButton.IsVisible,
                          "Error: SubmitButton should be visible on PriceReportWindow");
            Assert.IsFalse(priceReportWin.Panel.SubmitButton.IsEnabled,
                           "Error: SubmitButton should be disabled on PriceReportWindow");


            Assert.IsFalse(priceReportWin.Panel.Table.Rows.Any(), "Error: table should be empty on PriceReportWindow");
            Assert.IsTrue(priceReportWin.Panel.ExportExcelButton.IsVisible,
                          "Error: ExportExcelButton should be visible on PriceReportWindow");
            Assert.IsTrue(priceReportWin.Panel.ExportPdfButton.IsVisible,
                          "Error: ExportPdfButton should be visible on PriceReportWindow");
            Assert.IsFalse(priceReportWin.Panel.ExportExcelButton.IsEnabled,
                           "Error: ExportExcelButton should be disabled on PriceReportWindow");
            Assert.IsFalse(priceReportWin.Panel.ExportPdfButton.IsEnabled,
                           "Error: ExportPdfButton should be disabled on PriceReportWindow");
            Assert.IsTrue(priceReportWin.Panel.TillDateTimePicker.IsVisible,
                          "Error: TillDateTimePicker should be visible on PriceReportWindow");
            priceReportWin.Panel.SearchComboBox.Click();



            //3.1 Select Arabic languge menu item
            application.ExecuteForeachLanguageMainMenu(() =>
            {
                Assert.AreEqual(translations.PriceReport, application.MainMenu.Reports.PriceReport.Text,
                                "Error: PriceReport menu is not transalted");
                priceReportWin = new PriceReportWindow(application);
                Assert.AreEqual(translations.PriceReport, priceReportWin.HeaderTextBlock.Text,
                                "Error: header (PriceReportWindow) is not translated ");
                Assert.AreEqual(translations.SelectMarket, priceReportWin.Panel.SelectMarketLabel.Text,
                                "Error: SelectMarketLabel (PriceReportWindow) is not translated ");

                Assert.AreEqual(translations.To, priceReportWin.Panel.ToLabel.Text,
                                "Error: ToLabel (PriceReportWindow) is not translated ");
                Assert.AreEqual(translations.Submit, priceReportWin.Panel.SubmitButton.Text,
                                "Error: SubmitButton (PriceReportWindow) is not translated ");
                Assert.AreEqual(translations.ExportToPDF, priceReportWin.Panel.ExportPdfButton.Text,
                                "Error: ExportPdfButton (PriceReportWindow) is not translated ");
                Assert.AreEqual(translations.ExportToExcel, priceReportWin.Panel.ExportExcelButton.Text,
                                "Error: ExportExcelButton (PriceReportWindow) is not translated ");
                Assert.IsTrue(priceReportWin.Panel.Table.IsHeaderExist(priceReportWin.Panel.Headers.Date),
                              "Error: Date column header (PriceReportWindow) is not translated " +
                              priceReportWin.Panel.Headers.Date);
                Assert.IsTrue(priceReportWin.Panel.Table.IsHeaderExist(priceReportWin.Panel.Headers.Mid),
                              "Error: Mid column header (PriceReportWindow) is not translated " + priceReportWin.Panel.Headers.Mid);
            }, Enums.Languages.JPN);
            priceReportWin.AttachWindowToTheMain();
            Assert.IsTrue(application.PriceReportPanel.Table.IsVisible, "Error: PriceReportPanel.Table should be visible");
        }