コード例 #1
0
ファイル: RightsTest.cs プロジェクト: PavelKochkin2/Ui-Tests
        public void Right_Edit()
        {
            Data.ClientGroupData cg = Data.ClientGroupData.Guest;
            string name = "edit";
            string code, desc;
            var    row = Go.To <RightList>();

            Show_All_Enties();

            row.Rights.Rows[x => x.Name == name].Edit()

            .Code.SetRandom(out code)

            .Name.SetRandom(out name).

            Description.SetRandom(out desc).

            ClientGroup.Set(cg).

            Save().

            Rights.Rows[x => x.Code == code && x.Name == name].Edit()

            .Code.Should.Equal(code).

            Name.Should.Equal(name).

            Description.Should.Equal(desc).

            ClientGroup.Should.Equal(cg);
        }
コード例 #2
0
ファイル: RightsTest.cs プロジェクト: PavelKochkin2/Ui-Tests
        //[Parallelizable(ParallelScope.Self)]
        public void Right_Create()
        {
            //TODO: change cg varuable to "Admin" when the bug is fixed

            string code, name, desc;

            Data.ClientGroupData cg = Data.ClientGroupData.Guest;

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

                      Code.SetRandom(out code).

                      Name.SetRandom(out name).

                      Description.SetRandom(out desc).

                      ClientGroup.Set(cg).

                      Save();

            Show_All_Enties();

            row.Rights.Rows[x => x.Code == code && x.Name == name].Edit()

            .Code.Should.Equal(code).

            Name.Should.Equal(name).

            Description.Should.Equal(desc).

            ClientGroup.Should.Equal(cg);
        }
コード例 #3
0
        public void CampaignType_Delete()
        {
            string name = "delete";

            Data.ClientGroupData cg = Data.ClientGroupData.Admin;

            var row = Go.To <CampaignTypeList>()

                      // finding Campaign Type with "Name" == name and "Client Group" == cg and clicking delete button
                      .CampaignTypes.Rows[x => x.Name == name && x.ClientGroup == cg].Delete()

                      // confirming deleting the Campaign Type
                      .OK()

                      // checking that Campaign Type with "Name" == name and "Client Group" == cg doesn't exist
                      .CampaignTypes.Rows[x => x.Name == name && x.ClientGroup == cg].Should.Not.Exist();
        }
コード例 #4
0
        public void CampaignType_Create()
        {
            string name, desc;

            Data.ClientGroupData cg = Data.ClientGroupData.Admin;

            var row = Go.To <CampaignTypeEditor>()

                      .Name.SetRandom(out name)
                      .Description.SetRandom(out desc)
                      .ClientGroup.Set(cg)

                      // saving the changes
                      .Save()

                      // finding the Campaign Type with "Name" == name
                      .CampaignTypes.Rows[x => x.Name == name && x.Description == desc && x.ClientGroup == cg];

            // checking that all changes we've made have been saved correctly
            row.Name.Should.Equal(name);
            row.Description.Should.Equal(desc);
            row.ClientGroup.Should.Equal(cg);
        }
コード例 #5
0
        public void CampaignType_Edit()
        {
            string name = "edit", desc;

            Data.ClientGroupData cg  = Data.ClientGroupData.Admin;
            Data.ClientGroupData cg2 = Data.ClientGroupData.Guest;
            var row = Go.To <CampaignTypeList>()

                      // finding Campaign Type with "Name" == name and "Client Group" == cg and clicking edit
                      .CampaignTypes.Rows[x => x.Name == name && x.ClientGroup == cg].Edit()

                      .Name.SetRandom(out name)
                      .Description.SetRandom(out desc)
                      .ClientGroup.Set(cg2)
                      .Save()

                      // finding Campaign Type with "Name" == name and "Client Group" == cg2 and clicking edit
                      .CampaignTypes.Rows[x => x.Name == name && x.Description == desc && x.ClientGroup == cg2].Edit()

                      // checking that all changes we've made have been saved correctly
                      .Name.Should.Equal(name)
                      .Description.Should.Equal(desc)
                      .ClientGroup.Should.Equal(cg2);
        }
コード例 #6
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);
        }