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_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_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 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();
        }