示例#1
0
        public void T02_CreateShopTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminUsers.Click();
            adminPage.UsersShops.Click();
            var shopsPage = adminPage.GoTo <UsersShopsPage>();

            shopsPage.Table.RowSearch.Name.SetValue(userShopName);
            shopsPage = shopsPage.SeachButtonRowClickAndGo();
            while (shopsPage.Table.GetRow(0).Name.IsPresent)
            {
                shopsPage.Table.GetRow(0).ActionsDelete.Click();
                shopsPage.Aletr.Accept();
                shopsPage = shopsPage.GoTo <UsersShopsPage>();
                shopsPage.Table.RowSearch.Name.SetValue(userShopName);
                shopsPage = shopsPage.SeachButtonRowClickAndGo();
            }
            var defaultPage = shopsPage.LoginOut();
            var userPage    = defaultPage.LoginAsUser(userNameAndPass, userNameAndPass);

            userPage.UseProfile.Click();
            userPage.UserShops.Click();
            var shopsListPage = userPage.GoTo <UserShopsPage>();

            shopsListPage.ShopsCreate.Click();
            var shopCreatePage = shopsListPage.GoTo <UserShopCreatePage>();

            shopCreatePage.Name.SetValueAndWait(userShopName);
            shopCreatePage.Address.SetValueAndWait("Москва");
            shopCreatePage.Warehouse.SelectValue(userWarehouseName);
            shopCreatePage.CreateButton.Click();
            shopsListPage = shopCreatePage.GoTo <UserShopsPage>();
            var row = shopsListPage.Table.FindRowByName(userShopName);

            defaultPage = shopsListPage.LoginOut();
            adminPage   = defaultPage.LoginAsAdmin(adminName, adminPass);
            adminPage.AdminUsers.Click();
            adminPage.UsersShops.Click();
            shopsPage = adminPage.GoTo <UsersShopsPage>();
            shopsPage = shopCreatePage.GoTo <UsersShopsPage>();
            shopsPage.Table.RowSearch.Name.SetValue(userShopName);
            shopsPage = shopsPage.SeachButtonRowClickAndGo();
            shopsPage.Table.GetRow(0).Name.WaitPresence();
            shopsPage.Table.GetRow(0).ActionsEdit.Click();

            var shopEditPage = shopsPage.GoTo <UserAdminShopCreatePage>();

            shopEditPage.CompanyPickup.SetFirstValueSelect(companyPickupName);
            shopEditPage.CreateButton.Click();
            shopsPage = shopEditPage.GoTo <UsersShopsPage>();
            var adminMaintenancePage = LoadPage <AdminMaintenancePage>("admin/maintenance/cache_flush");

            adminMaintenancePage.AlertText.WaitText("Cache flushed!");
        }
示例#2
0
        public void T04_DeleteTimesTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Times.Mouseover();
            adminPage.TimesPickup.Click();
            var timesPickupPage = adminPage.GoTo <AdminBaseListPage>();

            timesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            timesPickupPage = timesPickupPage.SeachButtonRowClickAndGo();

            while (timesPickupPage.Table.GetRow(0).Name.IsPresent)
            {
                timesPickupPage.Table.GetRow(0).ActionsDelete.Click();
                timesPickupPage.Aletr.Accept();
                timesPickupPage = timesPickupPage.GoTo <AdminBaseListPage>();
                timesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                timesPickupPage = timesPickupPage.SeachButtonRowClickAndGo();
            }

            timesPickupPage.AdminCompanies.Click();
            timesPickupPage.Times.Mouseover();
            timesPickupPage.TimesCourier.Click();
            var timesCourierPage = adminPage.GoTo <AdminBaseListPage>();

            timesCourierPage.Table.RowSearch.CompanyName.SetValue(companyName);
            timesCourierPage = timesCourierPage.SeachButtonRowClickAndGo();

            while (timesCourierPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                timesCourierPage.Table.GetRow(0).ActionsDelete.Click();
                timesPickupPage.Aletr.Accept();
                timesCourierPage = timesCourierPage.GoTo <AdminBaseListPage>();
                timesCourierPage.Table.RowSearch.CompanyName.SetValue(companyName);
                timesCourierPage = timesCourierPage.SeachButtonRowClickAndGo();
            }
            timesCourierPage.AdminCompanies.Click();
            timesCourierPage.Times.Mouseover();
            timesCourierPage.TimesSelf.Click();
            var timesSelfPage = adminPage.GoTo <AdminBaseListPage>();

            timesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
            timesSelfPage = timesSelfPage.SeachButtonRowClickAndGo();

            while (timesSelfPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                timesSelfPage.Table.GetRow(0).ActionsDelete.Click();
                timesPickupPage.Aletr.Accept();
                timesSelfPage = timesSelfPage.GoTo <AdminBaseListPage>();
                timesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
                timesSelfPage = timesSelfPage.SeachButtonRowClickAndGo();
            }
        }
示例#3
0
        public void CreateSelfPriceTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Times.Mouseover();
            adminPage.TimesSelf.Click();
            var timesSelfPage = adminPage.GoTo <AdminBaseListPage>();

            timesSelfPage.LabelDirectory.WaitText(@"Справочник ""Сроки доставки""");
            timesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
            timesSelfPage = timesSelfPage.SeachButtonRowClickAndGo();

            while (timesSelfPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                timesSelfPage.Table.GetRow(0).ActionsDelete.Click();
                timesSelfPage = timesSelfPage.GoTo <AdminBaseListPage>();
                timesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
                timesSelfPage = timesSelfPage.SeachButtonRowClickAndGo();
            }
            timesSelfPage.Create.Click();
            var timeSelfCreatePage = timesSelfPage.GoTo <TimeCreatePage>();

            timeSelfCreatePage.CompanyName.SetFirstValueSelect(companyName);
            timeSelfCreatePage.Route.SetFirstValueSelect("2", "г. Москва #151184 - г. Москва #151184");
            timeSelfCreatePage.MaxTime.SetValueAndWait("1");
            timeSelfCreatePage.MinTime.SetValueAndWait("1");
            timeSelfCreatePage.SaveButton.Click();
            timesSelfPage = timeSelfCreatePage.GoTo <AdminBaseListPage>();

            timesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
            timesSelfPage = timesSelfPage.SeachButtonRowClickAndGo();
            timesSelfPage.Table.GetRow(0).ColumnThree.WaitText(companyName);
        }
示例#4
0
        public void CreateCompatyPickupTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Companies.Click();
            var companiesPage = adminPage.GoTo <CompaniesPage>();

            companiesPage.Table.RowSearch.Name.SetValue(companyPickupName);
            companiesPage = companiesPage.SeachButtonRowClickAndGo();

            while (companiesPage.Table.GetRow(0).Name.IsPresent)
            {
                companiesPage.Table.GetRow(0).ActionsDelete.Click();
                companiesPage.Aletr.Accept();
                companiesPage = companiesPage.GoTo <CompaniesPage>();
                companiesPage.Table.RowSearch.Name.SetValue(companyPickupName);
                companiesPage = companiesPage.SeachButtonRowClickAndGo();
            }
            companiesPage.Create.Click();
            var companyCreatePage = companiesPage.GoTo <CompanyCreatePage>();

            companyCreatePage.Name.SetValueAndWait(companyPickupName);
            companyCreatePage.CompanyDriver.SelectValue("Aplix");
            companyCreatePage.CompanyAddress.SetValueAndWait("Address");
            companyCreatePage.ItemsMax.SetValueAndWait("3");
            companyCreatePage.ManagersLegalEntity.SetFirstValueSelect(legalEntityName);
            companyCreatePage.ManagersPickup.SetFirstValueSelect(legalPickupName);
            companyCreatePage.SaveButton.Click();
            companiesPage = companyCreatePage.GoTo <CompaniesPage>();
            var adminMaintenancePage = LoadPage <AdminMaintenancePage>("admin/maintenance/cache_flush");

            adminMaintenancePage.AlertText.WaitText("Cache flushed!");
        }
示例#5
0
        public void T07_DeletePickupTimetableTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            //            удаление графика забора если он был
            adminPage.AdminCompanies.Click();
            adminPage.PickupTimetable.Click();
            var pickupTimetablePage = adminPage.GoTo <AdminBaseListPage>();

            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            while (pickupTimetablePage.Table.GetRow(0).Name.IsPresent)
            {
                pickupTimetablePage.Table.GetRow(0).ActionsDelete.Click();
                pickupTimetablePage.Aletr.Accept();
                pickupTimetablePage = pickupTimetablePage.GoTo <AdminBaseListPage>();
                pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            }

            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            while (pickupTimetablePage.Table.GetRow(0).Name.IsPresent)
            {
                pickupTimetablePage.Table.GetRow(0).ActionsDelete.Click();
                pickupTimetablePage = pickupTimetablePage.GoTo <AdminBaseListPage>();
                pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyName);
                pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            }
        }
示例#6
0
        public void CreatePaymentPriceTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.PaymentPrice.Click();
            var рaymentPricePage = adminPage.GoTo <AdminBaseListPage>();

            рaymentPricePage.LabelDirectory.WaitText(@"Справочник ""Возможность наложенного платежа""");
            рaymentPricePage.Table.RowSearch.CompanyName.SetValue(companyName);
            рaymentPricePage = рaymentPricePage.SeachButtonRowClickAndGo();

            while (рaymentPricePage.Table.GetRow(0).Name.IsPresent)
            {
                рaymentPricePage.Table.GetRow(0).ActionsDelete.Click();
                рaymentPricePage.Aletr.Accept();
                рaymentPricePage = рaymentPricePage.GoTo <AdminBaseListPage>();
                рaymentPricePage.Table.RowSearch.CompanyName.SetValue(companyName);
                рaymentPricePage = рaymentPricePage.SeachButtonRowClickAndGo();
            }
            рaymentPricePage.Create.Click();
            var рaymentPriceCreatePage = рaymentPricePage.GoTo <PaymentPriceCreatePage>();

            рaymentPriceCreatePage.Company.SetFirstValueSelect(companyName);
            рaymentPriceCreatePage.City.SetFirstValueSelect("Москва");
            рaymentPriceCreatePage.SaveButton.Click();
            рaymentPricePage = рaymentPriceCreatePage.GoTo <AdminBaseListPage>();

            рaymentPricePage.Table.RowSearch.CompanyName.SetValue(companyName);
            рaymentPricePage = рaymentPricePage.SeachButtonRowClickAndGo();
            рaymentPricePage.Table.GetRow(0).Name.WaitText(companyName);
        }
示例#7
0
        public void CreateTimesPickupTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Times.Mouseover();
            adminPage.TimesPickup.Click();
            var timesPickupPage = adminPage.GoTo <AdminBaseListPage>();

            timesPickupPage.LabelDirectory.WaitText(@"Справочник ""Время забора""");
            timesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            timesPickupPage = timesPickupPage.SeachButtonRowClickAndGo();

            while (timesPickupPage.Table.GetRow(0).Name.IsPresent)
            {
                timesPickupPage.Table.GetRow(0).ActionsDelete.Click();
                timesPickupPage.Aletr.Accept();
                timesPickupPage = timesPickupPage.GoTo <AdminBaseListPage>();
                timesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                timesPickupPage = timesPickupPage.SeachButtonRowClickAndGo();
            }
            timesPickupPage.Create.Click();
            var timePickupCreatePage = timesPickupPage.GoTo <TimePickupCreatePage>();

            timePickupCreatePage.CompanyName.SetFirstValueSelect(companyPickupName);
            timePickupCreatePage.City.SetFirstValueSelect("Москва");
            timePickupCreatePage.MaxTime.SetValueAndWait("1");
            timePickupCreatePage.MinTime.SetValueAndWait("1");
            timePickupCreatePage.SaveButton.Click();
            timesPickupPage = timePickupCreatePage.GoTo <AdminBaseListPage>();

            timesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            timesPickupPage = timesPickupPage.SeachButtonRowClickAndGo();
            timesPickupPage.Table.GetRow(0).Name.WaitText(companyPickupName);
        }
示例#8
0
        public void CreateWeightTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.DirectoryList.Click();
            adminPage.Intervals.Mouseover();
            adminPage.IntervalsWeight.Click();
            var intervalsWeightPage = adminPage.GoTo <AdminBaseListPage>();

            intervalsWeightPage.LabelDirectory.WaitText(@"Справочник ""Веса""");
            intervalsWeightPage.Table.RowSearch.Name.SetValue(weightName);
            intervalsWeightPage = intervalsWeightPage.SeachButtonRowClickAndGo();

            while (intervalsWeightPage.Table.GetRow(0).Name.IsPresent)
            {
                intervalsWeightPage.Table.GetRow(0).ActionsDelete.Click();
                intervalsWeightPage.Aletr.Accept();
                intervalsWeightPage = intervalsWeightPage.GoTo <AdminBaseListPage>();
                intervalsWeightPage.Table.RowSearch.Name.SetValue(weightName);
                intervalsWeightPage = intervalsWeightPage.SeachButtonRowClickAndGo();
            }
            intervalsWeightPage.Create.Click();
            var intervalWeightCreatePage = intervalsWeightPage.GoTo <IntervalWeightCreatePage>();

            intervalWeightCreatePage.Name.SetValueAndWait(weightName);
            intervalWeightCreatePage.Min.SetValueAndWait(weightMin.ToString());
            intervalWeightCreatePage.Max.SetValueAndWait(weightMax.ToString());
            intervalWeightCreatePage.SaveButton.Click();
            intervalsWeightPage = intervalWeightCreatePage.GoTo <AdminBaseListPage>();

            intervalsWeightPage.Table.RowSearch.Name.SetValue(weightName);
            intervalsWeightPage = intervalsWeightPage.SeachButtonRowClickAndGo();
            intervalsWeightPage.Table.GetRow(0).Name.WaitText(weightName);
        }
示例#9
0
        public void CreateMarginsTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Margins.Mouseover();
            adminPage.MarginsValue.Click();
            var marginsValuePage = adminPage.GoTo <MarginsValuePage>();

            Assert.AreEqual(marginsValuePage.Table.GetRow(0).Name.GetText(), "Забор");
            marginsValuePage.Table.GetRow(0).ActionsEdit.Click();
            var marginsValueCreatePage = marginsValuePage.GoTo <MarginsValueCreatePage>();

            marginsValueCreatePage.Value.SetValue(marginsPickup.ToString());
            marginsValueCreatePage.Mode.SelectValue("Рубли");
            marginsValueCreatePage.SaveButton.Click();
            marginsValuePage = marginsValueCreatePage.GoTo <MarginsValuePage>();

            Assert.AreEqual(marginsValuePage.Table.GetRow(2).Name.GetText(), "Самовывоз");
            marginsValuePage.Table.GetRow(2).ActionsEdit.Click();
            marginsValueCreatePage = marginsValuePage.GoTo <MarginsValueCreatePage>();
            marginsValueCreatePage.Value.SetValue(marginsSelf.ToString());
            marginsValueCreatePage.Mode.SelectValue("Рубли");
            marginsValueCreatePage.SaveButton.Click();
            marginsValuePage = marginsValueCreatePage.GoTo <MarginsValuePage>();

            Assert.AreEqual(marginsValuePage.Table.GetRow(4).Name.GetText(), "Курьерская доставка");
            marginsValuePage.Table.GetRow(4).ActionsEdit.Click();
            marginsValueCreatePage = marginsValuePage.GoTo <MarginsValueCreatePage>();
            marginsValueCreatePage.Value.SetValue(marginsCourirs.ToString());
            marginsValueCreatePage.Mode.SelectValue("Рубли");
            marginsValueCreatePage.SaveButton.Click();
            marginsValuePage = marginsValueCreatePage.GoTo <MarginsValuePage>();
        }
示例#10
0
        public void CreateDeliveryPointTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.DeliveryPoints.Click();
            var deliveryPointsPage = adminPage.GoTo <AdminBaseListPage>();

            deliveryPointsPage.LabelDirectory.WaitText(@"Справочник ""Пункты выдачи""");
            deliveryPointsPage.Table.RowSearch.Name.SetValue(deliveryPointName);
            deliveryPointsPage = deliveryPointsPage.SeachButtonRowClickAndGo();

            while (deliveryPointsPage.Table.GetRow(0).Name.IsPresent)
            {
                deliveryPointsPage.Table.GetRow(0).ActionsDelete.Click();
                deliveryPointsPage.Aletr.Accept();
                deliveryPointsPage = deliveryPointsPage.GoTo <AdminBaseListPage>();
                deliveryPointsPage.Table.RowSearch.Name.SetValue(deliveryPointName);
                deliveryPointsPage = deliveryPointsPage.SeachButtonRowClickAndGo();
            }
            deliveryPointsPage.Create.Click();
            var deliveryPointCreatePage = deliveryPointsPage.GoTo <DeliveryPointCreatePage>();

            deliveryPointCreatePage.City.SetFirstValueSelect("Москва");
            deliveryPointCreatePage.DeliveryPointName.SetValueAndWait(deliveryPointName);
            deliveryPointCreatePage.CompanyName.SetFirstValueSelect(companyName);
            deliveryPointCreatePage.Address.SetValueAndWait(deliveryPointAddress);
            deliveryPointCreatePage.Longitude.SetValueAndWait(deliveryPointLongitude);
            deliveryPointCreatePage.Latitude.SetValueAndWait(deliveryPointLatitude);
            deliveryPointCreatePage.HasFittingRoom.Click();
            deliveryPointCreatePage.IsCard.Click();
            deliveryPointCreatePage.IsCash.Click();
            deliveryPointCreatePage.SaveButton.Click();
            deliveryPointsPage = deliveryPointCreatePage.GoTo <AdminBaseListPage>();

            deliveryPointsPage.Create.Click();
            deliveryPointCreatePage = deliveryPointsPage.GoTo <DeliveryPointCreatePage>();
            deliveryPointCreatePage.City.SetFirstValueSelect("Санкт-Петербург");
            deliveryPointCreatePage.DeliveryPointName.SetValueAndWait(deliveryPointName + "2");
            deliveryPointCreatePage.CompanyName.SetFirstValueSelect(companyName);
            deliveryPointCreatePage.Address.SetValueAndWait(deliveryPointAddress2);
            deliveryPointCreatePage.Longitude.SetValueAndWait(deliveryPointLongitude2);
            deliveryPointCreatePage.Latitude.SetValueAndWait(deliveryPointLatitude2);
            deliveryPointCreatePage.HasFittingRoom.Click();
            deliveryPointCreatePage.IsCard.Click();
            deliveryPointCreatePage.IsCash.Click();
            deliveryPointCreatePage.SaveButton.Click();
            deliveryPointsPage = deliveryPointCreatePage.GoTo <AdminBaseListPage>();
            deliveryPointsPage.Table.RowSearch.Name.SetValue(deliveryPointName);
            deliveryPointsPage = deliveryPointsPage.SeachButtonRowClickAndGo();
            deliveryPointsPage.Table.GetRow(1).Name.WaitPresence();

            var adminMaintenancePage = LoadPage <AdminMaintenancePage>("admin/maintenance/mongo_points");

            adminMaintenancePage.AlertText.WaitTextContains("Синхронизировано");
            adminMaintenancePage.AlertText.WaitTextContains("точек самовывоза");
        }
示例#11
0
        public void T01_CreateWarehouseTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminUsers.Click();
            adminPage.UsersWarehouses.Click();
            var warehousesPage = adminPage.GoTo <AdminBaseListPage>();

            warehousesPage.LabelDirectory.WaitText(@"Справочник ""Склады""");
            warehousesPage.Table.RowSearch.Name.SetValue(userWarehouseName);
            warehousesPage = warehousesPage.SeachButtonRowClickAndGo();
            while (warehousesPage.Table.GetRow(0).Name.IsPresent)
            {
                warehousesPage.Table.GetRow(0).ActionsDelete.Click();
                warehousesPage.Aletr.Accept();
                warehousesPage = warehousesPage.GoTo <AdminBaseListPage>();
                warehousesPage.Table.RowSearch.Name.SetValue(userWarehouseName);
                warehousesPage = warehousesPage.SeachButtonRowClickAndGo();
            }
            var          defaulPage = warehousesPage.LoginOut();
            UserHomePage userPage   = defaulPage.LoginAsUser(userNameAndPass, userNameAndPass);

            userPage.UseProfile.Click();
            userPage.UserWarehouses.Click();
            var warehousesListPage = userPage.GoTo <UserWarehousesPage>();

            warehousesListPage.WarehousesCreate.Click();
            var warehouseCreatePage = warehousesListPage.GoTo <UserWarehouseCreatePage>();

            warehouseCreatePage.Name.SetValueAndWait(userWarehouseName);
            warehouseCreatePage.Street.SetValueAndWait("Улица");
            warehouseCreatePage.House.SetValueAndWait("Дом");
            warehouseCreatePage.Flat.SetValueAndWait("Квартира");
            warehouseCreatePage.ContactPerson.SetValueAndWait(legalEntityName);
            warehouseCreatePage.ContactPhone.SetValueAndWait("1111111111");
            warehouseCreatePage.PostalCode.SetValueAndWait("555444");
            warehouseCreatePage.ContactEmail.SetValueAndWait(userNameAndPass);
            warehouseCreatePage.City.SetFirstValueSelect("Москва");

            for (int i = 0; i < 7; i++)
            {
                warehouseCreatePage.GetDay(i).FromHour.SetValueAndWait("1:12");
                warehouseCreatePage.GetDay(i).ToHour.SetValueAndWait("23:23");
            }

            warehouseCreatePage.CreateButton.Click();
            warehousesListPage = warehouseCreatePage.GoTo <UserWarehousesPage>();

            warehousesListPage.Table.GetRow(0).Name.WaitPresence();

            var defaultPage = warehousesListPage.LoginOut();

            adminPage = defaultPage.LoginAsAdmin(adminName, adminPass);
            var adminMaintenancePage = LoadPage <AdminMaintenancePage>("admin/maintenance/cache_flush");

            adminMaintenancePage.AlertText.WaitText("Cache flushed!");
        }
示例#12
0
        public void CreateCompatyTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Companies.Click();
            var companiesPage = adminPage.GoTo <AdminBaseListPage>();

            companiesPage.LabelDirectory.WaitText(@"Справочник ""Компании""");
            companiesPage.Table.RowSearch.Name.SetValue(companyName);
            companiesPage = companiesPage.SeachButtonRowClickAndGo();

            while (companiesPage.Table.GetRow(0).Name.IsPresent)
            {
                companiesPage.Table.GetRow(0).ActionsDelete.Click();
                companiesPage.Aletr.Accept();
                companiesPage = companiesPage.GoTo <AdminBaseListPage>();
                companiesPage.Table.RowSearch.Name.SetValue(companyName);
                companiesPage = companiesPage.SeachButtonRowClickAndGo();
            }
            companiesPage.Create.Click();
            var companyCreatePage = companiesPage.GoTo <CompanyCreatePage>();

            companyCreatePage.Name.SetValueAndWait(companyName);
            companyCreatePage.CompanyPickup.SetFirstValueSelect(companyPickupName);
            companyCreatePage.CompanyPickupAddButton.Click();
            companyCreatePage.CompanyDriver.SelectValue("Boxberry");
            companyCreatePage.CompanyAddress.SetValueAndWait("Address");
            companyCreatePage.ItemsMax.SetValueAndWait("3");
            companyCreatePage.PackingPaid.UncheckAndWait();
            companyCreatePage.PackingRequired.UncheckAndWait();
            companyCreatePage.ManagersLegalEntity.SetFirstValueSelect(legalEntityName);
            companyCreatePage.SaveButton.Click();
            companiesPage = companyCreatePage.GoTo <AdminBaseListPage>();
            var adminMaintenancePage = LoadPage <AdminMaintenancePage>("admin/maintenance/cache_flush");

            adminMaintenancePage.AlertText.WaitText("Cache flushed!");

//            удаление календаря если он был
            adminMaintenancePage.AdminCompanies.Click();
            adminMaintenancePage.Calendars.Click();
            var calendarsPage = adminMaintenancePage.GoTo <AdminBaseListPage>();

            calendarsPage.LabelDirectory.WaitText(@"Справочник ""Календарь выходных дней компании""");
            calendarsPage.Table.RowSearch.CompanyName.SetValue(companyName);
            calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            while (calendarsPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                calendarsPage.Table.GetRow(0).ActionsDelete.Click();
                calendarsPage = calendarsPage.GoTo <AdminBaseListPage>();
                calendarsPage.Table.RowSearch.CompanyName.SetValue(companyName);
                calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            }

            adminMaintenancePage = LoadPage <AdminMaintenancePage>("admin/maintenance/cache_flush");
            adminMaintenancePage.AlertText.WaitText("Cache flushed!");
        }
示例#13
0
        public void SinglePickupFalseTest()
        {
            //            Ставим нет (галочку) в компании нашей у поля Единый забор
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Companies.Click();
            var companiesPage = adminPage.GoTo <CompaniesPage>();

            companiesPage.Table.RowSearch.Name.SetValue(companyPickupName);
            companiesPage = companiesPage.SeachButtonRowClickAndGo();
            string singlePickup = companiesPage.Table.GetRow(0).SinglePickup.GetText();

            if (singlePickup == "Yes")
            {
                companiesPage.Table.GetRow(0).ActionsEdit.Click();
                var companyCreatePage = companiesPage.GoTo <CompanyCreatePage>();
                companyCreatePage.SinglePickup.Click();
                companyCreatePage.SaveButton.Click();
                companiesPage = companyCreatePage.GoTo <CompaniesPage>();
                companiesPage.Table.RowSearch.Name.SetValue(companyPickupName);
                companiesPage = companiesPage.SeachButtonRowClickAndGo();
            }
            companiesPage.Table.GetRow(0).SinglePickup.WaitText("No");

            string[] ordersID        = SendOrdersRequest();
            var      оrdersInputPage = LoadPage <OrdersInputPage>("admin/orders/");

            оrdersInputPage.Table.RowSearch.ID.SetValue(ordersID[0]);
            оrdersInputPage = оrdersInputPage.SeachButtonRowClickAndGo();
            оrdersInputPage.Table.GetRow(0).ID.WaitText(ordersID[0]);
            оrdersInputPage.Table.GetRow(0).MoreInfo.Click();

            var оrderEditPage  = оrdersInputPage.GoTo <OrderInputEditingPage>();
            var pickupDate     = DateTime.ParseExact(оrderEditPage.PickupDate.GetValue(), "yyyy-MM-dd HH:mm:ss", null);
            var transferCDDate = DateTime.ParseExact(оrderEditPage.TransferCDDate.GetValue(), "yyyy-MM-dd HH:mm:ss",
                                                     null);

//            Сравниваем даты они долны быть равны
            Assert.AreEqual(pickupDate, transferCDDate, "Дата передачи в КД должна быть равна Дате заборы");

            оrderEditPage.Orders.Click();
            оrderEditPage.OrderInput.Click();
            оrdersInputPage = оrderEditPage.GoTo <OrdersInputPage>();
            оrdersInputPage.Table.RowSearch.ID.SetValue(ordersID[1]);
            оrdersInputPage = оrdersInputPage.SeachButtonRowClickAndGo();
            оrdersInputPage.Table.GetRow(0).ID.WaitText(ordersID[1]);
            оrdersInputPage.Table.GetRow(0).MoreInfo.Click();

            оrderEditPage  = оrdersInputPage.GoTo <OrderInputEditingPage>();
            pickupDate     = DateTime.ParseExact(оrderEditPage.PickupDate.GetValue(), "yyyy-MM-dd HH:mm:ss", null);
            transferCDDate = DateTime.ParseExact(оrderEditPage.TransferCDDate.GetValue(), "yyyy-MM-dd HH:mm:ss", null);
//            Сравниваем даты они долны быть равны
            Assert.AreEqual(pickupDate, transferCDDate, "Дата передачи в КД должна быть равна Дате заборы");
        }
示例#14
0
        public void CreateUserTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminUsers.Click();
            adminPage.Users.Click();
            var usersPage = adminPage.GoTo <UsersPage>();

//            Проверяем нет ли пользователя с таким именем, если есть удаляем
            usersPage.UsersTable.RowSearch.UserEmail.SetValue(userNameAndPass);
            usersPage = usersPage.SeachButtonRowClickAndGo();
            while (usersPage.UsersTable.GetRow(0).UserEmail.IsPresent)
            {
                usersPage.UsersTable.GetRow(0).ActionsDelete.Click();
                usersPage.Aletr.Accept();
                usersPage = usersPage.GoTo <UsersPage>();
                usersPage.UsersTable.RowSearch.UserEmail.SetValue(userNameAndPass);
                usersPage = usersPage.SeachButtonRowClickAndGo();
            }
            usersPage.Create.Click();
            var userCreatePage = usersPage.GoTo <UserCreatePage>();

            userCreatePage.UserEmail.SetValueAndWait(userNameAndPass);
            userCreatePage.UserPassword.SetValueAndWait(userNameAndPass);
            userCreatePage.UserGroups.SetFirstValueSelect("user");
            userCreatePage.UserGroupsAddButton.Click();
            userCreatePage.OfficialName.SetValueAndWait(legalUserName);
            userCreatePage.SaveButton.Click();
            userCreatePage.AdminUsers.Click();
            userCreatePage.Users.Click();
            usersPage = adminPage.GoTo <UsersPage>();

            usersPage.UsersTable.RowSearch.UserEmail.SetValue(userNameAndPass);
            usersPage = usersPage.SeachButtonRowClickAndGo();
            usersPage.UsersTable.GetRow(0).UserEmail.WaitText(userNameAndPass);
        }
示例#15
0
        public void CreateSelfPriceTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Prices.Mouseover();
            adminPage.PricesSelf.Click();
            var pricesSelfPage = adminPage.GoTo <PricesPage>();

            pricesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
            pricesSelfPage = pricesSelfPage.SeachButtonRowClickAndGo();

            while (pricesSelfPage.Table.GetRow(0).CompanyName.IsPresent)
            {
                pricesSelfPage.Table.GetRow(0).ActionsDelete.Click();
                pricesSelfPage.Aletr.Accept();
                pricesSelfPage = pricesSelfPage.GoTo <PricesPage>();
                pricesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
                pricesSelfPage = pricesSelfPage.SeachButtonRowClickAndGo();
            }

            pricesSelfPage.Create.Click();
            var priceSelfCreatePage = pricesSelfPage.GoTo <PriceCreatePage>();

            priceSelfCreatePage.Price.SetValueAndWait("12");
            priceSelfCreatePage.PriceOverFlow.SetValueAndWait("4");
            priceSelfCreatePage.Route.SetFirstValueSelect("2", "г. Москва #151184 - г. Москва #151184");
            priceSelfCreatePage.CompanyName.SetFirstValueSelect(companyName);
            priceSelfCreatePage.Weight.SetFirstValueSelect(weightName);
            priceSelfCreatePage.Dimension.SetFirstValueSelect(sideName);
            priceSelfCreatePage.SaveButton.Click();
            pricesSelfPage = priceSelfCreatePage.GoTo <PricesPage>();

            pricesSelfPage.Create.Click();
            priceSelfCreatePage = pricesSelfPage.GoTo <PriceCreatePage>();
            priceSelfCreatePage.Price.SetValueAndWait("12");
            priceSelfCreatePage.PriceOverFlow.SetValueAndWait("3");
            priceSelfCreatePage.Route.SetFirstValueSelect("3", "г. Москва #151184 - г. Санкт-Петербург #151185");
            priceSelfCreatePage.CompanyName.SetFirstValueSelect(companyName);
            priceSelfCreatePage.Weight.SetFirstValueSelect(weightName);
            priceSelfCreatePage.Dimension.SetFirstValueSelect(sideName);
            priceSelfCreatePage.SaveButton.Click();
            pricesSelfPage = priceSelfCreatePage.GoTo <PricesPage>();

            pricesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
            pricesSelfPage = pricesSelfPage.SeachButtonRowClickAndGo();
            pricesSelfPage.Table.GetRow(1).CompanyName.WaitText(companyName);
        }
示例#16
0
        public void CreateSideTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.DirectoryList.Click();
            adminPage.Intervals.Mouseover();
            adminPage.IntervalsSize.Click();
            var intervalsSizePage = adminPage.GoTo <AdminBaseListPage>();

            intervalsSizePage.LabelDirectory.WaitText(@"Справочник ""Размеры""");
            intervalsSizePage.Table.RowSearch.Name.SetValue(sideName);
            intervalsSizePage = intervalsSizePage.SeachButtonRowClickAndGo();

            while (intervalsSizePage.Table.GetRow(0).Name.IsPresent)
            {
                intervalsSizePage.Table.GetRow(0).ActionsDelete.Click();
                intervalsSizePage.Aletr.Accept();
                intervalsSizePage = intervalsSizePage.GoTo <AdminBaseListPage>();
                intervalsSizePage.Table.RowSearch.Name.SetValue(sideName);
                intervalsSizePage = intervalsSizePage.SeachButtonRowClickAndGo();
            }
            intervalsSizePage.Create.Click();
            var intervalSizeCreatePage = intervalsSizePage.GoTo <IntervalSideCreatePage>();

            intervalSizeCreatePage.Name.SetValueAndWait(sideName);
            intervalSizeCreatePage.Side1Min.SetValueAndWait(side1Min.ToString());
            intervalSizeCreatePage.Side2Min.SetValueAndWait(side2Min.ToString());
            intervalSizeCreatePage.Side3Min.SetValueAndWait(side3Min.ToString());
//            intervalSizeCreatePage.SidesSumMin.SetValueAndWait(sidesSumMin.ToString());
//            intervalSizeCreatePage.VolumeMin.SetValueAndWait(volumeMin.ToString());
            intervalSizeCreatePage.SidesSumMin.SetValueAndWait("");
            intervalSizeCreatePage.VolumeMin.SetValueAndWait("");
            intervalSizeCreatePage.Side1Max.SetValueAndWait(side1Max.ToString());
            intervalSizeCreatePage.Side2Max.SetValueAndWait(side2Max.ToString());
            intervalSizeCreatePage.Side3Max.SetValueAndWait(side3Max.ToString());
//            intervalSizeCreatePage.SidesSumMax.SetValueAndWait(sidesSumMax.ToString());
//            intervalSizeCreatePage.VolumeMax.SetValueAndWait(volumeMax.ToString());
            intervalSizeCreatePage.SidesSumMax.SetValueAndWait("");
            intervalSizeCreatePage.VolumeMax.SetValueAndWait("");
            intervalSizeCreatePage.SaveButton.Click();
            intervalsSizePage = intervalSizeCreatePage.GoTo <AdminBaseListPage>();

            intervalsSizePage.Table.RowSearch.Name.SetValue(sideName);
            intervalsSizePage = intervalsSizePage.SeachButtonRowClickAndGo();
            intervalsSizePage.Table.GetRow(0).Name.WaitText(sideName);
        }
示例#17
0
        public void PickupTimetableTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.PickupTimetable.Click();
            var pickupTimetablePage = adminPage.GoTo <AdminBaseListPage>();

            pickupTimetablePage.LabelDirectory.WaitText(@"Справочник ""Время отправки забора""");
            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();

            while (pickupTimetablePage.Table.GetRow(0).Name.IsPresent)
            {
                pickupTimetablePage.Table.GetRow(0).ActionsDelete.Click();
                pickupTimetablePage = pickupTimetablePage.GoTo <AdminBaseListPage>();
                pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            }

            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            while (pickupTimetablePage.Table.GetRow(0).Name.IsPresent)
            {
                pickupTimetablePage.Table.GetRow(0).ActionsDelete.Click();
                pickupTimetablePage.Aletr.Accept();
                pickupTimetablePage = pickupTimetablePage.GoTo <AdminBaseListPage>();
                pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyName);
                pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            }

            pickupTimetablePage.Create.Click();
            var pickupTimetableCreatePage = pickupTimetablePage.GoTo <PickupTimetableCreatePage>();

            pickupTimetableCreatePage.Company.SetFirstValueSelect(companyPickupName);
            pickupTimetableCreatePage.PickupTime.SelectByText("23:45");
            pickupTimetableCreatePage.PickupPeriod.SelectByText("Сегодня");
            pickupTimetableCreatePage.SaveButton.Click();
            pickupTimetablePage = pickupTimetableCreatePage.GoTo <AdminBaseListPage>();

            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            pickupTimetablePage.Table.GetRow(0).Name.WaitText(companyPickupName);
        }
        public void CreateOrderedIttemplatesTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.OrderedIttemplates.Click();
            var orderedIttemplatesPage = adminPage.GoTo <OrderedIttemplatesPage>();

            orderedIttemplatesPage.Table.RowSearch.CompanyName.SetValue(companyName);
            orderedIttemplatesPage = orderedIttemplatesPage.SeachButtonRowClickAndGo();

            while (orderedIttemplatesPage.Table.GetRow(0).Name.IsPresent)
            {
                orderedIttemplatesPage.Table.GetRow(0).ActionsDelete.Click();
                orderedIttemplatesPage.Aletr.Accept();
                orderedIttemplatesPage = orderedIttemplatesPage.GoTo <OrderedIttemplatesPage>();
                orderedIttemplatesPage.Table.RowSearch.CompanyName.SetValue(companyName);
                orderedIttemplatesPage = orderedIttemplatesPage.SeachButtonRowClickAndGo();
            }
            orderedIttemplatesPage.Create.Click();
            var orderedIttemplatesCreatePage = orderedIttemplatesPage.GoTo <OrderedIttemplatesCreatePage>();

            orderedIttemplatesCreatePage.CompanyName.SetFirstValueSelect(companyName);
            orderedIttemplatesCreatePage.Through.SelectValue("Email");
            orderedIttemplatesCreatePage.Action.SelectValue("Отмена заказа");
            orderedIttemplatesCreatePage.ThroughEmail.SetValueAndWait(adminName);
            orderedIttemplatesCreatePage.Subject.SetValueAndWait("Отмена заказа #dd");
            orderedIttemplatesCreatePage.Message.SetValueAndWait("Сообщение на отмену заказа #dd");
            orderedIttemplatesCreatePage.SaveButton.Click();
            orderedIttemplatesPage = orderedIttemplatesCreatePage.GoTo <OrderedIttemplatesPage>();

            orderedIttemplatesPage.Create.Click();
            orderedIttemplatesCreatePage = orderedIttemplatesPage.GoTo <OrderedIttemplatesCreatePage>();
            orderedIttemplatesCreatePage.CompanyName.SetFirstValueSelect(companyName);
            orderedIttemplatesCreatePage.Through.SelectValue("Email");
            orderedIttemplatesCreatePage.Action.SelectValue("Редактирование заказа");
            orderedIttemplatesCreatePage.ThroughEmail.SetValueAndWait(adminName);
            orderedIttemplatesCreatePage.Subject.SetValueAndWait("Редактирование заказа #dd");
            orderedIttemplatesCreatePage.Message.SetValueAndWait("список измененных полей и новых значений: #changed");
            orderedIttemplatesCreatePage.SaveButton.Click();
            orderedIttemplatesPage = orderedIttemplatesCreatePage.GoTo <OrderedIttemplatesPage>();
        }
示例#19
0
        public void T10_DeletуOrderedIttemplatesTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.OrderedIttemplates.Click();
            var orderedIttemplatesPage = adminPage.GoTo <OrderedIttemplatesPage>();

            orderedIttemplatesPage.Table.RowSearch.CompanyName.SetValue(companyName);
            orderedIttemplatesPage = orderedIttemplatesPage.SeachButtonRowClickAndGo();

            while (orderedIttemplatesPage.Table.GetRow(0).Name.IsPresent)
            {
                orderedIttemplatesPage.Table.GetRow(0).ActionsDelete.Click();
                orderedIttemplatesPage.Aletr.Accept();
                orderedIttemplatesPage = orderedIttemplatesPage.GoTo <OrderedIttemplatesPage>();
                orderedIttemplatesPage.Table.RowSearch.CompanyName.SetValue(companyName);
                orderedIttemplatesPage = orderedIttemplatesPage.SeachButtonRowClickAndGo();
            }
        }
示例#20
0
        public void T06_DeleteCalendarsTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            //            удаление календаря если он был
            adminPage.AdminCompanies.Click();
            adminPage.Calendars.Click();
            var calendarsPage = adminPage.GoTo <AdminBaseListPage>();

            calendarsPage.Table.RowSearch.CompanyName.SetValue(companyName);
            calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            while (calendarsPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                calendarsPage.Table.GetRow(0).ActionsDelete.Click();
                calendarsPage.Aletr.Accept();
                calendarsPage = calendarsPage.GoTo <AdminBaseListPage>();
                calendarsPage.Table.RowSearch.CompanyName.SetValue(companyName);
                calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            }
        }
示例#21
0
        public void T11_DeletуPaymentPriceTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.PaymentPrice.Click();
            var рaymentPricePage = adminPage.GoTo <AdminBaseListPage>();

            рaymentPricePage.Table.RowSearch.CompanyName.SetValue(companyName);
            рaymentPricePage = рaymentPricePage.SeachButtonRowClickAndGo();

            while (рaymentPricePage.Table.GetRow(0).Name.IsPresent)
            {
                рaymentPricePage.Table.GetRow(0).ActionsDelete.Click();
                рaymentPricePage.Aletr.Accept();
                рaymentPricePage = рaymentPricePage.GoTo <AdminBaseListPage>();
                рaymentPricePage.Table.RowSearch.CompanyName.SetValue(companyName);
                рaymentPricePage = рaymentPricePage.SeachButtonRowClickAndGo();
            }
        }
示例#22
0
        public void T09_DeleteSizeTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.DirectoryList.Click();
            adminPage.Intervals.Mouseover();
            adminPage.IntervalsSize.Click();
            var intervalsSizePage = adminPage.GoTo <AdminBaseListPage>();

            intervalsSizePage.Table.RowSearch.Name.SetValue(sideName);
            intervalsSizePage = intervalsSizePage.SeachButtonRowClickAndGo();

            while (intervalsSizePage.Table.GetRow(0).Name.IsPresent)
            {
                intervalsSizePage.Table.GetRow(0).ActionsDelete.Click();
                intervalsSizePage.Aletr.Accept();
                intervalsSizePage = intervalsSizePage.GoTo <AdminBaseListPage>();
                intervalsSizePage.Table.RowSearch.Name.SetValue(sideName);
                intervalsSizePage = intervalsSizePage.SeachButtonRowClickAndGo();
            }
        }
示例#23
0
        public void CreatePricePickupTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Prices.Mouseover();
            adminPage.PricesPickup.Click();
            var pricesPickupPage = adminPage.GoTo <PricesPickupPage>();

            pricesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pricesPickupPage = pricesPickupPage.SeachButtonRowClickAndGo();

            while (pricesPickupPage.Table.GetRow(0).CompanyName.IsPresent)
            {
                pricesPickupPage.Table.GetRow(0).ActionsDelete.Click();
                pricesPickupPage.Aletr.Accept();
                pricesPickupPage = pricesPickupPage.GoTo <PricesPickupPage>();
                pricesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                pricesPickupPage = pricesPickupPage.SeachButtonRowClickAndGo();
            }
            pricesPickupPage.Create.Click();
            var pricePickupCreatePage = pricesPickupPage.GoTo <PricePickupCreatePage>();

            pricePickupCreatePage.CompanyName.SetFirstValueSelect(companyPickupName);
            pricePickupCreatePage.City.SetFirstValueSelect("Москва");
            pricePickupCreatePage.Price.SetValueAndWait("10");
            pricePickupCreatePage.PriceOverFlow.SetValueAndWait("2");
            pricePickupCreatePage.Weight.SetFirstValueSelect(weightName);
            pricePickupCreatePage.Dimension.SetFirstValueSelect(sideName);
            pricePickupCreatePage.SaveButton.Click();
            pricesPickupPage = pricePickupCreatePage.GoTo <PricesPickupPage>();

            pricesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pricesPickupPage = pricesPickupPage.SeachButtonRowClickAndGo();
            pricesPickupPage.Table.GetRow(0).CompanyName.WaitText(companyPickupName);
        }
        public void PickupDateNullAndСalendarTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.PickupTimetable.Click();
            var pickupTimetablePage = adminPage.GoTo <AdminBaseListPage>();

            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            //            создаем график забора на сегодняшнюю дату 23:45
            while (pickupTimetablePage.Table.GetRow(0).Name.IsPresent)
            {
                pickupTimetablePage.Table.GetRow(0).ActionsDelete.Click();
                pickupTimetablePage.Aletr.Accept();
                pickupTimetablePage = pickupTimetablePage.GoTo <AdminBaseListPage>();
                pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            }
            pickupTimetablePage.Create.Click();
            var pickupTimetableCreatePage = pickupTimetablePage.GoTo <PickupTimetableCreatePage>();

            pickupTimetableCreatePage.Company.SetFirstValueSelect(companyPickupName);
            pickupTimetableCreatePage.PickupTime.SelectByText("23:45");
            pickupTimetableCreatePage.PickupPeriod.SelectByText("Сегодня");
            pickupTimetableCreatePage.SaveButton.Click();
            pickupTimetablePage = pickupTimetableCreatePage.GoTo <AdminBaseListPage>();
            //           удаляем календарь если он был
            //          делаем выходной на сегодня
            pickupTimetablePage.AdminCompanies.Click();
            pickupTimetablePage.Calendars.Click();
            var calendarsPage = pickupTimetablePage.GoTo <AdminBaseListPage>();

            calendarsPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            while (calendarsPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                calendarsPage.Table.GetRow(0).ActionsDelete.Click();
                calendarsPage.Aletr.Accept();
                calendarsPage = calendarsPage.GoTo <AdminBaseListPage>();
                calendarsPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            }
            calendarsPage.Create.Click();
            var calendarCreatePage = calendarsPage.GoTo <CalendarCreatePage>();

            calendarCreatePage.Type.SelectByText("Забор");
            calendarCreatePage.Company.SetFirstValueSelect(companyPickupName);
            calendarCreatePage.Date.SetValueAndWait(nowDate.AddDays(1).ToString("dd.MM.yyyy"));
            calendarCreatePage.SaveButton.Click();
            calendarsPage = calendarCreatePage.GoTo <AdminBaseListPage>();

            string orderID         = SendOrderSelfRequest();
            var    sendingTime     = DateTime.Now;
            var    оrdersInputPage = LoadPage <OrdersInputPage>("admin/orders/");

            оrdersInputPage.Table.RowSearch.ID.SetValue(orderID);
            оrdersInputPage = оrdersInputPage.SeachButtonRowClickAndGo();
            оrdersInputPage.Table.GetRow(0).ID.WaitText(orderID);
            оrdersInputPage.Table.GetRow(0).MoreInfo.Click();

            var оrderEditPage     = оrdersInputPage.GoTo <OrderInputEditingPage>();
            var processDateExpect = оrderEditPage.ProcessDate.GetValue();
            var pickupDateExpect  = оrderEditPage.PickupDate.GetValue();
//            так как в графике забора стоит сегоднешняя дата, 23:45; дата процессинга ближайщая не прошедшая дата в этом графике
            var processDate = nowDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) + " 23:45:00";

            Assert.AreEqual(processDateExpect, processDate);

//            дата забора ожидаема равна дате процессинга + час
            var pickupDate = DateTime.ParseExact(processDate, "yyyy-MM-dd HH:mm:ss", null)
                             .AddHours(1)
                             .ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);

            Assert.AreEqual(pickupDateExpect, pickupDate);
        }
        public void PickupDateNotNullAndСalendarTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.PickupTimetable.Click();
            var pickupTimetablePage = adminPage.GoTo <AdminBaseListPage>();

            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();

            while (pickupTimetablePage.Table.GetRow(0).Name.IsPresent)
            {
                pickupTimetablePage.Table.GetRow(0).ActionsDelete.Click();
                pickupTimetablePage.Aletr.Accept();
                pickupTimetablePage = pickupTimetablePage.GoTo <AdminBaseListPage>();
                pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            }
            pickupTimetablePage.Create.Click();
            var pickupTimetableCreatePage = pickupTimetablePage.GoTo <PickupTimetableCreatePage>();

            pickupTimetableCreatePage.Company.SetFirstValueSelect(companyPickupName);
            pickupTimetableCreatePage.PickupTime.SelectByText("23:45");
            pickupTimetableCreatePage.PickupPeriod.SelectByText("Сегодня");
            pickupTimetableCreatePage.SaveButton.Click();
            pickupTimetablePage = pickupTimetableCreatePage.GoTo <AdminBaseListPage>();

            //           удаляем календарь если он был
            //создаем в каледнаре выходной на дату забора
            pickupTimetablePage.AdminCompanies.Click();
            pickupTimetablePage.Calendars.Click();
            var calendarsPage = pickupTimetablePage.GoTo <AdminBaseListPage>();

            calendarsPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            while (calendarsPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                calendarsPage.Table.GetRow(0).ActionsDelete.Click();
                calendarsPage.Aletr.Accept();
                calendarsPage = calendarsPage.GoTo <AdminBaseListPage>();
                calendarsPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            }
            calendarsPage.Create.Click();
            var pickupDate = nowDate.AddDays(2).AddHours(1).AddMinutes(15);
//          делаем выходной на дату забора которую укажем в АПИ запросе
            var calendarCreatePage = calendarsPage.GoTo <CalendarCreatePage>();

            calendarCreatePage.Type.SelectByText("Забор");
            calendarCreatePage.Company.SetFirstValueSelect(companyPickupName);
            calendarCreatePage.Date.SetValueAndWait(pickupDate.ToString("dd.MM.yyyy"));
            calendarCreatePage.SaveButton.Click();
            calendarsPage = calendarCreatePage.GoTo <AdminBaseListPage>();

            string orderID         = SendOrderCourirsRequest(pickupDate);
            var    оrdersInputPage = LoadPage <OrdersInputPage>("admin/orders/");

            оrdersInputPage.Table.RowSearch.ID.SetValue(orderID);
            оrdersInputPage = оrdersInputPage.SeachButtonRowClickAndGo();
            оrdersInputPage.Table.GetRow(0).ID.WaitText(orderID);
            оrdersInputPage.Table.GetRow(0).MoreInfo.Click();

            var оrderEditPage = оrdersInputPage.GoTo <OrderInputEditingPage>();
            //            формат даты "yyyy-MM-dd HH:mm:ss" такой
            var processDateExpect = оrderEditPage.ProcessDate.GetValue();
            var pickupDateExpect  = оrderEditPage.PickupDate.GetValue();
            //            дата процессинга равна ближайшей дате предыдущей забора 23:45
            var processDate = pickupDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) + " 23:45:00";

            Assert.AreEqual(processDateExpect, processDate);

            //            дата забора равна той дате что отправляем в API + 1 день так как в дату забора выходной
            Assert.AreEqual(pickupDateExpect, pickupDate.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture));
        }
        public void PickupDateNotNullTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.PickupTimetable.Click();
            var pickupTimetablePage = adminPage.GoTo <AdminBaseListPage>();

            pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            //            создаем график забора на сегоднешнею дату 23:45
            while (pickupTimetablePage.Table.GetRow(0).Name.IsPresent)
            {
                pickupTimetablePage.Table.GetRow(0).ActionsDelete.Click();
                pickupTimetablePage.Aletr.Accept();
                pickupTimetablePage = pickupTimetablePage.GoTo <AdminBaseListPage>();
                pickupTimetablePage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                pickupTimetablePage = pickupTimetablePage.SeachButtonRowClickAndGo();
            }
            pickupTimetablePage.Create.Click();
            var pickupTimetableCreatePage = pickupTimetablePage.GoTo <PickupTimetableCreatePage>();

            pickupTimetableCreatePage.Company.SetFirstValueSelect(companyPickupName);
            pickupTimetableCreatePage.PickupTime.SelectByText("23:45");
            pickupTimetableCreatePage.PickupPeriod.SelectByText("Сегодня");
            pickupTimetableCreatePage.SaveButton.Click();
            pickupTimetablePage = pickupTimetableCreatePage.GoTo <AdminBaseListPage>();
//           удаляем календарь если он был
            pickupTimetablePage.AdminCompanies.Click();
            pickupTimetablePage.Calendars.Click();
            var calendarsPage = pickupTimetablePage.GoTo <AdminBaseListPage>();

            calendarsPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            while (calendarsPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                calendarsPage.Table.GetRow(0).ActionsDelete.Click();
                calendarsPage.Aletr.Accept();
                calendarsPage = calendarsPage.GoTo <AdminBaseListPage>();
                calendarsPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            }
//            дата забора которую передаем в запросе
            var    pickupDate      = nowDate.AddDays(2).AddHours(1).AddMinutes(15);
            string orderID         = SendOrderSelfRequest(pickupDate);
            var    оrdersInputPage = LoadPage <OrdersInputPage>("admin/orders/");

            оrdersInputPage.Table.RowSearch.ID.SetValue(orderID);
            оrdersInputPage = оrdersInputPage.SeachButtonRowClickAndGo();
            оrdersInputPage.Table.GetRow(0).ID.WaitText(orderID);
            оrdersInputPage.Table.GetRow(0).MoreInfo.Click();

            var оrderEditPage     = оrdersInputPage.GoTo <OrderInputEditingPage>();
            var processDateExpect = оrderEditPage.ProcessDate.GetValue();
            var pickupDateExpect  = оrderEditPage.PickupDate.GetValue();
//              дата процессинга на день рашь даты забора,ближайший повремени
            var processDate = pickupDate.AddDays(-1).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) + " 23:45:00";

            Assert.AreEqual(processDateExpect, processDate);

//            дата забора равна той дате что отправляем в API
            Assert.AreEqual(pickupDateExpect, pickupDate.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture));
        }
示例#27
0
        public void T03_DeletePriceTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Prices.Mouseover();
            adminPage.PricesPickup.Click();
            var pricesPickupPage = adminPage.GoTo <PricesPickupPage>();

            pricesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
            pricesPickupPage = pricesPickupPage.SeachButtonRowClickAndGo();

            while (pricesPickupPage.Table.GetRow(0).CompanyName.IsPresent)
            {
                pricesPickupPage.Table.GetRow(0).ActionsDelete.Click();
                pricesPickupPage.Aletr.Accept();
                pricesPickupPage = pricesPickupPage.GoTo <PricesPickupPage>();
                pricesPickupPage.Table.RowSearch.CompanyName.SetValue(companyPickupName);
                pricesPickupPage = pricesPickupPage.SeachButtonRowClickAndGo();
            }

            pricesPickupPage.Table.RowSearch.CompanyName.SetValue(companyName);
            pricesPickupPage = pricesPickupPage.SeachButtonRowClickAndGo();

            while (pricesPickupPage.Table.GetRow(0).CompanyName.IsPresent)
            {
                pricesPickupPage.Table.GetRow(0).ActionsDelete.Click();
                pricesPickupPage.Aletr.Accept();
                pricesPickupPage = pricesPickupPage.GoTo <PricesPickupPage>();
                pricesPickupPage.Table.RowSearch.CompanyName.SetValue(companyName);
                pricesPickupPage = pricesPickupPage.SeachButtonRowClickAndGo();
            }
            pricesPickupPage.AdminCompanies.Click();
            pricesPickupPage.Prices.Mouseover();
            pricesPickupPage.PricesCourier.Click();
            var pricesCourierPage = adminPage.GoTo <PricesPage>();

            pricesCourierPage.Table.RowSearch.CompanyName.SetValue(companyName);
            pricesCourierPage = pricesCourierPage.SeachButtonRowClickAndGo();

            while (pricesCourierPage.Table.GetRow(0).CompanyName.IsPresent)
            {
                pricesCourierPage.Table.GetRow(0).ActionsDelete.Click();
                pricesCourierPage.Aletr.Accept();
                pricesCourierPage = pricesCourierPage.GoTo <PricesPage>();
                pricesCourierPage.Table.RowSearch.CompanyName.SetValue(companyName);
                pricesCourierPage = pricesCourierPage.SeachButtonRowClickAndGo();
            }

            pricesCourierPage.AdminCompanies.Click();
            pricesCourierPage.Prices.Mouseover();
            pricesCourierPage.PricesSelf.Click();
            var pricesSelfPage = adminPage.GoTo <PricesPage>();

            pricesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
            pricesSelfPage = pricesSelfPage.SeachButtonRowClickAndGo();

            while (pricesSelfPage.Table.GetRow(0).CompanyName.IsPresent)
            {
                pricesSelfPage.Table.GetRow(0).ActionsDelete.Click();
                pricesSelfPage.Aletr.Accept();
                pricesSelfPage = pricesSelfPage.GoTo <PricesPage>();
                pricesSelfPage.Table.RowSearch.CompanyName.SetValue(companyName);
                pricesSelfPage = pricesSelfPage.SeachButtonRowClickAndGo();
            }
        }
示例#28
0
        public void SinglePickupTrueNotСalendarTest()
        {
//            Ставим Да (галочку) в компании нашей у поля Единый забор
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Companies.Click();
            var companiesPage = adminPage.GoTo <CompaniesPage>();

            companiesPage.Table.RowSearch.Name.SetValue(companyPickupName);
            companiesPage = companiesPage.SeachButtonRowClickAndGo();
            string singlePickup = companiesPage.Table.GetRow(0).SinglePickup.GetText();

            if (singlePickup == "No")
            {
                companiesPage.Table.GetRow(0).ActionsEdit.Click();
                var companyCreatePage = companiesPage.GoTo <CompanyCreatePage>();
                companyCreatePage.SinglePickup.Click();
                companyCreatePage.SaveButton.Click();
                companiesPage = companyCreatePage.GoTo <CompaniesPage>();
                companiesPage.Table.RowSearch.Name.SetValue(companyPickupName);
                companiesPage = companiesPage.SeachButtonRowClickAndGo();
            }
            companiesPage.Table.GetRow(0).SinglePickup.WaitText("Yes");

//           удаляем календарь если он был
            //создаем в каледнаре выходной на завтрашнию дату у этой компании доставки
            companiesPage.AdminCompanies.Click();
            companiesPage.Calendars.Click();
            var calendarsPage = companiesPage.GoTo <AdminBaseListPage>();

            calendarsPage.Table.RowSearch.CompanyName.SetValue(companyName);
            calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            while (calendarsPage.Table.GetRow(0).ColumnThree.IsPresent)
            {
                calendarsPage.Table.GetRow(0).ActionsDelete.Click();
                calendarsPage.Aletr.Accept();
                calendarsPage = calendarsPage.GoTo <AdminBaseListPage>();
                calendarsPage.Table.RowSearch.CompanyName.SetValue(companyName);
                calendarsPage = calendarsPage.SeachButtonRowClickAndGo();
            }

            string[] ordersID        = SendOrdersRequest();
            var      оrdersInputPage = LoadPage <OrdersInputPage>("admin/orders/");

            оrdersInputPage.Table.RowSearch.ID.SetValue(ordersID[0]);
            оrdersInputPage = оrdersInputPage.SeachButtonRowClickAndGo();
            оrdersInputPage.Table.GetRow(0).ID.WaitText(ordersID[0]);
            оrdersInputPage.Table.GetRow(0).MoreInfo.Click();

            var      оrderEditPage  = оrdersInputPage.GoTo <OrderInputEditingPage>();
            DateTime pickupDate     = DateTime.ParseExact(оrderEditPage.PickupDate.GetValue(), "yyyy-MM-dd HH:mm:ss", null);
            DateTime transferCDDate = DateTime.ParseExact(оrderEditPage.TransferCDDate.GetValue(), "yyyy-MM-dd HH:mm:ss",
                                                          null);

//            пребовляем два дня к pickupDate так как по формуле следующий день который не выходной
            Assert.AreEqual(pickupDate.AddDays(1), transferCDDate, "Дата передачи в КД должна быть равна следующему рабочему" +
                            " дню по календарю компании доставки от Даты заборы");

            оrderEditPage.Orders.Click();
            оrderEditPage.OrderInput.Click();
            оrdersInputPage = оrderEditPage.GoTo <OrdersInputPage>();
            оrdersInputPage.Table.RowSearch.ID.SetValue(ordersID[1]);
            оrdersInputPage = оrdersInputPage.SeachButtonRowClickAndGo();
            оrdersInputPage.Table.GetRow(0).ID.WaitText(ordersID[1]);
            оrdersInputPage.Table.GetRow(0).MoreInfo.Click();

            оrderEditPage  = оrdersInputPage.GoTo <OrderInputEditingPage>();
            pickupDate     = DateTime.ParseExact(оrderEditPage.PickupDate.GetValue(), "yyyy-MM-dd HH:mm:ss", null);
            transferCDDate = DateTime.ParseExact(оrderEditPage.TransferCDDate.GetValue(), "yyyy-MM-dd HH:mm:ss", null);

            //            пребовляем два дня к pickupDate так как по формуле следующий день который не выходной
            Assert.AreEqual(pickupDate.AddDays(1), transferCDDate, "Дата передачи в КД должна быть равна следующему рабочему" +
                            " дню по календарю компании доставки от Даты заборы");
        }
示例#29
0
        public void ClickAllCompaniesListEditTest()
        {
            AdminHomePage adminPage = LoginAsAdmin(adminName, adminPass);

            adminPage.AdminCompanies.Click();
            adminPage.Companies.Click();
            var companiesPage = adminPage.GoTo <CompaniesPage>();

            companiesPage.Table.GetRow(0).ActionsEdit.Click();
            var editPage = companiesPage.GoTo <AdminBaseListCreatePage>();

            editPage.LabelDirectory.WaitTextContains("Компания");

            editPage.AdminCompanies.Click();
            editPage.Calendars.Click();
            var page = editPage.GoTo <AdminBaseListPage>();

            page.LabelDirectory.WaitText(@"Справочник ""Календарь выходных дней компании""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Календарь выходных дней компании""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.PickupTimetable.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Время отправки забора""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Время отправки забора""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.CompanyWarehouses.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Склады компаний""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains("Склад компании");

            editPage.AdminCompanies.Click();
            editPage.DeliveryPoints.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Пункты выдачи""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Пункты выдачи""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Managers.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Менеджеры""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Менеджеры""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.PaymentPrice.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Возможность наложенного платежа""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Возможность наложенного платежа""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.SmsTemplates.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""SMS-шаблоны""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""SMS-шаблоны""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.OrderEditTemplates.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Редактирование заявок - шаблоны""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Редактирование заявок - шаблоны""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Times.Mouseover();
            editPage.TimesCourier.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Сроки доставки курьерки""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Сроки доставки курьерки""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Times.Mouseover();
            editPage.TimesPickup.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Время забора""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Время забора""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Times.Mouseover();
            editPage.TimesSelf.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Сроки доставки""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Сроки доставки""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Prices.Mouseover();
            editPage.PricesCourier.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Цены на курьерку""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Цены на курьерку""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Prices.Mouseover();
            editPage.PricesPickup.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Цены забора""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Цены забора""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Prices.Mouseover();
            editPage.PricesSelf.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Цены на самовывоз""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Цены на самовывоз""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Prices.Mouseover();
            editPage.PricesPacking.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Упаковка""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Упаковка""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Fees.Mouseover();
            editPage.FeesValue.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Комиссия""");
            if (page.Table.GetRow(0).ActionsEdit.IsPresent)
            {
                page.Table.GetRow(0).ActionsEdit.Click();
                editPage = page.GoTo <AdminBaseListCreatePage>();
                editPage.LabelDirectory.WaitTextContains(@"""Комиссия""");
                editPage.LabelDirectory.WaitTextContains(@"Edit record");

                editPage.AdminCompanies.Click();
                editPage.Fees.Mouseover();
                editPage.FeesDeclaredPrice.Click();
                page = editPage.GoTo <AdminBaseListPage>();
            }
            else
            {
                page.AdminCompanies.Click();
                page.Fees.Mouseover();
                page.FeesDeclaredPrice.Click();
                page = page.GoTo <AdminBaseListPage>();
            }
            page.LabelDirectory.WaitText(@"Справочник ""Комиссия страховки""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"""Комиссия страховки""");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Fees.Mouseover();
            editPage.FeesPaymentPrice.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Комиссия на наложенный платеж""");
            page.Table.GetRow(0).ActionsEdit.Click();
            editPage = page.GoTo <AdminBaseListCreatePage>();
            editPage.LabelDirectory.WaitTextContains(@"Комиссия на наложенный платеж");
            editPage.LabelDirectory.WaitTextContains(@"Edit record");

            editPage.AdminCompanies.Click();
            editPage.Margins.Mouseover();
            editPage.MarginsValue.Click();
            page = editPage.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Наценки""");

            page.AdminCompanies.Click();
            page.Margins.Mouseover();
            page.MargindisCounts.Click();
            page = page.GoTo <AdminBaseListPage>();
            page.LabelDirectory.WaitText(@"Справочник ""Скидки""");
            if (page.Table.GetRow(0).ActionsEdit.IsPresent)
            {
                page.Table.GetRow(0).ActionsEdit.Click();
                editPage = page.GoTo <AdminBaseListCreatePage>();
                editPage.LabelDirectory.WaitTextContains(@"""Скидки""");
                editPage.LabelDirectory.WaitTextContains(@"Edit record");
            }
        }