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