public void RegisterDevice_Success_Test()
        {
            // Create driver manager and navigate to Register Device page
            var manager = GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.Coordinator_RegisterDevice);

            // Sign in with valid username/password/dc
            var registerDevicePage = GatekeeperFactory.CreatePageManager <CoordinatorRegisterDevicePage>(manager.Driver);

            registerDevicePage.AuthenticateChurch("ft.tester", "FT4life!", "dc");

            // Waiting & Check: the next page - Activity Code page is loaded
            Assert.True(manager.IsCurrentPage(PageAlias.Coordinator_ActivityCode));

            // Check the church name is showing on Activity Code page (in the header)
            var activityCodePage = GatekeeperFactory.CreatePageManager <CoordinatorActivityCodePage>(manager.Driver);

            Assert.Equal("Dynamic Church", activityCodePage.HeaderChurchName);

            //Once register successfully, the sign in page won't come up the next time
            manager.NavigateTo(PageAlias.Coordinator_RegisterDevice, false);
            Assert.True(manager.IsCurrentPage(PageAlias.Coordinator_ActivityCode));

            manager.Driver.Close();
        }
Beispiel #2
0
        public void DisableWidget(string disableWidgetName)
        {
            //#01. set & save configuration.
            _driverManager.NavigateTo(PageAlias.Dashboard_Configuration);
            var configurationPage = GatekeeperFactory.CreatePageManager <ConfigurationPage>(_driverManager.Driver);

            for (var i = 0; i < 4; i++)
            {
                configurationPage.ActiveWidgets[i].Enabled = true;
            }

            if (string.IsNullOrEmpty(disableWidgetName))
            {
                //get attr here
                disableWidgetName = configurationPage.ActiveWidgets[3].Title;
                disableWidgetName = disableWidgetName.Substring(0, disableWidgetName.LastIndexOf("("));
            }

            var activeWidget = configurationPage.ActiveWidgets.Find(x => x.Title.StartsWith(disableWidgetName));

            Assert.True(activeWidget != null, string.Format("Can't find out widget which title starts with {0}", disableWidgetName));
            activeWidget.Enabled = false;

            configurationPage.Action_SaveConfiguratorAndClosePage();
            //#02. check result.
            var homePage = GatekeeperFactory.CreatePageManager <HomePage>(_driverManager.Driver);
            var result   = homePage.ChartSections.Find(x => x.SummaryBar.Name == disableWidgetName);

            Assert.True(result == null, "Disable widget failed!");
        }
Beispiel #3
0
        public void VerifyBasicIndividualInfo(int churchId, string loginEmail, string infoType)
        {
            //#01. Inite data.
            string firstname = "winnie";
            string lastname  = "wang";
            string street1   = "Yungu Road";
            string city      = "Xian";
            string zipcode;
            string random = Guid.NewGuid().ToString().Substring(0, 5);

            firstname = firstname + random;
            lastname  = lastname + random;
            street1   = street1 + random;
            city      = city + random;
            zipcode   = random;

            var user = new UserProfileModel()
            {
                FirstName = firstname, LastName = lastname, Street1 = street1, City = city, Zipcode = zipcode
            };

            var profileSettingsPage = GatekeeperFactory.CreatePageManager <ProfilePage>(_driverManager.Driver);

            profileSettingsPage.SetBaseProfile(firstname, lastname, street1, city, zipcode);

            //#02. Get data from DB.
            var data = GetUserData(churchId, loginEmail, infoType);

            //#03. Compare data.
            Assert.True(data == user);
        }
Beispiel #4
0
        public void Check_TitleText()
        {
            _driverManager.NavigateTo(PageAlias.Dashboard_Configuration);
            var configurationPage = GatekeeperFactory.CreatePageManager <ConfigurationPage>(_driverManager.Driver);

            //Check title text.
            Assert.Equal("Active Widgets", configurationPage.TitleText);
        }
        //[InlineData("111111", "111111", "111111", "Updated Successfully!")]
        public void ClosePwdPage()
        {
            var passwordSettingsPage = GatekeeperFactory.CreatePageManager <PasswordPage>(_driverManager.Driver);

            passwordSettingsPage.btnClose.Click();

            //need assert if returned to Launchpad_Home page
        }
        public void ActivityCode_Auth_Error(string activityCode)
        {
            var activityCodePage = GatekeeperFactory.CreatePageManager <CoordinatorActivityCodePage>(_driverManager.Driver);

            activityCodePage.AuthenticateActivityCode(activityCode);

            var isExpected = activityCodePage.IsErrorMsgExpected("Either**** this Activity doesn't meet today or the activity code is invalid.");

            Assert.True(isExpected, "error message is incorrec");
        }
Beispiel #7
0
        public void RegisterDevice_Error(string userName, string password, string churchCode, string expectedErrorMsg)
        {
            _driverManager.NavigateTo(PageAlias.Coordinator_RegisterDevice);
            var registerDevicePage = GatekeeperFactory.CreatePageManager <CoordinatorRegisterDevicePage>(_driverManager.Driver);

            registerDevicePage.AuthenticateChurch(userName, password, churchCode);

            var isPass = registerDevicePage.IsErrorMsgExpected(expectedErrorMsg);

            Assert.True(isPass, "error message is not expected");
        }
        public void SuccessPwdChange(string currentPwd, string newPwd, string confirmNewPwd, string msg)
        {
            //_driverManager.NavigateTo(PageAlias.Launchpad_Password);
            var passwordSettingsPage = GatekeeperFactory.CreatePageManager <PasswordPage>(_driverManager.Driver);

            passwordSettingsPage.SetPassword(currentPwd, newPwd, confirmNewPwd);

            var isExpected = passwordSettingsPage.IsSuccessMsgExpected(msg);

            Assert.True(isExpected, "Message is incorrect");
        }
Beispiel #9
0
        public void ProfileBasicInfoVerify(string firstName, string lastName, string street1, string city, string zipcode, string msg)
        {
            //_driverManager.NavigateTo(PageAlias.Launchpad_Profile);
            var profileSettingsPage = GatekeeperFactory.CreatePageManager <ProfilePage>(_driverManager.Driver);

            profileSettingsPage.SetBaseProfile(firstName, lastName, street1, city, zipcode);

            var isExpected = profileSettingsPage.IsErrorMsgExpected(msg);

            Assert.True(isExpected, "Message is incorrect");
        }
        public void Check_StartIsAvailableWithInstanceSelected()
        {
            // navigate to Activity Instances page
            _driverManager.NavigateTo(PageAlias.Coordinator_ActivityInstances);

            var activityInstancesPage = GatekeeperFactory.CreatePageManager <CoordinatorActivityInstancePage>(_driverManager.Driver);

            // click on the first activity instance and click Start button.
            activityInstancesPage.StartWithInstanceSelected(0);
            // check - with start button is clicked, the next page - Roster List page will be loaded
            Assert.True(_driverManager.IsCurrentPage(PageAlias.Coordinator_MovePage));
        }
Beispiel #11
0
        public CoordinatorActivityCodeAuthFixture()
        {
            var driverManager = this.DriverManager;
            // with church code auth successfully, auth activity code on the activity page

            var activityCodePage = GatekeeperFactory.CreatePageManager <CoordinatorActivityCodePage>(driverManager.Driver);

            // enter activity code (????? need to initiate the activity...)
            activityCodePage.AuthenticateActivityCode("7814");

            Assert.True(driverManager.IsCurrentPage(PageAlias.Coordinator_ActivityInstances));
        }
        public void VerifiedTopBarData_Year(int index, string title, string prefix)
        {
            _driverManager.NavigateTo(PageAlias.Dashboard_Home);
            var homePage = GatekeeperFactory.CreatePageManager <HomePage>(_driverManager.Driver);
            var toolBar  = homePage.ToolBar;

            toolBar.Action_SelectView(ChartView.Year);

            homePage.ChartSections.ForEach(x => x.Expand = false);
            var chartSection = homePage.ChartSections[index];

            chartSection.Expand = true;
            if (!string.IsNullOrEmpty(title))
            {
                Assert.Equal(title, chartSection.DetailBar.Name);
            }

            var chartView_YearData           = chartSection.ChartView.GetEndData().PointData.Value;
            var chartView_LastYearData       = chartSection.ChartView.GetEndData(1).PointData.Value;
            var chartView_BeforeLastYearData = chartSection.ChartView.GetEndData(2).PointData.Value;

            var currentYear = DateTime.Now.Year;

            Assert.Equal("Today " + currentYear, chartSection.DetailBar.MainAreaTitle);
            Assert.Equal(FormatData(chartView_YearData, prefix), FormatData(chartSection.DetailBar.MainAreaValue, prefix));

            Assert.Equal((currentYear - 1).ToString(), chartSection.DetailBar.LastYearAreaTitle);
            Assert.Equal(FormatData(chartView_LastYearData, prefix), FormatData(chartSection.DetailBar.LastYearAreaValue, prefix));

            Assert.Equal((currentYear - 2).ToString(), chartSection.DetailBar.BeforeLastYearAreaTitle);
            Assert.Equal(FormatData(chartView_BeforeLastYearData, prefix), FormatData(chartSection.DetailBar.BeforeLastYearAreaValue, prefix));


            string tempStr   = "{0} From year prior {1}";
            string specifier = prefix == "$" ? "N" : "#,0";
            string dataFrom  = (chartView_YearData == 0) ? (prefix + "0") : (prefix + chartView_YearData.ToString(specifier));
            string dataTo    = FormatData(chartView_LastYearData, prefix);

            if (chartView_YearData != 0 && chartView_LastYearData != 0)
            {
                var data = (chartView_YearData - chartView_LastYearData) / chartView_LastYearData;
                dataFrom = FormatData(data * 100, string.Empty) + "%";
            }
            else
            {
                dataFrom = prefix + (chartView_YearData - chartView_LastYearData).ToString("#,0.##");
            }
            Assert.Equal(string.Format(tempStr, dataFrom, dataTo), chartSection.DetailBar.CompareText);

            chartSection.Expand = false;
            Assert.Equal(dataFrom, chartSection.SummaryBar.CompareWithLast);
        }
        public CoordinatorRegisterDeviceFixture()
            : base()
        {
            //Navigate to Register Device page to login
            var manager = this.DriverManager;

            manager.NavigateTo(PageAlias.Coordinator_RegisterDevice);

            var registerDevicePage = GatekeeperFactory.CreatePageManager <CoordinatorRegisterDevicePage>(manager.Driver);

            registerDevicePage.AuthenticateChurch("ft.tester", "FT4life!", "dc");

            //Waiting & Check page.
            Assert.True(manager.IsCurrentPage(PageAlias.Coordinator_ActivityCode));
        }
Beispiel #14
0
        public void ActivityCode_Auth_Success()
        {
            var activityCodePage = GatekeeperFactory.CreatePageManager <CoordinatorActivityCodePage>(_driverManager.Driver);

            activityCodePage.AuthenticateActivityCode("7814");

            Assert.True(_driverManager.IsCurrentPage(PageAlias.Coordinator_ActivityInstances));
            var dv     = DataVisitor.Create <ICommonDataVisitor>();
            var church = dv.FetchChurchInfomation(15);

            var activityInstancePage = GatekeeperFactory.CreatePageManager <CoordinatorActivityInstancePage>(_driverManager.Driver);

            Assert.Equal(church.ChurchName, activityInstancePage.Header.ChurchName);
            Assert.Equal("Activity - CC1", activityInstancePage.Header.ActivityName);
        }
        public void SignIn_Success()
        {
            //Create manager & Navigate page to Login.
            var manager = GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.Launchpad_SignIn);

            var signInPage = GatekeeperFactory.CreatePageManager <LaunchpadSignInPage>(manager.Driver);

            signInPage.Action_SignIn("*****@*****.**", "FT4life!");

            //Waiting & Check page.
            Assert.True(manager.IsCurrentPage(PageAlias.Launchpad_Home));
            manager.Driver.Close();
        }
        public void SignIn_Error(string userName, string pwd, string errorMsg)
        {
            //Create manager & Navigate page to Login.
            _driverManager.NavigateTo(PageAlias.Launchpad_SignIn);

            var signInPage = GatekeeperFactory.CreatePageManager <LaunchpadSignInPage>(_driverManager.Driver);

            signInPage.Action_SignIn(userName, pwd);

            //Waiting & Check page.
            var isPass = signInPage.Check_ErrorMessage(errorMsg);

            _output.WriteLine("[Info]:Error message '{0}'", signInPage.ErrorMsg);
            Assert.True(isPass, string.Format("error message is not '{0}'", errorMsg));//
        }
Beispiel #17
0
        public void SignIn_Success()
        {
            //Create manager & Navigate page to Login.
            var manager = GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.Dashboard_SignIn);

            var signInPage = GatekeeperFactory.CreatePageManager <DashboardSignInPage>(manager.Driver);

            signInPage.Action_SignIn("Alfred", "Alfred1@", "dc");

            //Waiting & Check page.
            Assert.True(manager.IsCurrentPage(PageAlias.Dashboard_Home));
            manager.Driver.Close();
        }
        public void Check_ActivityInstancesAreUnselectedByDefault()
        {
            _driverManager.NavigateTo(PageAlias.Coordinator_ActivityCode);
            var activityCodePage = GatekeeperFactory.CreatePageManager <CoordinatorActivityCodePage>(_driverManager.Driver);

            activityCodePage.AuthenticateActivityCode("7814");


            var activityInstancesPage = GatekeeperFactory.CreatePageManager <CoordinatorActivityInstancePage>(_driverManager.Driver);

            var isExists = activityInstancesPage.ActivityInstances.Exists(x => x.Radio == true);
            var i        = activityInstancesPage.ActivityInstances.Find(x => x.Name == "");

            Assert.False(isExists, "all the activity instances should be unselected by default but actully not");

            activityInstancesPage.StartWithoutInstancesSelected();
            Assert.True(_driverManager.IsCurrentPage(PageAlias.Coordinator_ActivityCode));
        }
Beispiel #19
0
        public void ProfileBasicInfoSuccessSave(string firstName, string lastName, string street1, string city, string zipcode, string msg)
        {
            //_driverManager.NavigateTo(PageAlias.Launchpad_Password);
            var    profileSettingsPage = GatekeeperFactory.CreatePageManager <ProfilePage>(_driverManager.Driver);
            string random = Guid.NewGuid().ToString().Substring(0, 5);

            firstName = firstName + random;
            lastName  = lastName + random;
            street1   = street1 + random;
            city      = city + random;
            zipcode   = zipcode + random;

            profileSettingsPage.SetBaseProfile(firstName, lastName, street1, city, zipcode);

            var isExpected = profileSettingsPage.IsSuccessMsgExpected(msg);

            Assert.True(isExpected, "Message is incorrect");
        }
Beispiel #20
0
        public void LaunchpadSignOut(string action)
        {
            _driverManager.NavigateTo(PageAlias.Launchpad_Home);
            var launchpadHomepage = GatekeeperFactory.CreatePageManager <Homepage>(_driverManager.Driver);
            var manager           = GatekeeperFactory.CreateDriverManager();

            launchpadHomepage.SignOut();
            System.Threading.Thread.Sleep(5000);

            //Assert.Contains("Sign In", "sign out failed!");


            Assert.True(manager.IsCurrentPage(PageAlias.Launchpad_SignIn));

            //verify url is correct

            //var isExpected = passwordSettingsPage.IsErrorMsgExpected(msg);
            //Assert.True(isExpected, "Message is incorrect");
        }
Beispiel #21
0
        public void DemoTest01()
        {
            _driverManager.NavigateTo(PageAlias.Dashboard_Home);
            var homePage = GatekeeperFactory.CreatePageManager <HomePage>(_driverManager.Driver);

            homePage.ToolBar.Action_SelectView(ChartView.Year);
            var chartSection = homePage.ChartSections.FirstOrDefault();

            chartSection.Expand = true;

            var data_2013 = chartSection.ChartView["2013"];

            homePage.ToolBar.Action_SelectView(ChartView.Quarter);
            var data_2015_Q1 = chartSection.ChartView["Q1", "2015"];

            homePage.ToolBar.Action_SelectView(ChartView.Month);
            var data_2015_Month10 = chartSection.ChartView["Sep", "2015"];

            homePage.ToolBar.Action_SelectView(ChartView.Week);
            var data_2015_Week3 = chartSection.ChartView["36", "2015"];
        }
Beispiel #22
0
            public void MovePage_RosterInfo_Check()
            {
                _driverManager.NavigateTo(PageAlias.Coordinator_ActivityInstances);

                var activityInstancesPage = GatekeeperFactory.CreatePageManager <CoordinatorActivityInstancePage>(_driverManager.Driver);

                activityInstancesPage.StartWithInstanceSelected(0);

                Assert.True(_driverManager.IsCurrentPage(PageAlias.Coordinator_MovePage));

                var moveHomePage = GatekeeperFactory.CreatePageManager <MoveHomePage>(_driverManager.Driver);

                var roster1 = moveHomePage.RosterPanel.Rosters[0];

                Assert.Equal(roster1.Name, "Roster - CC1");
                Assert.Equal(roster1.Time, "12:00 AM");

                roster1.Select();
                var rosterDetail = moveHomePage.RosterDetails;

                Assert.Equal("Roster - CC1 Roster Grouping 12:00 AM", rosterDetail.Title);
            }
Beispiel #23
0
        public void DemoTest()
        {
            _driverManager.NavigateTo(PageAlias.Dashboard_Home);
            var homePage = GatekeeperFactory.CreatePageManager <HomePage>(_driverManager.Driver);

            homePage.ToolBar.Action_SelectView(ChartView.Year);

            var chartSection = homePage.ChartSections.FirstOrDefault();
            //summary
            var summaryBar      = chartSection.SummaryBar;
            var name            = summaryBar.Name;
            var value           = summaryBar.Value;
            var compareWithLast = summaryBar.CompareWithLast;

            chartSection.Expand = true;
            var detailBar               = chartSection.DetailBar;
            var detailBar_Name          = detailBar.Name;
            var mainAreaTitle           = detailBar.MainAreaTitle;
            var mainAreaValue           = detailBar.MainAreaValue;
            var lastYearAreaTitle       = detailBar.LastYearAreaTitle;
            var lastYearAreaValue       = detailBar.LastYearAreaValue;
            var beforeLastYearAreaTitle = detailBar.BeforeLastYearAreaTitle;
            var beforeLastYearAreaValue = detailBar.BeforeLastYearAreaValue;

            homePage.ToolBar.Action_SelectView(ChartView.Month);
            chartSection.Expand = false;
            summaryBar          = chartSection.SummaryBar;
            name            = summaryBar.Name;
            value           = summaryBar.Value;
            compareWithLast = summaryBar.CompareWithLast;

            chartSection.Expand = true;
            //chartSection.MetricItems[0].Selected = true;
            //chartSection.MetricItems.ForEach(x => x.Selected = true);
            //chartSection.MetricItems.ForEach(x => x.Selected = false);
            //homePage.ToolBar.Action_SelectStartDayOfWeek(DayOfWeek.Monday);
            //homePage.ToolBar.Action_SelectStartDayOfWeek(DayOfWeek.Sunday);
            //homePage.ToolBar.Action_SelectStartDayOfWeek(DayOfWeek.Tuesday);
        }
        public DashboardAuthorizedUserFixture()
            : base()
        {
            //sign in dashboard
            //Create manager & Navigate page to Login.
            var manager = this.DriverManager ?? GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.Dashboard_SignIn);

            var signInPage = GatekeeperFactory.CreatePageManager <DashboardSignInPage>(manager.Driver);

            signInPage.Action_SignIn("Alfred", "Alfred1@", "dc");

            //Waiting & Check page.
            Assert.True(manager.IsCurrentPage(PageAlias.Dashboard_Home));

            this.CurrentUser = new CurrentUserModel
            {
                UserName = "******",
                Password = "******"
            };
        }
Beispiel #25
0
        public void Check_WidgetItemSelectCount()
        {
            _driverManager.NavigateTo(PageAlias.Dashboard_Configuration);
            var configurationPage = GatekeeperFactory.CreatePageManager <ConfigurationPage>(_driverManager.Driver);

            configurationPage.Action_UnableAllActiveWidgets(); //clear
            //var widget = configurationPage.ActiveWidgets.FirstOrDefault();
            var activeWidgets = configurationPage.ActiveWidgets;

            for (var i = 0; i < activeWidgets.Count && i < 6; i++)
            {
                var widget = activeWidgets[i];
                widget.Enabled = true;
                //widget.WaitingForDomElementShow();
                var selectedWidgetItems = widget.Items.FindAll(x => x.Selected);
                var matche = Regex.Match(widget.Title, @"\(\d+\)");
                matche = Regex.Match(matche.Value, @"\d+");

                Assert.Equal(int.Parse(matche.Value), selectedWidgetItems.Count);
                widget.Enabled = false;
            }
        }
Beispiel #26
0
        public void LoginUrl_NonExistsChurchCode()
        {
            string msgWrongChurchSignIn = "Your login attempt has failed. Church is not found.";
            string msgWrongChurch       = "Church Not Found, ChurchCode: unexistschurchcode";

            var manager = GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.Launchpad_SignIn_WrongChurch);

            var signInPage = GatekeeperFactory.CreatePageManager <LaunchpadSignInPage>(manager.Driver);

            //Check Sign In message
            signInPage.Action_SignIn("*****@*****.**", "111111");

            var isExpected1 = signInPage.IsErrorMsgExpected(msgWrongChurchSignIn);

            Assert.True(isExpected1, "Message for sign in with non-exists church code is incorrect!");

            //Check Sign Up message
            signInPage.linkSignUp.Click();
            signInPage.Action_SignUp("f1", "l1", "*****@*****.**", "111111", "111111");

            var isExpected2 = signInPage.IsErrorMsgExpectedSignUp(msgWrongChurch);

            Assert.True(isExpected2, "Message for sign up with non-exists church code is incorrect!");
            signInPage.Action_Cancel();

            //Check forgot password page message
            signInPage.linkForgotPassword.Click();
            signInPage.Action_PwdSendEmail("*****@*****.**");

            var isExpected3 = signInPage.IsErrorMsgExpectedPassword(msgWrongChurch);

            Assert.True(isExpected3, "Message for Forgot Password with non-exists church code is incorrect!");
            signInPage.Action_Cancel();

            manager.Driver.Close();
        }
Beispiel #27
0
        public MemberShipAuthorizedUserFixture()
            : base()
        {
            //build current user.
            CurrentUserModel user = new CurrentUserModel
            {
                UserName = "******",
                Password = "******"
            };
            //Create manager & Navigate page to Login.
            var manager = this.DriverManager ?? GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.AUI_SignIn, false);

            var signInPage = GatekeeperFactory.CreatePageManager <MembershipSignInPage>(manager.Driver);

            signInPage.Action_SignIn(user.UserName, user.Password);

            //Waiting & Check page.
            Assert.True(manager.IsCurrentPage(PageAlias.AUI_Organization_Home));

            this.CurrentUser = user;
        }
Beispiel #28
0
        public void LoginUrl_NoChurchCode()
        {
            string msgNoChurchSignIn      = "Login attempt has failed because your church is not identified in the URL. Please contact your church for further assistance.";
            string msgNoChurchSignUp      = "Sign up cannot be launched because your church is not identified in the URL. Please contact your church for further assistance.";
            string msgNoChurchGetPassword = "******";

            var manager = GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.Launchpad_SignIn_ChurchUndefined);

            var signInPage = GatekeeperFactory.CreatePageManager <LaunchpadSignInPage>(manager.Driver);

            //Check Sign In message
            signInPage.Action_SignIn();

            var isExpected1 = signInPage.IsErrorMsgExpected(msgNoChurchSignIn);

            Assert.True(isExpected1, "Message for sign in without church code is incorrect!");

            //Check Sign Up message
            signInPage.Action_SignUp();

            var isExpected2 = signInPage.IsErrorMsgExpectedSignUp(msgNoChurchSignUp);

            Assert.True(isExpected2, "Message for sign up without church code is incorrect!");
            signInPage.Action_Cancel();

            //Check forgot password page message
            signInPage.Action_GetPassword();

            var isExpected3 = signInPage.IsErrorMsgExpectedPassword(msgNoChurchGetPassword);

            Assert.True(isExpected3, "Message for Forgot Password without church code is incorrect!");
            signInPage.Action_Cancel();

            manager.Driver.Close();
        }
Beispiel #29
0
        public void Check_MaxWidgetCount()
        {
            _driverManager.NavigateTo(PageAlias.Dashboard_Configuration);
            var configurationPage = GatekeeperFactory.CreatePageManager <ConfigurationPage>(_driverManager.Driver);

            //Check max widget count.
            var enabledWidgets = configurationPage.ActiveWidgets.FindAll(x => x.Enabled);

            Assert.True(enabledWidgets.Count <= 6);

            configurationPage.Action_UnableAllActiveWidgets();
            enabledWidgets = configurationPage.ActiveWidgets.FindAll(x => x.Enabled);
            Assert.Equal(0, enabledWidgets.Count);

            for (int i = 0; i < 7; i++)
            {
                var widget = configurationPage.ActiveWidgets[i];
                widget.Enabled = true;
                widget.Expand  = false;
            }

            Assert.True(configurationPage.Check_ModalDialog());
            configurationPage.Action_CloseModalDialog();
        }
Beispiel #30
0
        public LaunchpadHighestAuthorityUserFixture()
            : base()
        {
            //Sign in Launchpad
            //Create manager & Navigate page to login.
            var manager = this.DriverManager ?? GatekeeperFactory.CreateDriverManager();

            manager.NavigateTo(PageAlias.Launchpad_SignIn);

            var signInPage = GatekeeperFactory.CreatePageManager <LaunchpadSignInPage>(manager.Driver);

            signInPage.Action_SignIn("*****@*****.**", "111111");

            //Waiting & Check page.
            Assert.True(manager.IsCurrentPage(PageAlias.Launchpad_Home));

            this.CurrentUser = new CurrentUserModel
            {
                UserName   = "******",
                Password   = "******",
                ChurchCode = "dc",
                ChurchId   = 15
            };
        }