예제 #1
0
        public void GivenUserSeeQuittance(List <UITable> expectedTable)
        {
            expectedTable.RemoveAll(it => it.Column1.Equals("Дата"));

            CheckTable(expectedTable, 1);
            CommonComponentSteps.MakeScreenshot();
        }
예제 #2
0
        public void ThenUserConfirmsIdentity(UIIdentityConfirmation table)
        {
            _context.Grid.ClickOnElement("[ng-hide*='Identity']");
            _context.Grid = Init();

            var persDetailsTable = _context.Grid.FindElement("table").Text;

            Assert.True(persDetailsTable.Contains(_context.PersDetails.FirstName));
            Assert.True(persDetailsTable.Contains(_context.PersDetails.LastName));

            _context.Grid
            .SendText(UISelectSearch, table.Citizenship)
            .ClickOnElement(UISelectSearch)
            .SelectUISearchOption(table.Citizenship);

            _context.Grid
            .SendText("[name='documentNumber']", table.DocumentNumber)
            .SendText("#docExpireAt", table.ValidUntil);

            UploadDocument(table.DocumentUpload);
            WaitPreloader(multiformPreloader);
            _context.Grid.ClickOnElement(close);
            CommonComponentSteps.MakeScreenshot();
            _context.Grid = Init();
        }
예제 #3
0
 public void GivenUserSeeTransactionsListContains(List <UITransactionsList> expectedTransactions)
 {
     TransactionsListFragment
     .CheckLastTransactions(
         ReplaceTable(expectedTransactions, _context.Rate, _context.Amount, null, null, null, _context.Fee));
     CommonComponentSteps.MakeScreenshot();
 }
예제 #4
0
 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();
 }
예제 #5
0
        public void UserGetsPINCode()
        {
            Assert.True(_context.Grid.FindElement("[ng-if='model.showNewPin()']").Text.Contains("PIN:"));

            int PIN = Int32.Parse(_context.Grid.FindElement("[ng-if='model.showNewPin()'] b").Text);

            PIN.Should().BeInRange(0, 9999, "PIN code is not valid: " + PIN);
            CommonComponentSteps.MakeScreenshot();
        }
예제 #6
0
        public void CheckStatement(int row, List <UITable> expectedTransactions)
        {
            //Удаляем из ожидаемой таблицы строку с Датой., т.к. проверяется ниже
            expectedTransactions.RemoveAll(it => it.Column1.Equals("Дата"));

            //Клик по номеру операции сверху.
            _context.Grid.FindElement(statementListLocator).FindElements(By.CssSelector("ul"))[row].Click();

            //Проверка ожидаемой/фактической таблиц
            TableFragment.CheckTablesWithOrder(_context.Grid, statementListLocator,
                                               ReplaceTable(expectedTransactions, _context.Rate, _context.Amount, _context.PurseTransactionId, _context.InvoiceId, _context.ExternalTransactionId, null, _context.Email ?? _context.PhoneNumber), row);
            CommonComponentSteps.MakeScreenshot();
        }
예제 #7
0
        public void CheckEPACardUnblockInfo(string FullPAN, string firstName, string lastName)
        {
            var maskedPan = FullPAN.Substring(0, 4) + " xxxx xxxx " + FullPAN.Substring(12, 4);

            string rowPAN = _context.Grid.FindElement(".form-card-activate .row.pan").Text;

            rowPAN.Should().Be(maskedPan);

            string ownerInfo = _context.Grid.FindElement(".form-card-activate .name").Text;

            ownerInfo.Should().Be(firstName + " " + lastName);

            CommonComponentSteps.MakeScreenshot();
        }
예제 #8
0
        public void GivenUserFillsUserActivationDetailsWithForBusinessUser(UIBusinessDetails expectedList)
        {
            _context.BusinessDetails = expectedList;

            Init()
            .SendText("[name='fullname']", expectedList.CompanyName)
            .SendText("[name='website']", expectedList.WebSite)
            .SendText("[name='registrationNumber']", expectedList.RegNumber.ToString())
            .SendText(UISelectSearch, expectedList.Country)
            .ClickOnElement(UISelectSearch)
            .SelectUISearchOption(expectedList.Country)
            .SendText("[name='tradingAddress']", expectedList.TradingAddress);
            CommonComponentSteps.MakeScreenshot();
        }
예제 #9
0
        public void GivenUserActivationDetails(Table table)
        {
            _context.Grid = PromoCardRegistrationPage.FindActivationDetailsForm();
            var set = table.CreateDynamicSet().ToList();


            SearchElementByCss(Country)
            .FindElements(By.CssSelector("option"))
            .SingleOrDefault(it => it.Text.Contains(set[0].Country)).Click();

            _context.Grid
            .SendText(State, set[0].State)
            .SendText(City, set[0].City)
            .SendText(Index, set[0].Index.ToString())
            .SendText(Address, set[0].Address)
            .SendText(SecretName, set[0].SecretName)
            .SendText(SecretDate, set[0].SecretDate.ToString())
            .SendText(SecretPlace, set[0].SecretPlace)
            .SendText(SecretCode, set[0].SecretCode.ToString());
            CommonComponentSteps.MakeScreenshot();
        }
예제 #10
0
 public void ThenUserGetsMessage(string msg)
 {
     _context.Grid = PromoCardRegistrationPage.FindSuccessRegistrationForm();
     _context.Grid.WaitElementWithText(SuccessRegistrationForm + SuccessMessage, msg);
     CommonComponentSteps.MakeScreenshot();
 }
예제 #11
0
 public void ThenUserGetsMessageOnMultiform(string text)
 {
     WaitPreloader(".action-bar-form .multiform-preloader");
     WaitElementIsVisibleByXPath($".//*[contains(text()[normalize-space()],'{text}')]", 120);
     CommonComponentSteps.MakeScreenshot();
 }
예제 #12
0
 public void GivenUserSeeRecipientTable(List <UIInternalPaymentReceiverTable> expectedTable)
 {
     CheckTable(expectedTable, 1);
     CommonComponentSteps.MakeScreenshot();
 }
예제 #13
0
 public void UserSeeQuittanceReceiverTable(List <UIWMPaymentTable> expectedTable)
 {
     expectedTable = ReplaceTable(expectedTable, _context.Rate, _context.Amount, null, null, null, _context.Fee, _context.Email);
     TableFragment.CheckTables(_context.Grid, multiformLocator, expectedTable, 2);
     CommonComponentSteps.MakeScreenshot();
 }
예제 #14
0
        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);
            }
        }
예제 #15
0
 public void ThenUserOrderUSDCard(string currency)
 {
     _context.Grid = new MenuPanel().ClickOnOrderCard(currency);
     CommonComponentSteps.MakeScreenshot();
 }