Ejemplo n.º 1
0
        public void ClientGroup_Edit()
        {
            string code = "edit", name = "edit", pageAddress,
                   five9Login,
                   five9Pass,
                   five9Domain,
                   five9ApiUrl,
                   secFive9Login,
                   secFive9Pass,
                   secFive9Domain,
                   smtpServAdress, mailbox, mailboxPass;
            int?smtpServPort;

            Data.CampaignData             defCampaign2 = Data.CampaignData.edit;
            Data.SynchronizeWithFive9Data synch        = SynchronizeWithFive9Data.Normal;

            //TODO: add Time Zone edit to this and create tests

            var row = Go.To <ClientGroupList>().
                      //finding domain with "Name" == name and "Code" == code and clicking edit
                      ClientGroups.Rows[x => x.Code == code && x.Name == name].Edit().
                      //unchecking "Account is suspended" checkbox
                      AccountSuspended.Uncheck().
                      //checking that "Code" field is disabled
                      Code.Should.BeDisabled().

                      Name.SetRandom(out name).

                      DefaultCampaign.Set(defCampaign2).

                      CustomPageAddress.SetRandom(out pageAddress).

                      IndividualRecordingsFolder.Uncheck().

                      Five9Login.SetRandom(out five9Login).

                      Five9Password.SetRandom(out five9Pass)

                      .Five9Domain.SetRandom(out five9Domain)

                      .Five9ApiUrl.SetRandom(out five9ApiUrl)

                      .SecFive9Login.SetRandom(out secFive9Login)

                      .SecFive9Password.SetRandom(out secFive9Pass).

                      SecFive9Domain.SetRandom(out secFive9Domain).

                      SynchronizeWithFive9.Set(synch)

                      .SmtpServerAddress.SetRandom(out smtpServAdress).

                      SmtpServerPort.SetRandom(out smtpServPort).

                      SmtpRequiresSsl.Uncheck().

                      Mailbox.SetRandom(out mailbox).

                      MailboxPassword.SetRandom(out mailboxPass).
                      //saving the changes
                      Save().
                      //finding needed domain and clicking edit
                      ClientGroups.Rows[x => x.Code == code && x.Name == name].Edit()

                      .AccountSuspended.Should.BeUnchecked()

                      .Code.Should.Equal(code).

                      Code.Should.BeDisabled()

                      .Name.Should.Equal(name)

                      .DefaultCampaign.Should.Equal(defCampaign2)

                      .CustomPageAddress.Should.Equal(pageAddress)

                      .IndividualRecordingsFolder.Should.BeUnchecked()

                      .Five9Login.Should.Equal(five9Login)

                      .Five9Password.Should.Equal(five9Pass)

                      .Five9Domain.Should.Equal(five9Domain)

                      .Five9ApiUrl.Should.Equal(five9ApiUrl)

                      .SecFive9Login.Should.Equal(secFive9Login)

                      .SecFive9Password.Should.Equal(secFive9Pass)

                      .SecFive9Domain.Should.Equal(secFive9Domain).

                      SynchronizeWithFive9.Should.Equal(synch)

                      .SmtpServerAddress.Should.Equal(smtpServAdress)

                      .SmtpServerPort.Should.Equal(smtpServPort).

                      SmtpRequiresSsl.Should.BeUnchecked()

                      .Mailbox.Should.Equal(mailbox)

                      .MailboxPassword.Should.Equal(mailboxPass);
        }
Ejemplo n.º 2
0
        public void ClientGroup_Create()
        {
            string code,
                   name,
                   pageAddress,
                   five9Login,
                   five9Pass,
                   five9Domain,
                   five9ApiUrl,
                   secFive9Login,
                   secFive9Pass,
                   secFive9Domain,
                   smtpServAdress, mailbox, mailboxPass, addProp = "Additional properties are available for saved objects";
            int?smtpServPort;

            Data.CampaignData             defCampaign = Data.CampaignData.delete;
            Data.SynchronizeWithFive9Data synch       = SynchronizeWithFive9Data.Normal;


            var row = Go.To <ClientGroupEditor>().
                      //check that "Additional properties" link exists
                      Content.Should.Contain(addProp).
                      //checking "Account is suspended" checkbox
                      AccountSuspended.Check().

                      Code.SetRandom(out code).

                      Name.SetRandom(out name).

                      DefaultCampaign.Set(defCampaign).

                      CustomPageAddress.SetRandom(out pageAddress).
                      //checking "Individual Recordings Folder" checkbox
                      IndividualRecordingsFolder.Check().

                      Five9Login.SetRandom(out five9Login).

                      Five9Password.SetRandom(out five9Pass)

                      .Five9Domain.SetRandom(out five9Domain)

                      .Five9ApiUrl.SetRandom(out five9ApiUrl)

                      .SecFive9Login.SetRandom(out secFive9Login)

                      .SecFive9Password.SetRandom(out secFive9Pass)

                      .SecFive9Domain.SetRandom(out secFive9Domain)

                      .SynchronizeWithFive9.Set(synch)

                      .SmtpServerAddress.SetRandom(out smtpServAdress).

                      SmtpServerPort.SetRandom(out smtpServPort).

                      SmtpRequiresSsl.Check().

                      Mailbox.SetRandom(out mailbox).

                      MailboxPassword.SetRandom(out mailboxPass).
                      //saving the changes
                      Save().
                      //finding domain with "Name" == name and "Code" == code and clicking edit
                      ClientGroups.Rows[x => x.Code == code && x.Name == name].Edit()
                      //checking that all changes we've made have been saved correctly

                      .Code.Should.Equal(code)

                      .Name.Should.Equal(name)

                      .DefaultCampaign.Should.Equal(defCampaign)

                      .CustomPageAddress.Should.Equal(pageAddress)

                      .IndividualRecordingsFolder.Should.BeChecked()

                      .Five9Login.Should.Equal(five9Login)

                      .Five9Password.Should.Equal(five9Pass)

                      .Five9Domain.Should.Equal(five9Domain)

                      .Five9ApiUrl.Should.Equal(five9ApiUrl)

                      .SecFive9Login.Should.Equal(secFive9Login)

                      .SecFive9Password.Should.Equal(secFive9Pass)

                      .SecFive9Domain.Should.Equal(secFive9Domain).

                      SynchronizeWithFive9.Should.Equal(synch)

                      .SmtpServerAddress.Should.Equal(smtpServAdress)

                      .SmtpServerPort.Should.Equal(smtpServPort).

                      SmtpRequiresSsl.Should.BeChecked()

                      .Mailbox.Should.Equal(mailbox)

                      .MailboxPassword.Should.Equal(mailboxPass);
        }
Ejemplo n.º 3
0
        public void User_Edit()
        {
            string login = "******", firstname, lastname, email, city, county, addr, addr2;
            int?   zip = 96701;

            Data.ClientGroupData cg      = Data.ClientGroupData.Admin;
            Data.CompanyData     comp    = Data.CompanyData.DeleteCompany;
            Data.CampaignData    camp    = Data.CampaignData.edit;
            Data.CountryData     country = Data.CountryData.Spain;
            Data.StateData       state   = Data.StateData.HAWAII;
            Data.FilterData      filter  = Data.FilterData.Agent;


            //TODO: add phone field data check
            //TODO: add TimeZone set
            var row = Go.To <UserList>().

                      User.Rows[x => x.Login == login].Edit().
                      //check that "Login" value can't be changed after creating a user
                      Login.Should.BeDisabled().

                      Login.Should.Equal(login).

                      Password.Set("321").
                      PasswordConfirm.Set("321").

                      FirstName.SetRandom(out firstname).

                      LastName.SetRandom(out lastname).

                      Email.SetRandom(out email).

                      ClientGroup.Set(cg).

                      Companies.Set(comp).

                      Campaigns.Set(camp).

                      Countries.Set(country).

                      Zip.Set(zip).

                      Address.SetRandom(out addr).

                      Address2.SetRandom(out addr2).
                      //check that default value for "Filter" is default
                      Filter.Should.Equal(Data.FilterData.Default).

                      Filter.Set(filter).

                      County.SetRandom(out county).

                      City.SetRandom(out city).

                      Save().

                      User.Rows[x => x.Login == login && x.FirstName == firstname && x.LastName == lastname].Edit().

                      FirstName.Should.Equal(firstname).

                      LastName.Should.Equal(lastname).

                      City.Should.Equal(city).

                      Email.Should.Equal(email).

                      ClientGroup.Should.Equal(cg).

                      Companies.Should.Equal(comp).

                      Campaigns.Should.Equal(camp).

                      Countries.Should.Equal(country).

                      Zip.Should.Equal(zip).

                      States.Should.Equal(state).

                      County.Should.Equal(county).

                      City.Should.Equal(city).

                      Address.Should.Equal(addr).

                      Address2.Should.Equal(addr2).

                      Filter.Should.Equal(filter);
        }
Ejemplo n.º 4
0
        public void User_Create()
        {
            string login, firstname, lastname, email, county, city, addr, addr2;
            int?   zip;

            //string phone = "+375(29)303-82-28";

            Data.CampaignData camp  = Data.CampaignData.edit;
            Data.StateData    state = Data.StateData.ALASKA;



            var row = Go.To <UserEditor>().

                      Login.SetRandom(out login).

                      Password.Set("123").

                      PasswordConfirm.Set("123").

                      FirstName.SetRandom(out firstname).

                      LastName.SetRandom(out lastname).

                      Email.SetRandom(out email).

                      Campaigns.Set(camp).

                      Zip.SetRandom(out zip)

                      .Address.SetRandom(out addr)

                      .Address2.SetRandom(out addr2)

                      .States.Set(state).

                      County.SetRandom(out county).

                      City.SetRandom(out city).

                      Save().

                      User.Rows[x => x.Login == login && x.FirstName == firstname && x.LastName == lastname];

            row.Edit()

            .Login.Should.Equal(login)

            .FirstName.Should.Equal(firstname)

            .LastName.Should.Equal(lastname)

            .Email.Should.Equal(email)

            .Campaigns.Should.Equal(camp)
            // We check that default country is USA
            .Countries.Should.Equal(Data.CountryData.UnitedStatesofAmerica)

            .Zip.Should.Equal(zip)

            .States.Should.Equal(state).

            County.Should.Equal(county)

            .City.Should.Equal(city)

            .Address.Should.Equal(addr)

            .Address2.Should.Equal(addr2)
            //check that default value for "Filter" is default
            .Filter.Should.Equal(Data.FilterData.Default).

            Save();
            //we check that values in User list comply with user's values
            row.Login.Should.Equal(login);
            row.FirstName.Should.Equal(firstname);
            row.LastName.Should.Equal(lastname);
        }
Ejemplo n.º 5
0
        public void Campaign_Edit()
        {
            Data.CampaignTypeData    camptype2   = Data.CampaignTypeData.Reliant;
            Data.CompanyData         company     = Data.CompanyData.ExistingCompany;
            Data.Five9DomainTypeData domainType  = Data.Five9DomainTypeData.Secondary;
            Data.CampaignData        camp1       = Data.CampaignData.share;
            Data.InfomercialTypeData informType2 = Data.InfomercialTypeData.ShortForm;
            DateTime startDate        = new DateTime(1980, 4, 4);
            DateTime endDate          = new DateTime(1993, 7, 13);
            DateTime projectedEndDate = new DateTime(1995, 12, 14);
            string   name             = "edit";
            string   five9List;
            int?     seats;
            string   addprop = "Additional Properties";

            var row = Go.To <CampaignList>()

                      // finding "edit" campaign and clicking edit
                      .Campaigns.Rows[x => x.Name == name].Edit()

                      // check that "Additional properties" link exists
                      .Content.Should.Contain(addprop)
                      .Name.SetRandom(out name)
                      .SeatsAllocated
                      .SetRandom(out seats)
                      .CampaignToShareWith.Set(camp1)
                      .CampaignType.Set(camptype2)
                      .Client.Set(company)
                      .StartDate.Set(startDate)
                      .EndDate.Set(endDate)
                      .ProjectedEndDate.Set(projectedEndDate)
                      .External.Set(company)
                      .InfomercialType.Set(informType2)
                      .Five9List.SetRandom(out five9List)
                      .Five9DomainType.Set(domainType)

                      // unchecking "Inactive" and "Alternate language" checkboxes
                      .Inactive.Uncheck().AlternateLanguage.Uncheck()

                      // saving the data and going to Campaign List
                      .Save()

                      // finding campaign with ("Name" == name)  and clicking edit
                      .Campaigns.Rows[x => x.Name == name].Edit()

                      // checking that all changes we've made have been saved correctly
                      .Name.Should.Equal(name)
                      .SeatsAllocated.Should.Equal(seats)
                      .ShareWithCampaign.Should.BeChecked()
                      .CampaignToShareWith.Should.Equal(camp1)
                      .CampaignType.Should.Equal(camptype2)
                      .StartDate.Should.Equal(startDate)
                      .EndDate.Should.Equal(endDate)
                      .ProjectedEndDate.Should.Equal(projectedEndDate)
                      .Inactive.Should.BeUnchecked()
                      .AlternateLanguage.Should.BeUnchecked()
                      .Client.Should.Equal(company)
                      .External.Should.Equal(company)
                      .InfomercialType.Should.Equal(informType2)
                      .Five9List.Should.Equal(five9List)
                      .Five9DomainType.Should.Equal(domainType);
        }