コード例 #1
0
        public void TestSearchBuilderOrgsDropdownOption()
        {
            const string finddivision = "input[type=radio][value$='First Division']";
            const string findorg      = "input[type=radio][value$='Online Giving']";
            const string settingname  = "ShowAllOrgsByDefaultInSearchBuilder";

            LoginAsAdmin();

            SettingUtils.DeleteSetting(settingname);
            WaitForPageLoad();
            DisplayOrgDropdowns();
            IsElementPresent(finddivision).ShouldBeTrue();
            IsElementPresent(findorg).ShouldBeTrue();

            SettingUtils.UpdateSetting(settingname, "false");
            WaitForPageLoad();
            DisplayOrgDropdowns();
            IsElementPresent(finddivision).ShouldBeFalse();
            IsElementPresent(findorg).ShouldBeFalse();
        }
コード例 #2
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");
        }