Ejemplo n.º 1
0
        public void Filter_Organizations_With_SearchBox()
        {
            LeftSideMenu.GoToOrganizations();
            OrganizationsPage.FindOrganization().ContainingKeyword("koro").Find();
            int expectedResult1 = 2;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult1, $"Search using organization name field, with keyword = 'koro', doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult1}");

            OrganizationsPage.FindOrganization().ContainingKeyword("21066").Find();
            int expectedResult2 = 3;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult2, $"Search using phone field, with keyword = '21066', doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult2}");

            OrganizationsPage.FindOrganization().ContainingKeyword("@la").Find();
            int expectedResult3 = 6;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult3, $"Search using website name field, with keyword = '@la', doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult3}");

            OrganizationsPage.FindOrganization().ContainingKeyword("γο").Find();
            int expectedResult4 = 3;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult4, $"Search using street name field, with keyword = 'γο', doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult4}");

            OrganizationsPage.FindOrganization().ContainingKeyword("Καλλιθε").Find();
            int expectedResult5 = 4;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult5, $"Search using city name field, with keyword = 'Καλλιθε', doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult5}");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Issue an import file command. The file can either contain contacts or organizations
        /// </summary>
        /// <returns></returns>
        public static ImportFileCommand ImportFile()
        {
            if (!IsAt)
            {
                LeftSideMenu.GoToImports();
            }

            var elements =
                Driver.Instance.FindElements(By.CssSelector("div.radio.m-b-md label"));

            foreach (var webElement in elements)
            {
                webElement.FindElement(By.CssSelector("span.f14"));
                if (webElement.Text != "Excel, CSV file")
                {
                    continue;
                }
                webElement.FindElement(By.CssSelector("ng-pristine.ng-valid.ng-touched")).Click();
            }

            Driver.Wait(TimeSpan.FromSeconds(1));

            var nextBtn = Driver.Instance.FindElement(By.CssSelector("button[ng-click*='nextStep'][ng-click*='1']"));

            nextBtn.Click();
            Driver.Wait(TimeSpan.FromSeconds(3));

            return(new ImportFileCommand());
        }
Ejemplo n.º 3
0
        public void Search_Using_Side_Alphabet_Bar()
        {
            LeftSideMenu.GoToOrganizations();

            AlphabetSideBar.SelectLetter(LatinAlphabet.RestChars);
            int expectedResult1 = 0;

            VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult1, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult1}");

            AlphabetSideBar.SelectLetter(LatinAlphabet.Z);
            int expectedResult2 = 0;

            VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult2, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult2}");

            AlphabetSideBar.SelectLetter(LatinAlphabet.L);
            int expectedResult3 = 93;

            VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult3, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult3}");

            AlphabetSideBar.SelectLetter(GreekAlphabet.RestChars);
            int expectedResult4 = 200;

            VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult4, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult4}");

            AlphabetSideBar.SelectLetter(GreekAlphabet.Α);
            int expectedResult5 = 0;

            VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult5, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult5}");

            AlphabetSideBar.SelectLetter(GreekAlphabet.Β);
            int expectedResult6 = 0;

            VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult6, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult6}");
        }
Ejemplo n.º 4
0
 public void Organization_Value_At_Create_New_Contact_From_Within_Organization_Is_Locked()
 {
     LeftSideMenu.GoToOrganizations();
     OrganizationsPage.OpenFirstOrganization();
     OrganizationViewPage.CreateContact();
     AssertThat.IsFalse(NewContactPage.IsOrganizationNameEditable, "Organization name field is editable but the contact is being created from within an organization");
 }
Ejemplo n.º 5
0
        public void Filter_Using_Organization_Type()
        {
            LeftSideMenu.GoToOrganizations();
            OrganizationsPage.FilterBy().SelectingAccountType(AccountType.Consultant).Filter();
            int expectedResult1 = 0;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult1, $"The sum of organizations being displayed with Account Type = {AccountType.Consultant} is different from the expected. OrganizationsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult1}");

            OrganizationsPage.ResetFilters();
            OrganizationsPage.FilterBy().SelectingAccountType(AccountType.Reseller).Filter();
            int expectedResult2 = 10;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult2, $"The sum of organizations being displayed with Account Type = {AccountType.Reseller} is different from the expected. OrganizationsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult2}");

            OrganizationsPage.ResetFilters();
            OrganizationsPage.FilterBy().SelectingAccountType(AccountType.Customer).Filter();
            int expectedResult3 = 82;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult3, $"The sum of organizations being displayed with Account Type = {AccountType.Customer} is different from the expected. OrganizationsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult3}");

            OrganizationsPage.ResetFilters();
            OrganizationsPage.FilterBy().SelectingAccountType(AccountType.Supplier).Filter();
            int expectedResult4 = 7;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult4, $"The sum of organizations being displayed with Account Type = {AccountType.Supplier} is different from the expected. OrganizationsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult4}");

            OrganizationsPage.ResetFilters();
            OrganizationsPage.FilterBy().SelectingAccountType(AccountType.Partner).Filter();
            int expectedResult5 = 1;

            VerifyThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, expectedResult5, $"The sum of organizations being displayed with Account Type = {AccountType.Partner} is different from the expected. OrganizationsDisplayed={OrganizationsPage.TotalOrganizationsCountByLabel}, Expected={expectedResult5}");
        }
Ejemplo n.º 6
0
        public void Assert_That_Page_Paths_Are_Correct()
        {
            VerifyThat.IsTrue(ContactsPage.IsAt, "Contact page path is not the expected one");

            ContactsPage.OpenFirstContact();
            VerifyThat.IsTrue(ContactViewPage.IsAt, "Contact view page path is not the expected one");

            EditContactPage.GoTo();
            VerifyThat.IsTrue(EditContactPage.IsAt, "Edit contact page path is not the expected one");

            EditContactPage.ClickSaveContactButton();
            VerifyThat.IsTrue(ContactViewPage.IsAt, "Contact view page path is not the expected one");

            LeftSideMenu.GoToContacts();
            NewContactPage.GoTo();
            VerifyThat.IsTrue(NewContactPage.IsAt, "New contact page path is not the expected one");

            ContactCreator.CreateSimpleContact();
            OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open();
            OrganizationViewPage.FindContactFromOrganizationContactList().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Open();
            VerifyThat.IsTrue(ContactViewPage.IsAtFromWithinOrganizationViewPage, "Contact view page path from within organization view page is not the expected one");

            EditContactPage.GoTo();
            VerifyThat.IsTrue(EditContactPage.IsAtFromWithinOrganizationViewPage, "Edit contact page path from within organization view page is not the expected one");

            EditContactPage.ClickSaveContactButton();
            VerifyThat.IsTrue(ContactViewPage.IsAtFromWithinOrganizationViewPage, "Contact view page path from within organization view page is not the expected one");

            OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open();
            OrganizationViewPage.CreateContact();
            VerifyThat.IsTrue(NewContactPage.IsAtFromWithinOrganizationViewPage, "Contact view page path from within organization view page is not the expected one");
        }
Ejemplo n.º 7
0
        public void Search_Using_Side_Alphabet_Bar()
        {
            LeftSideMenu.GoToCoworkers();

            AlphabetSideBar.SelectLetter(LatinAlphabet.R);
            int expectedResult1 = 1;

            VerifyThat.AreEqual(CoworkersPage.TotalCoworkersCountByLabel, expectedResult1, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={CoworkersPage.TotalCoworkersCountByLabel}, Expected={expectedResult1}");

            AlphabetSideBar.SelectLetter(LatinAlphabet.RestChars);
            int expectedResult2 = 10;

            VerifyThat.AreEqual(CoworkersPage.TotalCoworkersCountByLabel, expectedResult2, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={CoworkersPage.TotalCoworkersCountByLabel}, Expected={expectedResult2}");

            AlphabetSideBar.SelectLetter(GreekAlphabet.RestChars);
            int expectedResult4 = 1;

            VerifyThat.AreEqual(CoworkersPage.TotalCoworkersCountByLabel, expectedResult4, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={CoworkersPage.TotalCoworkersCountByLabel}, Expected={expectedResult4}");

            AlphabetSideBar.SelectLetter(GreekAlphabet.Κ);
            int expectedResult5 = 2;

            VerifyThat.AreEqual(CoworkersPage.TotalCoworkersCountByLabel, expectedResult5, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={CoworkersPage.TotalCoworkersCountByLabel}, Expected={expectedResult5}");

            AlphabetSideBar.SelectLetter(GreekAlphabet.Φ);
            int expectedResult6 = 1;

            VerifyThat.AreEqual(CoworkersPage.TotalCoworkersCountByLabel, expectedResult6, $"Alphabet side bar doesn't work. The sum of contacts being displayed is different from the expected. ContactsDisplayed={CoworkersPage.TotalCoworkersCountByLabel}, Expected={expectedResult6}");
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Edit an existing organization, assigning new organization name and phone values that are nonsense
        /// </summary>
        public static void EditOrganizationAssigningNonsenseValues(Organization editedOrganization)
        {
            if (!OrganizationViewPage.IsAt || (OrganizationViewPage.IsAt && (OrganizationViewPage.OrganizationName != editedOrganization.OrganizationName)))
            {
                LeftSideMenu.GoToOrganizations();
                OrganizationsPage.FindOrganization().WithOrganizationName(editedOrganization.OrganizationName).Open();
            }

            var organizationName = DummyData.NonsenseValue;
            var phone            = DummyData.NonsenseValue;

            EditOrganizationPage.EditOrganization()
            .WithNewOrganizationName(organizationName)
            .WithNewPhone(phone)
            .Edit();

            editedOrganization.IsOrganizationSavedAfterEdit = IsOrganizationSavedAfterEdit;

            if (!editedOrganization.IsOrganizationSavedAfterEdit)
            {
                return;
            }
            editedOrganization.SetFieldValue(OrganizationFields.OrganizationName, organizationName);
            editedOrganization.SetFieldValue(OrganizationFields.Phone, phone);
        }
Ejemplo n.º 9
0
 public void Contact_Emails_Are_Emailable()
 {
     LeftSideMenu.GoToCoworkers();
     CoworkersPage.OpenFirstCoworker();
     VerifyThat.IsTrue(CoworkerViewPage.IsWorkEmailEmailable, "Work email link is not active but it should");
     VerifyThat.IsTrue(CoworkerViewPage.IsPersonalEmailEmailable, "Personal email link is not active but it should");
 }
Ejemplo n.º 10
0
 public void Assert_That_Combo_List_Fields_Are_Sorted_Alphabetically()
 {
     LeftSideMenu.GoToOrganizations();
     NewOrganizationPage.GoTo();
     AssertThat.IsTrue(NewOrganizationPage.AreCountryComboListsSorted, "Country combo list is not sorted alphabetically");
     AssertThat.IsTrue(NewOrganizationPage.IsIndustryComboListSorted, "Country combo list is not sorted alphabetically");
     AssertThat.IsTrue(NewOrganizationPage.IsOrganizationTypeComboListSorted, "Country combo list is not sorted alphabetically");
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Selects a random number of up to 20 contacts from a list of no more than 40 contacts.
 /// </summary>
 /// <returns>The count of contacts that where selected</returns>
 public static void SelectRandomNumberOfContacts()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToContacts();
     }
     Commands.SelectRandomNumberOfRecords(0);
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Issue a FilterBy command. Selects the department filter button from coworkers list page to reveal the department options
 /// </summary>
 /// <returns>A command upon which the filterby criteria are being build</returns>
 public static FilterCoworkersCommand FilterBy()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToCoworkers();
     }
     return(new FilterCoworkersCommand());
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Selects a random number of up to 20 organizations from a list of no more than 40 organizations.
 /// </summary>
 /// <returns>The count of contacts that where selected</returns>
 public static void SelectRandomNumberOfOrganizations()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToOrganizations();
     }
     Commands.SelectRandomNumberOfRecords(0);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Opens the first coworker from the contact list, to view its details
 /// </summary>
 public static void OpenFirstCoworker()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToCoworkers();
     }
     Commands.OpenRecordFromListBySequence(1);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Opens the first organization from the list to view its details
 /// </summary>
 public static void OpenFirstOrganization()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToOrganizations();
     }
     Commands.OpenRecordFromListBySequence(1);
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Issue a FilterBy command. Selects the filterby button from contact list page to reveal the filterby options
 /// </summary>
 /// <returns>A command upon which the filterby criteria are being build</returns>
 public static FilterContactsCommand FilterBy()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToContacts();
     }
     Commands.ClickFilterBy();
     return(new FilterContactsCommand());
 }
Ejemplo n.º 17
0
 public static void CleanUp()
 {
     FirstOrganization.CleanUp();
     SecondOrganization.CleanUp();
     ThirdOrganization.CleanUp();
     LeftSideMenu.GoToContacts();
     VerifyThat.AreEqual(InitialOrganizationCount, OrganizationsPage.TotalOrganizationsCountByLabel,
                         $"Total organizations count is not the same as in the test initiation (Expected={InitialOrganizationCount}, Actual={OrganizationsPage.TotalOrganizationsCountByLabel}). Some organizations may have not been cleaned up at the end of test.");
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Issue a create new contact command with given first name
 /// </summary>
 /// <returns> A command upon which the parameters for the new contact are specified</returns>
 public static CreateContactCommand CreateContact()
 {
     if (!ContactsPage.IsAt)
     {
         LeftSideMenu.GoToContacts();
     }
     GoTo();
     return(new CreateContactCommand());
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Issue a create new organization command with given organization name
 /// </summary>
 /// <param name="organization_name"></param>
 /// <returns> A command upon which the parameters for the new organization are specified</returns>
 public static CreateOrganizationCommand CreateOrganization()
 {
     if (!OrganizationsPage.IsAt)
     {
         LeftSideMenu.GoToOrganizations();
     }
     GoTo();
     return(new CreateOrganizationCommand());
 }
Ejemplo n.º 20
0
        /// <summary>
        ///  Clicks "Invite more Co-Workers" button
        /// </summary>
        public static void ClickInviteCoworkers()
        {
            if (!IsAt)
            {
                LeftSideMenu.GoToCoworkers();
            }

            Driver.Instance.FindElement(By.CssSelector("i[title='Invite Co-workers']")).Click();
        }
Ejemplo n.º 21
0
 /// <summary>
 /// Issue a SortBy command. Selects the sortby button from coworker list page to reveal the sortby options
 /// </summary>
 /// <returns>A command upon which the sortby criteria are being build</returns>
 public static SortCoworkersCommand SortBy()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToCoworkers();
     }
     Commands.ClickSortBy();
     return(new SortCoworkersCommand());
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Issue a SortBy command. Selects the sortby button from organization list page to reveal the sortby options
 /// </summary>
 /// <returns>A command upon which the sortby criteria are being build</returns>
 public static SortOrganizationsCommand SortBy()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToOrganizations();
     }
     Commands.ClickSortBy();
     return(new SortOrganizationsCommand());
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Issue a FilterBy command. Selects the filterby button from organization list page to reveal the filterby options
 /// </summary>
 /// <returns>A command upon which the filterby criteria are being build</returns>
 public static FilterOrganizationsCommand FilterBy()
 {
     if (!IsAt)
     {
         LeftSideMenu.GoToOrganizations();
     }
     Commands.ClickAccountTypeFilter();
     return(new FilterOrganizationsCommand());
 }
Ejemplo n.º 24
0
        public void Assert_That_Page_Paths_Are_Correct()
        {
            LeftSideMenu.GoToCoworkers();

            VerifyThat.IsTrue(CoworkersPage.IsAt, "Coworker page path is not the expected one");

            CoworkersPage.OpenFirstCoworker();
            VerifyThat.IsTrue(CoworkerViewPage.IsAt, "Contact view page path is not the expected one");
        }
Ejemplo n.º 25
0
 public void Duplicate_Contact_Indicator()
 {
     ContactCreator.CreateSimpleContact();
     LeftSideMenu.GoToContacts();
     NewContactPage.GoTo();
     NewContactPage.SetFirstName(ContactCreator.FirstContact.FirstName);
     NewContactPage.SetLastName(ContactCreator.FirstContact.LastName);
     AssertThat.IsTrue(NewContactPage.IsPossibleDuplicateAlertShown,
                       "There should be an alert at the top of the page that informs for the possibility of a duplicate contact");
 }
Ejemplo n.º 26
0
        public void Assert_Organization_Comment_Field_Character_Limit_Indicator_Works_Correctly()
        {
            LeftSideMenu.GoToOrganizations();
            NewOrganizationPage.GoTo();
            NewOrganizationPage.SetComments(" " + DummyData.SimpleText);
            VerifyThat.AreEqual(500 - NewOrganizationPage.CommentsTextLength, NewOrganizationPage.CommentsLimitIndicator,
                                $"Comments text length is {500 - NewContactPage.CommentsTextLength} the value indicator is displaying is {NewOrganizationPage.CommentsLimitIndicator}");

            NewOrganizationPage.SetComments(DummyData.SimpleText);
            VerifyThat.AreEqual(500 - NewOrganizationPage.CommentsTextLength, NewOrganizationPage.CommentsLimitIndicator,
                                $"Comments text length is {500 - NewOrganizationPage.CommentsTextLength} the value indicator is displaying is {NewOrganizationPage.CommentsLimitIndicator}");
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Edit an existing organization, assigning new values to every field
        /// </summary>
        public static void EditOrganizationAlteringAllValues(Organization editedOrganization)
        {
            if (!OrganizationViewPage.IsAt || (OrganizationViewPage.IsAt && (OrganizationViewPage.OrganizationName != editedOrganization.OrganizationName)))
            {
                LeftSideMenu.GoToOrganizations();
                OrganizationsPage.FindOrganization().WithOrganizationName(editedOrganization.OrganizationName).Open();
            }

            var tmp = new Organization();

            tmp.SetFieldValue(OrganizationFields.OrganizationName, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.Phone, DummyData.PhoneValue);
            tmp.SetFieldValue(OrganizationFields.Email, DummyData.EmailValue);
            tmp.SetFieldValue(OrganizationFields.Fax, DummyData.PhoneValue);
            tmp.SetFieldValue(OrganizationFields.Website, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.AllowSms, DummyData.BooleanValue);
            tmp.SetFieldValue(OrganizationFields.AllowPhones, DummyData.BooleanValue);
            tmp.SetFieldValue(OrganizationFields.AllowEmails, DummyData.BooleanValue);

            tmp.SetFieldValue(OrganizationFields.Industry, DummyData.IndustryValue);
            tmp.SetFieldValue(OrganizationFields.OrganizationType, DummyData.OrganizationTypeValue);
            tmp.SetFieldValue(OrganizationFields.Profession, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.Comments, DummyData.SimpleText);
            tmp.SetFieldValue(OrganizationFields.BillingStreet, DummyData.AddressValue);
            tmp.SetFieldValue(OrganizationFields.BillingCity, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.BillingState, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.BillingPostalCode, DummyData.NumericValue);
            tmp.SetFieldValue(OrganizationFields.BillingCountry, DummyData.CountryValue);
            tmp.SetFieldValue(OrganizationFields.ShippingStreet, DummyData.AddressValue);
            tmp.SetFieldValue(OrganizationFields.ShippingCity, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.ShippingState, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.ShippingPostalCode, DummyData.NumericValue);
            tmp.SetFieldValue(OrganizationFields.ShippingCountry, DummyData.CountryValue);
            tmp.SetFieldValue(OrganizationFields.OtherStreet, DummyData.AddressValue);
            tmp.SetFieldValue(OrganizationFields.OtherCity, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.OtherState, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.OtherPostalCode, DummyData.NumericValue);
            tmp.SetFieldValue(OrganizationFields.OtherCountry, DummyData.CountryValue);

            EditOrganizationPage.EditOrganization()
            .WithMultipleNewValues(tmp.BasicOrganizationFields, tmp.ExtraOrganizationFields, tmp.BooleanOrganizationFields)
            .Edit();

            editedOrganization.IsOrganizationSavedAfterEdit = IsOrganizationSavedAfterEdit;

            if (!editedOrganization.IsOrganizationSavedAfterEdit)
            {
                return;
            }
            editedOrganization.Clone(tmp);
        }
Ejemplo n.º 28
0
 public void Create_Contact_From_Within_Organization()
 {
     LeftSideMenu.GoToOrganizations();
     OrganizationsPage.OpenFirstOrganization();
     ContactCreator.CreateSimpleContactFromWithinOrganization();
     AssertThat.IsTrue(ContactCreator.FirstContact.IsContactCreatedSuccessfully,
                       "Contact was not saved successfully but it should.");
     OrganizationViewPage.FindContactFromOrganizationContactList()
     .WithFirstName(ContactCreator.FirstContact.FirstName)
     .AndLastName(ContactCreator.FirstContact.LastName)
     .Open();
     AssertThat.IsTrue(ContactCreator.FirstContact.AreContactFieldValuesSavedCorrectly,
                       "Contact field values were not saved correctly");
 }
Ejemplo n.º 29
0
 /// <summary>
 /// If an organization was created by OrganizationCreator, it is deleted if it hasn't been already.
 /// </summary>
 public void CleanUp()
 {
     try
     {
         if (OrganizationWasCreated)
         {
             var organizationName = GetFieldValue(OrganizationFields.OrganizationName);
             LeftSideMenu.GoToOrganizations();
             OrganizationsPage.FindOrganization()
             .WithOrganizationName(organizationName)
             .Delete(DeleteType.OnlyOrganization);
         }
     }
     catch (NoSuchElementException)
     {
     }
 }
Ejemplo n.º 30
0
        public void Make_A_Contact_Favorite()
        {
            ContactCreator.CreateSimpleContact();
            ContactViewPage.SetContactFavorite(false);
            AssertThat.IsFalse(ContactViewPage.IsContactFavorite, "Contact should have been set as un-favorite, but it is still favorite");

            LeftSideMenu.GoToContacts();
            ContactsPage.FindContact().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).CheckFavorite();
            ContactsPage.FindContact().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Open();

            AssertThat.IsTrue(ContactViewPage.IsContactFavorite, "Contact should have been set as favorite, but it is still un-favorite");

            ContactViewPage.SetContactFavorite(false);

            LeftSideMenu.GoToContacts();
            ContactsPage.FindContact().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Open();
            AssertThat.IsFalse(ContactViewPage.IsContactFavorite, "Contact should have been set as favorite, but it is still un-favorite");
        }