예제 #1
0
        public void TestEditExistingField()
        {
            LoginUser("username9", "password9");
            chyHelper = new ChyHelper(GetWebDriver(), "/OfficeFieldDictionary.xml");

            Random rand = new Random();
            int nameInt = rand.Next(1, 1000);

            sectionFieldName = "Test Section " + nameInt;

            chyHelper.MouseHover("Navigate/UserName");
            chyHelper.ClickElement("Navigate/AdminTab");

            chyHelper.MouseHover("Navigate/FieldDictionaryTab");
            chyHelper.MouseHover("Navigate/FieldsTab");
            chyHelper.WaitForWorkAround(1500);
            chyHelper.ClickElement("Navigate/FieldPropertiesTab");

            chyHelper.Select("SectionFields/SelectModule", "20");
            chyHelper.ClickElement("SectionFields/SearchButton");
            chyHelper.ClickElement("SectionFields/ChooseCompanyLogo");
            chyHelper.WaitForWorkAround(2000);
            chyHelper.TypeText("SectionFields/ChangeFieldName",sectionFieldName );
            chyHelper.ClickElement("SectionFields/SaveNewFieldInfo");

            //Check if name changed
            GoToClientPage();
            chyHelper.ClickElement("ClientsSection/CompanyDetailsTab");
            chyHelper.WaitForWorkAround(1000);
            chyHelper.VerifyTrueOrFalse(false, "Company Logo");
            chyHelper.VerifyTrueOrFalse(true, sectionFieldName);

            //Change name back
            SetXPath("SectionFields/ChooseTestField", "<![CDATA[//a[text()='" + sectionFieldName + "']]]>");
            chyHelper.MouseHover("Navigate/UserName");
            chyHelper.ClickElement("Navigate/AdminTab");

            chyHelper.MouseHover("Navigate/FieldDictionaryTab");
            chyHelper.MouseHover("Navigate/FieldsTab");
            chyHelper.ClickElement("Navigate/FieldPropertiesTab");

            chyHelper.Select("SectionFields/SelectModule", "20");
            chyHelper.ClickElement("SectionFields/SearchButton");
            chyHelper.ClickElement("SectionFields/ChooseTestField");
            chyHelper.WaitForWorkAround(2000);
            chyHelper.TypeText("SectionFields/ChangeFieldName", "Company Logo");
            chyHelper.ClickElement("SectionFields/SaveNewFieldInfo");

            GoToClientPage();
            chyHelper.ClickElement("ClientsSection/CompanyDetailsTab");
            chyHelper.WaitForWorkAround(1000);
            chyHelper.VerifyTrueOrFalse(true, "Company Logo");
        }
예제 #2
0
        public void TestMoveFieldToNewTab()
        {
            LoginUser("username9", "password9");
            chyHelper = new ChyHelper(GetWebDriver(), "/OfficeFieldDictionary.xml");

            //Go to fields section and move field to new tab
            chyHelper.MouseHover("Navigate/UserName");
            chyHelper.ClickElement("Navigate/AdminTab");
            chyHelper.WaitForWorkAround(1500);
            chyHelper.MouseHover("Navigate/FieldDictionaryTab");
            chyHelper.MouseHover("Navigate/FieldsTab");
            chyHelper.ClickElement("Navigate/FieldPropertiesTab");

            chyHelper.Select("SectionFields/SelectModule", "20");
            chyHelper.ClickElement("SectionFields/SearchButton");
            chyHelper.ClickElement("SectionFields/ChooseCompanyLogo");
            chyHelper.WaitForWorkAround(2000);
            //Move to this tab and section
            chyHelper.SelectByText("SectionFields/SelectNewTab", "Business Details");
            chyHelper.WaitForWorkAround(1000);
            chyHelper.SelectByText("SectionFields/SelectNewSection", "Merchant Account Data");
            chyHelper.ClickElement("SectionFields/SaveNewFieldInfo");

            //Go check to make sure field is moved
            GoToClientPage();
            chyHelper.ClickElement("ClientsSection/CompanyDetailsTab");
            chyHelper.WaitForWorkAround(1000);
            chyHelper.VerifyTrueOrFalse(false, "Company Logo");

            chyHelper.ClickElement("ClientsSection/BusinessDetailsTab");
            chyHelper.VerifyTrueOrFalse(true, "Company Logo");

            //Move field back for future tests
            chyHelper.MouseHover("Navigate/UserName");
            chyHelper.ClickElement("Navigate/AdminTab");
            chyHelper.MouseHover("Navigate/FieldDictionaryTab");
            chyHelper.MouseHover("Navigate/FieldsTab");
            chyHelper.ClickElement("Navigate/FieldPropertiesTab");

            chyHelper.Select("SectionFields/SelectModule", "20");
            chyHelper.ClickElement("SectionFields/SearchButton");
            chyHelper.ClickElement("SectionFields/ChooseCompanyLogo");
            chyHelper.WaitForWorkAround(2000);
            //Move to this tab and section
            chyHelper.SelectByText("SectionFields/SelectNewTab", "Company Details");
            chyHelper.WaitForWorkAround(1000);
            chyHelper.SelectByText("SectionFields/SelectNewSection", "Company Details");
            chyHelper.ClickElement("SectionFields/SaveNewFieldInfo");
        }
예제 #3
0
        public void TestCreateNewTabSection()
        {
            LoginUser("username9", "password9");
            chyHelper = new ChyHelper(GetWebDriver(), "/OfficeFieldDictionary.xml");

            CreateTabSection();

            chyHelper.VerifyPageText(tabSectionName);

            //Have to add field to new section to make it appear in tab
            chyHelper.MouseHover("Navigate/FieldDictionaryTab");
            chyHelper.MouseHover("Navigate/FieldsTab");
            chyHelper.ClickElement("Navigate/FieldPropertiesTab");

            chyHelper.Select("SectionFields/SelectModule", "20");
            chyHelper.ClickElement("SectionFields/SearchButton");
            chyHelper.ClickElement("SectionFields/ChooseCompanyLogo");
            chyHelper.WaitForWorkAround(2000);
            chyHelper.SelectByText("SectionFields/SelectNewSection", tabSectionName);
            chyHelper.ClickElement("SectionFields/SaveNewFieldInfo");

            //Check on Clients Page
            GoToClientPage();
            chyHelper.ClickElement("ClientsSection/CompanyDetailsTab");
            chyHelper.WaitForWorkAround(1000);
            chyHelper.VerifyPageText(tabSectionName);

            //Do cleanup for future tests, move field back to right section and  delete created section
            DeleteLastTabSection();
            chyHelper.WaitForWorkAround(2000);
            chyHelper.VerifyTrueOrFalse(false, tabSectionName);
            MoveFieldBack();
        }