public void ThenUserTypeLinkReference() { AffiliateLink = DataBuilderHelper.GenerateStringValue(10); MultiFormComponent.FindMultiformSection() .ClearText("[name*='nameLink']") .SendText("[name*='nameLink']", AffiliateLink); }
public void ThenCreateInviteLink(string count, string link, string currency) { MultiFormComponent.FindLimitsAndMultiform() .SelectDropdownOption("[name=refLink]", link) .SendText("[name=count]", count) .SelectDropdownOption("[name=currency]", currency); CommonComponentSteps.MakeScreenshot(); }
public void ReceivedAmount() { WaitElementIsVisibleByCss(inputRate); _context.Grid = MultiFormComponent.FindLimitsAndMultiform(); var rateElement = _context.Grid.FindElement(inputRate); var index = rateElement.Text.LastIndexOf(" "); _context.Rate = Decimal.Parse(rateElement.Text.Substring(index).Replace(")", "").TrimEnd('0')); Assert.True(_context.Rate > 0, "Rate is less than 0"); }
public void ThenSectionIsFeesGenerated(string amountFees, int fee) { //Высчитываем актуальную отдаваемую сумму, по рейту и получаемой сумме (в шаблонах хранится только получаемая сумма) _context.Amount = (_context.IncomingAmount / _context.Rate); //То же самое, но с комиссией _context.Fee = _context.Amount * (fee / 100m); //Формируем ожидаемую строку amountFees = amountFees.Replace("**Amount with fee**", (_context.Amount + _context.Fee).RoundBank().ToString()).Replace("**Fee**", _context.Fee.RoundBank().ToString()); _context.Grid = MultiFormComponent.FindLimitsAndMultiform(); WaitCssElementNotContainsText(amountBlock, "="); WaitCssElementContainsText(amountBlock, amountFees); }
public void GivenUserClicksOnInGrid2(string value, string card) { switch (value) { case "Активировать": _context.Grid = MultiFormComponent.FindUIView(); break; case "Заблокировать": WaitElementIsVisibleByCss(CardOptions); FindEpaCard(card).ClickOnElement(CardOptions); WaitElementWithTextByXpath(value); break; case "Разблокировать": WaitElementWithTextByXpath(value); _context.Grid = MultiFormComponent.FindUIView(); break; } CommonComponentSteps.MakeScreenshot(); FindEpaCard(card).ClickByText(value, "", "."); }
public DataGridComponent Init() { return(_context.Grid = MultiFormComponent.FindMultiform()); }
public DataGridComponent Init() { WaitPreloader(multiformPreloader); WaitPreloaderFinish(PreloaderGrid); return(MultiFormComponent.FindMultiform()); }
public void ThenCryptoSectionFee(string rateDescription, string feesDescription, string crypto) { _context.Grid = MultiFormComponent.FindLimitsAndMultiform(); WaitCssElementContainsText(amountBlock, rateDescription); WaitCssElementContainsText(amountBlock, feesDescription); //Wait for animation Thread.Sleep(1000); WaitPreloader(multiformPreloader); CommonComponentSteps.MakeScreenshot(); var fees = _context.Grid.FindElement(amountBlock).Text; string oneDigitSpace3digitsDot2digits = @"[ ][0-9][ ](\d){3}[.](\d){2};"; string oneDigitDot4digits = @"[ ][0][.](\d){4}[ ]"; string oneDigitDot2digits = @"[ ][0-1][.](\d){2};"; string oneDigitDot1digits = @"[ ][0-9][.](\d){1}[ ]"; string oneDigitDot3digits = @"[ ][0][.][0-9]{3}[ ]"; string twoDigitDot2digits = @"[ ](\d){2}[.](\d){2};"; string threeDigitDot2digits = @"[ ](\d){3}[.](\d){2};"; switch (crypto) { case "BTC": Regex.Match(fees, oneDigitSpace3digitsDot2digits).Value.Should().NotBeEmpty(regexErrorMessage); Regex.Match(fees, oneDigitDot4digits).Value.Should().NotBeEmpty(regexErrorMessage); break; case "EURS": Regex.Match(fees, oneDigitDot2digits).Value.Should().NotBeEmpty(regexErrorMessage); Regex.Match(fees, oneDigitDot1digits).Value.Should().NotBeEmpty(regexErrorMessage); break; case "BTG": Regex.Match(fees, twoDigitDot2digits).Value.Should().NotBeEmpty(regexErrorMessage); Regex.Match(fees, oneDigitDot4digits).Value.Should().NotBeEmpty(regexErrorMessage); break; case "BCH": Regex.Match(fees, threeDigitDot2digits).Value.Should().NotBeEmpty(regexErrorMessage); Regex.Match(fees, oneDigitDot4digits).Value.Should().NotBeEmpty(regexErrorMessage); break; case "ETH": Regex.Match(fees, threeDigitDot2digits).Value.Should().NotBeEmpty(regexErrorMessage); Regex.Match(fees, oneDigitDot3digits).Value.Should().NotBeEmpty(regexErrorMessage); break; case "USDT": Regex.Match(fees, oneDigitDot2digits).Value.Should().NotBeEmpty(regexErrorMessage); Regex.Match(fees, oneDigitDot1digits).Value.Should().NotBeEmpty(regexErrorMessage); break; case "LTC": Regex.Match(fees, twoDigitDot2digits).Value.Should().NotBeEmpty(regexErrorMessage); Regex.Match(fees, oneDigitDot3digits).Value.Should().NotBeEmpty(regexErrorMessage); break; default: throw new Exception("No any case branch for crypto " + crypto); } }
public void ThenSectionIsFees(string amountFees) { _context.Grid = MultiFormComponent.FindLimitsAndMultiform(); WaitCssElementNotContainsText(amountBlock, "="); WaitCssElementContainsText(amountBlock, amountFees); }
public DataGridComponent GetFeeAndLimitsSection() { _context.Grid = MultiFormComponent.FindLimitsAndMultiform(); return(_context.Grid); }
public void GivenUserClicksOnEdit() { _context.Grid = MultiFormComponent.FindLimitsAndMultiform(); WaitElementIsVisibleByCss(EditButton); _context.Grid.FindElements(EditButton).Last().Click(); }