public void CICS_2079HideSecondaryPopularTagsTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);

            application.MarketSearchTab.SearchForMarketFilter.Popular.Click();
            Assert.IsTrue(application.MarketSearchTab.SearchForMarketFilter.Popular.IsSubmenuOpen,
                          "Error: SubMenu should be opened");
            application.Logout();
            var loginWin = new LoginWindow(application);

            Wait.UntilNoException(() => loginWin.SpoofKVPTextBox.Click());

            new SpoofKVPWindow(application).AddNewKVP(kvps1);
            loginWin.PasswordTextBox.Text = password;
            loginWin.ClickOkButton();
            application.WaitTillMarketsLoad();
            application.MarketSearchTab.SearchForMarketFilter.Popular.Click();
            Assert.IsFalse(application.MarketSearchTab.SearchForMarketFilter.Popular.IsSubmenuOpen,
                           "Error: SubMenu should not be opened");
            application.Logout();
            var loginWin1 = new LoginWindow(application);

            Wait.UntilNoException(() => loginWin1.SpoofKVPTextBox.Click());

            new SpoofKVPWindow(application).AddNewKVP(kvps2);
            loginWin1.PasswordTextBox.Text = password;
            loginWin1.ClickOkButton();
            application.WaitTillMarketsLoad();
            application.MarketSearchTab.SearchForMarketFilter.Popular.Click();
            Assert.IsFalse(application.MarketSearchTab.SearchForMarketFilter.Popular.IsSubmenuOpen,
                           "Error: SubMenu should not be opened");
        }
        public void CICS_2075ReplaceСhartsFromWorkspaceIfMarkeIDPresentInKVPTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps1);
            var chartWin = application.MarketSearchTab.Table.OpenNewChartFormCM("AUD/USD");

            application.Logout();

            var loginWin = new LoginWindow(application);

            Wait.UntilNoException(() => loginWin.SpoofKVPTextBox.Click());

            new SpoofKVPWindow(application).AddNewKVP(kvps);
            loginWin.PasswordTextBox.Text = password;
            loginWin.ClickOkButton();
            application.WaitTillMarketsLoad();
            var chartWindow = new ChartWindow(application);

            Assert.IsTrue(chartWindow.HeaderTextBlock.Text.Contains("US Crude Oil CFD"),
                          "Error: Chart window should be related to US Crude Oil CFD");
            application.MainMenu.Customize.DesktopWorkspaces.Switch.Click();
            application.MainMenu.Customize.DesktopWorkspaces.Switch.FX.Click();
            application.MainMenu.Customize.DesktopWorkspaces.Switch.Default.Click();
            application.WaitTillMarketsLoad();
            var chartWindow1 = new ChartWindow(application);

            Assert.IsTrue(chartWindow1.HeaderTextBlock.Text.Contains("US Crude Oil CFD"),
                          "Error: Chart window should be related to US Crude Oil CFD");
        }
        public void CICS_2069KoMarketsLotFalseEmptyTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);

            application.MarketSearchTab.SearchForMarketFilter.AllMarkets.Click();
            application.MarketSearchTab.SearchMarketsRadComboBox.Text = KoMarketName;
            application.MarketSearchTab.SearchButtonClick();
            var createWin = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM(KoMarketName);

            Assert.IsFalse(createWin.KoLotLabel.IsVisible,
                           "Error: \"1 lot = 10,000\" should not be visible");
            createWin.ClickCancelButton();
            application.Logout();
            var loginWin = new LoginWindow(application);

            Wait.UntilNoException(() => loginWin.SpoofKVPTextBox.Click());

            new SpoofKVPWindow(application).AddNewKVP(kvps3);
            loginWin.PasswordTextBox.Text = password;
            loginWin.ClickOkButton();
            application.WaitTillMarketsLoad();
            application.MarketSearchTab.SearchForMarketFilter.AllMarkets.Click();
            application.MarketSearchTab.SearchMarketsRadComboBox.Text = KoMarketName;
            application.MarketSearchTab.SearchButtonClick();
            createWin = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM(KoMarketName);
            Assert.IsFalse(createWin.KoLotLabel.IsVisible,
                           "Error: \"1 lot = 10,000\" should not be visible");
            createWin.ClickCancelButton();
        }
        public void CISC_2071PriceToleranceFieldSelectedValueTest()
        {
            new OrderRequestHelper(userName).CloseAllActiveOrders();

            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);
            var createWin = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM(market.Name);

            createWin.OrderTypesRadComboBox.SelectItem(Enums.OrderTypes.Market);
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsEnabled,
                          "Error: PriceTolerance combobox should be enabled");
            Assert.IsTrue(createWin.PriceToleranceRadComboBoxLabel.IsVisible,
                          "Error: PriceToleranceLabel should be visible");
            createWin.PriceToleranceComboBox.SelectItem(Enums.comboPriceToleranceValues.c6);
            Assert.AreEqual(Enums.comboPriceToleranceValues.c6, createWin.PriceToleranceComboBox.Text,
                            "Error: value 6 should be placed");
            createWin.ClickSubmitButton();

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

            createWin2.OrderTypesRadComboBox.SelectItem(Enums.OrderTypes.Market);
            Assert.AreEqual(Enums.comboPriceToleranceValues.c6, createWin2.PriceToleranceComboBox.Text,
                            "Error: value 6 should be placed");
            createWin2.ClickSubmitButton();
        }
Example #5
0
        public void CISC_2070PriceToleranceFieldInDealTicketTest()
        {
            new OrderRequestHelper(userName).CloseAllActiveOrders();

            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);
            var    createWin = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM("GBP/USD");
            string PriceToleranceDefaultValue = "2";

            createWin.OrderTypesRadComboBox.SelectItem(Enums.OrderTypes.Market);
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsEnabled,
                          "Error: PriceTolerance combobox should be enabled");
            Assert.IsTrue(createWin.PriceToleranceRadComboBoxLabel.IsVisible,
                          "Error: PriceToleranceLabel should be visible");
            Assert.AreEqual(PriceToleranceDefaultValue, createWin.PriceToleranceComboBox.Text,
                            "Error: default value for this market is 2");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.FillorKill),
                          "Error: value: Fill or Kill should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c1),
                          "Error: value: 1 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c2),
                          "Error: value: 2 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c3),
                          "Error: value: 3 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c4),
                          "Error: value: 4 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c5),
                          "Error: value: 5 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c6),
                          "Error: value: 6 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c7),
                          "Error: value: 7 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c8),
                          "Error: value: 8 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c9),
                          "Error: value: 9 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.c10),
                          "Error: value: 10 should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.MarketOrder),
                          "Error: value: Market Order should exist");
            Assert.IsTrue(createWin.PriceToleranceComboBox.IsItemExist(Enums.comboPriceToleranceValues.Other),
                          "Error: value: Other should exist should exist");
            createWin.PriceToleranceComboBox.SelectItem(Enums.comboPriceToleranceValues.Other);
            Assert.IsTrue(createWin.PriceToleranceValueLabel.IsVisible,
                          "Error: PriceToleranceValueLabel should be visible");
            Assert.IsTrue(createWin.PriceToleranceInfo.IsVisible,
                          "Error: Info Tip should be visible");
            Assert.IsTrue(createWin.PriceToleranceInfo.ToolTip.Contains("\"Fill or Kill\" is 0"),
                          "Error: Something wrong on the line 1");
            Assert.IsTrue(createWin.PriceToleranceInfo.ToolTip.Contains("1-10 select value"),
                          "Error: Something wrong on the line 2");
            Assert.IsTrue(createWin.PriceToleranceInfo.ToolTip.Contains("\"Market Order\" is 1000"),
                          "Error: Something wrong on the line 3");
            Assert.IsTrue(createWin.PriceToleranceInfo.ToolTip.Contains("Select \'Other\' to add another value"),
                          "Error: Something wrong on the line 4");
            createWin.ClickSubmitButton();
        }
        public void CICS_1967JpyPlCheckTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin(userName);

            new OrderRequestHelper(userName).CloseAllActiveOrders();


            var marketOrderWindowLimit = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyForm(upMarketName);
            var koLevel = marketOrderWindowLimit.SelectedKnockoutLevel.Text;

            marketOrderWindowLimit.ExpandStopLimit();
            marketOrderWindowLimit.CurrentStopLimit.LimitCheckBox.Check();
            marketOrderWindowLimit.CurrentStopLimit.PointsRadioButton.Click();
            marketOrderWindowLimit.CurrentStopLimit.PointsLimit.Value = 10;
            marketOrderWindowLimit.CurrentStopLimit.EstimatedRadioButton.Click();
            Assert.AreEqual("100", marketOrderWindowLimit.CurrentStopLimit.EstimatedLimit.Text,
                            "Error: Value in the estimated field should be 100");
            marketOrderWindowLimit.ClickSubmitButton();

            var win = application.OpenPositionsTab.OpenEditMarketOrderWindow(upMarketName + " " + koLevel);

            win.ExpandStopLimit();
            win.CurrentStopLimit.LimitCheckBox.Check();
            win.CurrentStopLimit.EstimatedRadioButton.Click();
            win.CurrentStopLimit.EstimatedLimit.Value = 100;
            win.CurrentStopLimit.PointsRadioButton.Click();
            Assert.AreEqual("10", win.CurrentStopLimit.PointsLimit.Text,
                            "Error: Value in the pips field should be 10");
            win.ClickCancelButton();
            new OrderRequestHelper(userName).CloseAllActiveOrders();

            var marketOrderWindowStop = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyForm(upMarketName);
            var koLevel2 = marketOrderWindowStop.SelectedKnockoutLevel.Text;

            marketOrderWindowStop.ExpandStopLimit();
            marketOrderWindowStop.CurrentStopLimit.StopCheckBox.Check();
            marketOrderWindowStop.CurrentStopLimit.PointsRadioButton.Click();
            marketOrderWindowStop.CurrentStopLimit.PointsStop.Value = 10;
            marketOrderWindowStop.CurrentStopLimit.EstimatedRadioButton.Click();
            Assert.AreEqual("-100", marketOrderWindowStop.CurrentStopLimit.EstimatedStop.Text,
                            "Error: Value in the estimated field should be -100");
            marketOrderWindowStop.ClickSubmitButton();

            var winStop = application.OpenPositionsTab.OpenEditMarketOrderWindow(upMarketName + " " + koLevel);

            winStop.ExpandStopLimit();
            winStop.CurrentStopLimit.StopCheckBox.Check();
            winStop.CurrentStopLimit.EstimatedRadioButton.Click();
            winStop.CurrentStopLimit.EstimatedStop.Value = -100;
            winStop.CurrentStopLimit.PointsRadioButton.Click();
            Assert.AreEqual("10", winStop.CurrentStopLimit.PointsStop.Text,
                            "Error: Value in the pips field should be 10");
            winStop.ClickCancelButton();
            new OrderRequestHelper(userName).CloseAllActiveOrders();
        }
        public void CICS_2067KnockOutExtraDecimalTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin(userName);
            new OrderRequestHelper(userName).CloseAllActiveOrders();

            var    marketOrderWindowLimit = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyForm(upMarketName);
            string num      = marketOrderWindowLimit.SelectedKnockoutLevel.Text;
            var    numCount = num.Length - num.IndexOf(".") - 1;

            Assert.AreEqual(2, numCount,
                            "Error: this market's knockout should contain 2 nums after dot");
        }
Example #8
0
        public void CICS_1332PRWSearchBoxAndTimeSelectorTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin1();
            application.MainMenu.Reports.PriceReport.Click();
            var priceReportWin = new PriceReportWindow(application);

            priceReportWin.Panel.SearchComboBox.Text = "CAD/CHF";
            Wait.UntilNoException(() => Assert.IsTrue(priceReportWin.Panel.SearchComboBox.IsDropDownOpen, "Error SearchComboBox dropdown should be opened"));
            priceReportWin.Panel.SearchComboBox.SelectItem(mark);
            Assert.AreEqual(mark, priceReportWin.Panel.SearchComboBox.SelectedValue, "Error: wrong SearchComboBox selected value");

            //- There is a "to" field with displayed current date/time that doesn't allow the user to pick a date/time. The date/time can't be edited.
            Assert.IsFalse(priceReportWin.Panel.TillDateTimePicker.IsEnabled, "Error: Till DateTimePicker should not be enabled");
            Assert.AreEqual(DateTime.Now.Date, priceReportWin.Panel.TillDateTimePicker.Value.Date, "Error: TillDateTimePicker value is wrong ");
        }
Example #9
0
        public void CICS_1334PRWSubmitBAndColumnFilterTest()
        {
            // var market = Consts.Market11();
            string mark = "CAD/CHF";

            application = new ATProDebugApp();
            application.StartAppWithLogin1();

            application.MainMenu.Reports.PriceReport.Click();
            var priceReportWin = new PriceReportWindow(application);

            priceReportWin.Panel.SearchComboBox.Text = "CAD/CHF";
            Wait.UntilNoException(() => Assert.IsTrue(priceReportWin.Panel.SearchComboBox.IsDropDownOpen, "Error SearchComboBox dropdown should be opened"));
            priceReportWin.Panel.SearchComboBox.SelectItem(mark);
            Assert.AreEqual(mark, priceReportWin.Panel.SearchComboBox.SelectedValue, "Error: wrong SearchComboBox selected value");
            priceReportWin.Panel.ClickSubmitButton();
            //Check that requests logs contains
            //"1/4/2016 15:06:56.429","Start request to String.Emptyhttps://ciapi.cityindex.com/TradingApi/market/99500/tickhistory?priceticks=50000String.Empty"
            string linePattern = "";

            if (URLs.Instance.CurrentServer == Core.Enums.TeamcityRunServers.Live)
            {
                linePattern = @"Start request to \""{4}https:\/\/ciapi\.cityindex\.com\/TradingApi\/market\/\d+\/tickhistory\?priceticks=50000";
            }
            else
            {
                linePattern = @"Start request to \""{4}https:\/\/ciapipreprod\.cityindextest9\.co\.uk\:443\/TradingApi\/market\/\d+\/tickhistory\?priceticks=50000";
            }
            var logsDir         = new DirectoryInfo(application.LogsPath);
            var requestsTxtFile = logsDir.GetFiles()
                                  .FirstUntilNumberOfException(d => d.Name == requestsFile, "Can't find '" + requestsFile + "' file: "
                                                               + logsDir.ToString());

            var lastLine     = File.ReadLines(requestsTxtFile.FullName).Last(l => Regex.IsMatch(l, linePattern));
            var lineDateTime = DateTime.ParseExact(lastLine.Split('"')[1], requestsDateTimeFormat, CultureInfo.InvariantCulture);

            Assert.IsTrue(
                ((DateTime.Now - lineDateTime) < new TimeSpan(0, 2, 0)) &&
                ((DateTime.Now - lineDateTime) > new TimeSpan(0, 0, 0)),
                "Error: needed request is not exist. " + lastLine);

            priceReportWin.Panel.Table.CheckDateTimeColumnSorting("Date");
            priceReportWin.Panel.Table.CheckDoubleColumnSorting("Mid");
        }
Example #10
0
        public void CICS_2068KoMarketsLotTrueTest()
        {
            //2068
            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);

            application.MarketSearchTab.SearchForMarketFilter.AllMarkets.Click();
            application.MarketSearchTab.SearchMarketsRadComboBox.Text = KoMarketName;
            application.MarketSearchTab.SearchButtonClick();
            var createWin = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM(KoMarketName);

            Assert.IsTrue(createWin.IsVisible);
            Assert.AreEqual("Create Market Order", createWin.HeaderTextBlock.Text);
            Assert.IsTrue(createWin.KoLotLabel.IsVisible,
                          "Error: \"1 lot = 10,000\" should be visible");
            createWin.Maximize(); //this window can't be maximized
            createWin.HeaderTextBlock.DoubleClick();
            Assert.IsFalse(createWin.IsMaximized);
            createWin.ClickSubmitButton();
        }
        public void CICS_1749UpdateForgottenPasswordLinkTest()
        {
            var application = new ATProDebugApp();

            application.StartApp();
            var    loginWindow = new LoginWindow(application);
            string URL         = "https://trade-ppe.loginandtrade.com/forgottenpassword/resetpassword.aspx";
            string URLLIVE     = "https://trade.loginandtrade.com/forgottenpassword/resetpassword.aspx";

            loginWindow.ExecuteActionForeachLanguage(() =>
            {
                FiddlerHelper.ListenByFiddler(() =>
                {
                    loginWindow.ForgottenPasswordLink.Click();
                    var forgottenPasswordWindow = new ChromiumWebBrowserWindow(application);
                    forgottenPasswordWindow.Close();
                });

                var address = $"{URL}?cu={GetCurrentShortCulture()}&theme=ci";
                FiddlerHelper.CheckRequestSent(address);
                FiddlerHelper.RequestsList.Clear();
            });

            application.SetENGLanguageInConfigFile();

            loginWindow.EnvironmentComboBox.SelectItem("Live");

            loginWindow.ExecuteActionForeachLanguage(() =>
            {
                FiddlerHelper.ListenByFiddler(() =>
                {
                    loginWindow.ForgottenPasswordLink.Click();
                    var forgottenPasswordWindow = new ChromiumWebBrowserWindow(application);
                    forgottenPasswordWindow.Close();
                });

                var address = $"{URLLIVE}?cu={GetCurrentShortCulture()}&theme=ci";
                FiddlerHelper.CheckRequestSent(address);
                FiddlerHelper.RequestsList.Clear();
            });
        }
        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");
            });
        }
Example #13
0
        public void CICS_1335PRWExportToPDFAndExcelTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin1();

            application.MainMenu.Reports.PriceReport.Click();
            priceReportWin = new PriceReportWindow(application);
            priceReportWin.Panel.SearchComboBox.Text = mark;
            Wait.UntilNoException(
                () =>
                Assert.IsTrue(priceReportWin.Panel.SearchComboBox.IsDropDownOpen,
                              "Error SearchComboBox dropdown should be opened"));
            priceReportWin.Panel.SearchComboBox.SelectItem(mark);
            Assert.AreEqual(mark, priceReportWin.Panel.SearchComboBox.SelectedValue,
                            "Error: wrong SearchComboBox selected value");
            priceReportWin.Panel.ClickSubmitButton();

            //priceReportWin.Panel.ExportPdfButton.Click();
            //CheckExportToPDF();

            priceReportWin.Panel.ExportExcelButton.Click();
            CheckExportToExcel();
        }
Example #14
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 CICS_2076PriceToleranceKVPBasedTest()
        {
            application = new ATProDebugApp();
            application.StartAppWithLogin(userName, kvps: kvps);

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

            Assert.IsTrue(createWin.PriceToleranceComboBox.IsVisible,
                          "Error: PriceTolerance combobox should be visible");
            createWin.ClickCancelButton();
            application.Logout();
            var loginWin = new LoginWindow(application);

            Wait.UntilNoException(() => loginWin.SpoofKVPTextBox.Click());

            new SpoofKVPWindow(application).DeleteKVPs(kvps);
            loginWin.PasswordTextBox.Text = password;
            loginWin.ClickOkButton();
            application.WaitTillMarketsLoad();
            createWin = application.MarketSearchTab.Table.OpenCreateMarketOrderBuyFormCM("UK 100 DFT");
            Assert.IsFalse(createWin.PriceToleranceComboBox.IsVisible,
                           "Error: PriceTolerance combobox should not be visible");
            createWin.ClickCancelButton();
        }
Example #16
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");
        }