예제 #1
0
        public void FacebookLogonViaNotificationsMenu()
        {
            App = new UnitTestApp();
            var authenticationSteps = new AuthenticationSteps(ScenarioContext.Current);

            authenticationSteps.GivenIAmNotAuthenticated();

            var navigationSteps = new NavigationSteps(ScenarioContext.Current);

            navigationSteps.ThenIAmRedirectedToThePage("WikiPage");

            var homePageSteps = new HomePageSteps(ScenarioContext.Current);

            homePageSteps.GivenTheMenuDetailIsClosed();
            homePageSteps.WhenITapTheHanburgerIcon();
            homePageSteps.ThenIShouldSeeTheMenuDetailIsOpened();

            var notificationsPageSteps = new NotificationsPageSteps(ScenarioContext.Current);

            notificationsPageSteps.WhenITapTheNotificationsFromTheMenuDetail();
            navigationSteps.ThenIAmRedirectedToThePage("LogonPage");

            var loginSteps = new LogonPageSteps(ScenarioContext.Current);

            loginSteps.WhenITapTheLoginWithFacebookButtonWithMobileAccount(LOGONUSERMOBILE);
        }
예제 #2
0
        public void FacebookLogonViaWriteYourToughtsMenu()
        {
            var authenticationSteps = new AuthenticationSteps(ScenarioContext.Current);

            authenticationSteps.GivenIAmNotAuthenticated();

            var navigationSteps = new NavigationSteps(ScenarioContext.Current);

            navigationSteps.ThenIAmRedirectedToThePage("WikiPage");

            var homePageSteps = new HomePageSteps(ScenarioContext.Current);

            homePageSteps.GivenTheMenuDetailIsClosed();
            homePageSteps.WhenITapTheHanburgerIcon();
            homePageSteps.ThenIShouldSeeTheMenuDetailIsOpened();

            var postFeedPageSteps = new PostFeedPageSteps(ScenarioContext.Current);

            postFeedPageSteps.WhenITapTheWriteDownIconFromTheMenuDetail();
            navigationSteps.ThenIAmRedirectedToThePage("LogonPage");

            var loginSteps = new LogonPageSteps(ScenarioContext.Current);

            loginSteps.WhenITapTheLoginWithFacebookButtonWithMobileAccount(LOGONUSERMOBILE);
        }
예제 #3
0
        public void FacebookLogonViaCrisisMenu()
        {
            var authenticationSteps = new AuthenticationSteps(ScenarioContext.Current);

            authenticationSteps.GivenIAmNotAuthenticated();

            var navigationSteps = new NavigationSteps(ScenarioContext.Current);

            navigationSteps.ThenIAmRedirectedToThePage("WikiPage");

            var homePageSteps = new HomePageSteps(ScenarioContext.Current);

            homePageSteps.GivenTheMenuDetailIsClosed();
            homePageSteps.WhenITapTheHanburgerIcon();
            homePageSteps.ThenIShouldSeeTheMenuDetailIsOpened();

            var crisisPageSteps = new CrisisHotlineListPageSteps(ScenarioContext.Current);

            crisisPageSteps.WhenITapTheCrisisIconFromTheMenuDetail();
            navigationSteps.ThenIAmRedirectedToThePage("LogonPage");

            var loginSteps = new LogonPageSteps(ScenarioContext.Current);

            loginSteps.WhenITapTheLoginWithFacebookButtonWithAccount(LOGONUSEREMAIL);
        }
예제 #4
0
        public void CheckSuccessfulSignInByAccountName_ProfileNickNameEqualsLogin_TrueReturned()
        {
            var accountNameLocator = By.XPath("//span[@itemprop='additionalName']");
            var expected           = AppSettings.Login;

            AuthenticationSteps.SignIn()
            .DropDownCaretClick()
            .GoToProfilePage();

            var actual = webDriver.GetVisibleElement(accountNameLocator).Text;

            Assert.AreEqual(expected, actual);
        }
예제 #5
0
        public string GetNextAuthenticationStep(User user, int currentSecurityLevel, int requestedSecurityLevel, AuthenticationSteps step)
        {
            AuthenticationStep auth = new AuthenticationStep()
            {
                SecurityModeId   = (int)step,
                UserId           = user.Id,
                CreationDateTime = DateTime.Now
            };

            _UnitOfWork.AuthenticationStepRepository.Add(auth);
            _UnitOfWork.Complete();
            var nextStep = GetNextAuthenticationStep(user.UserName, user.Id, currentSecurityLevel, requestedSecurityLevel);

            return(nextStep);
        }
예제 #6
0
        public string GetAuthenticationStepNameByIndex(int index)
        {
            AuthenticationSteps a = (AuthenticationSteps)index;

            return(a.ToString());
        }