Exemplo n.º 1
0
        public void Should_Allow_Login_and_Logout()
        {
            username = RandomString();
            password = RandomString();
            var user = CreateUser(username, password, roles: new string[] { "Checkin" });

            Open($"{rootUrl}CheckIn/");

            WaitForElement("#CheckInApp", 30);

            Find(name: "username").SendKeys(username);
            Find(name: "password").SendKeys(password);
            Find(name: "kiosk").SendKeys("test");
            Find(css: "input[type=submit]").Click();
            Wait(10);

            Open($"{rootUrl}CheckIn/");
            WaitForElement("#CheckInApp", 30);

            PageSource.ShouldContain("Enter your phone number");

            Open($"{rootUrl}CheckIn/Logout", true);
            Open($"{rootUrl}CheckIn/");
            WaitForElement("#CheckInApp", 30);

            PageSource.ShouldNotContain("Enter your phone number");
        }
Exemplo n.º 2
0
 public ParsePage VerifyRobotsPresentWithNoIndexNoFollow()
 {
     PageSource.ShouldContain("meta name=\"robots\" content=\"NOINDEX, NOFOLLOW\"");
     PageSource.ShouldNotContain("meta name=\"robots\" content=\"NOINDEX, FOLLOW\"");
     PageSource.ShouldNotContain("meta name=\"robots\" content=\"INDEX, NOFOLLOW\"");
     return(this);
 }
Exemplo n.º 3
0
        public void Should_Not_Show_Deceased_Person_In_Family_Attendance()
        {
            MaximizeWindow();

            username = RandomString();
            password = RandomString();

            var user = CreateUser(username, password, roles: new string[] { "Access", "Edit", "Admin" });

            var org = MockOrganizations.CreateOrganization(db, RandomString());

            org.RegistrationTypeId = RegistrationTypeCode.RecordFamilyAttendance;
            db.SubmitChanges();

            var family = user.Person.Family;

            var deceasedPerson = CreatePerson(family);

            deceasedPerson.DeceasedDate = DateTime.Now.AddYears(-10);
            db.SubmitChanges();

            Login();
            Wait(3);
            Open($"{rootUrl}OnlineReg/{org.OrganizationId}");
            Wait(3);
            PageSource.ShouldContain(user.Person.FirstName);
            PageSource.ShouldNotContain(deceasedPerson.FirstName);
        }
Exemplo n.º 4
0
 public ParsePage VerifyRobotsPresentWithIndexFollow()
 {
     PageSource.ShouldContain("meta name=\"robots\" content=\"index, follow\"");
     //RB: there is an issue with lower case, to be consistent it should be <meta name="robots" content="INDEX, FOLLOW" />
     PageSource.ShouldNotContain("meta name=\"robots\" content=\"NOINDEX, NOFOLLOW\"");
     PageSource.ShouldNotContain("meta name=\"robots\" content=\"NOINDEX, FOLLOW\"");
     PageSource.ShouldNotContain("meta name=\"robots\" content=\"INDEX, NOFOLLOW\"");
     return(this);
 }
Exemplo n.º 5
0
        public ParsePage VerifyPropertyProfileForSold(string mode, string address)
        {
            var propertyProfileUrl = ConfigurationHelper.DomainWebServer + "/property-profile/" + address + "-" + Regex.Match(Url, @"\d+").Value;

            if (mode == "Sold")
            {
                PageSource.ShouldContain(propertyProfileUrl);
            }
            else
            {
                PageSource.ShouldNotContain(propertyProfileUrl);
            }
            return(this);
        }
Exemplo n.º 6
0
        public void Should_Hide_Giving_Tab()
        {
            SettingUtils.UpdateSetting("HideGivingTabMyDataUsers", "false");

            username = RandomString();
            password = RandomString();
            var user = CreateUser(username, password);

            Login();

            Open($"{rootUrl}Person2/{user.PeopleId}");
            WaitForElement(".active:nth-child(2) > a", 10);
            PageSource.ShouldContain("<a href=\"#giving\" aria-controls=\"giving\" data-toggle=\"tab\">Giving</a>");

            SettingUtils.UpdateSetting("HideGivingTabMyDataUsers", "true");

            Open($"{rootUrl}Person2/Current"); //refresh page
            WaitForElement(".active:nth-child(2) > a", 5);
            PageSource.ShouldNotContain("<a href=\"#giving\" aria-controls=\"giving\" data-toggle=\"tab\">Giving</a>");

            SettingUtils.DeleteSetting("HideGivingTabMyDataUsers");
        }
Exemplo n.º 7
0
        private void Toggle_NavTabs_Setting(bool shouldBeVisible)
        {
            Open($"{rootUrl}Roles/1");

            Find(css: "button[data-target=\"#General\"]").Click();
            Wait(0.5);
            Find(css: "#HideNavTabs + .toggle-group").Parent().Click();

            WaitForElement(".snackbar.success");

            Open(rootUrl);
            var navbar = @"<ul class=""nav navbar-nav"">";

            if (shouldBeVisible)
            {
                PageSource.ShouldContain(navbar);
            }
            else
            {
                PageSource.ShouldNotContain(navbar);
            }
        }
Exemplo n.º 8
0
 public ParsePage VerifyRelAmp()
 {
     PageSource.ShouldNotContain("link rel=\"amphtml\" href=\"");
     return(this);
 }
Exemplo n.º 9
0
 public ParsePage VerifyPreviousLinkNotPresent()
 {
     PageSource.ShouldNotContain("link rel=\"prev\"");
     return(this);
 }
Exemplo n.º 10
0
 public ParsePage VerifyNextLinkNotPresent()
 {
     PageSource.ShouldNotContain("link rel=\"next\"");
     return(this);
 }
Exemplo n.º 11
0
 public ParsePage VerifyRobotsNotPresent()
 {
     PageSource.ShouldNotContain("meta name=\"robots\"");
     return(this);
 }
Exemplo n.º 12
0
 public ParsePage VerifyCanonicalNotPresent()
 {
     PageSource.ShouldNotContain("link rel=\"canonical\"");
     return(this);
 }
Exemplo n.º 13
0
 public ParsePage VerifyMetaMobileLinkPresent()
 {
     PageSource.ShouldNotContain("link id=\"MetaMobileLink\""); //RB: Checking Metamobile link
     return(this);
 }
Exemplo n.º 14
0
 public ParsePage VerifyTextNotPresent(string text)
 {
     PageSource.ShouldNotContain(text);
     return(this);
 }