Пример #1
0
        public void IsVisaCardLogoVisibleWhenCardNumberIsEntered()
        {
            // Act
            _swipeCardPage.ClickCloseSimulationButton()
            .ClickManualCardButton();

            ManualCardEntryPage manualcardentrypage = new ManualCardEntryPage(app);

            manualcardentrypage.EnterCreditCardNumberInTextBox(TestCardNumbers.VisaCardNumber);

            // Assert for visa card logo
            Assert.IsTrue(manualcardentrypage.IsVisaLogoVisible());
        }
        public void ManualCardBadCvvAndCompleteWithGoodCvv_RegistrationWorks()
        {
            // Act
            _swipeCardPage.ClickCloseSimulationButton()
            .ClickManualCardButton();

            ManualCardEntryPage manualCardEntryPage = new ManualCardEntryPage(app);

            manualCardEntryPage.EnterCreditCardNumberInTextBox(TestCreditCardNumber)
            .EnterExpiryDateInTextBox(TestExpiryDate)
            .EnterCvvInTextBox(Test3DigitCvv)
            .TapBadCvvButton();

            // Assert for ManualCardEntry Page
            Assert.IsTrue(manualCardEntryPage.IsVisaLogoVisible());
            Assert.IsTrue(manualCardEntryPage.IsNextButtonVisible());

            manualCardEntryPage.ClickNextButton();
            PhoneNumberViewPage phoneNumberViewPage = new PhoneNumberViewPage(app);

            // Assert for Validation
            Assert.IsTrue(phoneNumberViewPage.IsValidationCompleted());
            Assert.IsTrue(phoneNumberViewPage.IsCardInvalidLabelVisible());
            // Act
            phoneNumberViewPage.ClickOnCvvInvalidLabelAndNavigate();

            // Assert
            Assert.IsTrue(manualCardEntryPage.IsCvvInvalidMessageVisible());

            manualCardEntryPage.EnterCvvInTextBox(Test3DigitCvv)
            .TapGoodCvvButton();

            // Assert for CvvViewPage
            Assert.IsTrue(manualCardEntryPage.IsNextButtonVisible());

            // Act
            manualCardEntryPage.ClickNextButton();

            // Assert for validating card
            Assert.IsTrue(phoneNumberViewPage.IsValidationCompleted());
            Assert.IsTrue(phoneNumberViewPage.IsCardValidLabelVisible());

            // Act
            phoneNumberViewPage.EnterPhoneNumberInTextBox(TestPhoneNumber);

            // Assert for PhoneNumberPage
            Assert.IsTrue(phoneNumberViewPage.IsNextButtonVisible());

            // Act
            phoneNumberViewPage.ClickNextButton();
            AddWristBandPage addWristbandPage = new AddWristBandPage(app);

            addWristbandPage.ClickOnSimulateNFC_RegistrationAndCloseOverlay();

            // Assert for AddWristbandPage.
            Assert.IsTrue(addWristbandPage.IsFinishButtonVisible());

            // Act
            addWristbandPage.ClickFinishButton();
            RegistrationCompletedPage registrationCompletedPage = new RegistrationCompletedPage(app);

            registrationCompletedPage.ClickNextAttendeeButton();
            var result = app.WaitForElement(x => x.Marked("btn_swipe_card.png"), "Timeout for waiting SelectWorkflowPage", DefaultTimeoutForUiElementToRenderInSeconds);

            // Assert
            Assert.IsNotEmpty(result);
        }