Пример #1
0
        //[Test, Retry(2), Category("CreateLoad")]
        //[NonParallelizable]
        public void CreateMultiStopLoadShipmentBuilder()
        {
            addEditLoadPage = new AddEditLoadPage();
            addEditLoadPage.SearchAndSelectAccountById(load.OptiCustomerId)
            .SelectMode(load.OptiMode)
            .SetPricing(load.OptiExpectedRevenue, load.OptiExpectedCost)
            .SaveLoad()
            .UpdateCargoValue(load.OptiCargoValue)
            .UpdateTenderType(load.OptiTenderType)
            .AddPickStop(load.OptiPickWarehouseG, addEditLoadPage.GetLoadDate(load.OptiPickStartDate, 1, 11), addEditLoadPage.GetLoadDate(load.OptiPickEndDate, 1, 13))
            .AddMultiDropStop(load.OptiDropWarehouseGList, addEditLoadPage.GetLoadDate(load.OptiDropStartDateList, 2, 11), addEditLoadPage.GetLoadDate(load.OptiDropEndDateList, 2, 13))
            .EnterEquipment(load.OptiEquipment)
            .AddItem(load.OptiItemDescription, load.OptiItemMinWeight, load.OptiItemMaxWeight)
            .AddMoney(load.OptiMaxBuy)
            .EnterNotes(load.OptiIntNotes, load.OptiExtNotes)
            .AssignToCarrierSales(load.OptiAssignToCarrier)
            .SubmitShipment();
            Assert.IsTrue(addEditLoadPage.LoadCreated());
            string loadIdCreated = addEditLoadPage.GetLoadIdCreated();

            addEditLoadPage.ViewShipment();
            loadDetailsPage = new LoadDetailsPage();
            Assert.IsTrue(loadDetailsPage.LoadDisplayed());
            string loadIdDisplayed = loadDetailsPage.GetLoadIdDisplayed();

            Assert.AreEqual(loadIdCreated, loadIdDisplayed);
        }
Пример #2
0
        public void StartWaterfallProcessInProgress()
        {
            string       customerId = load.OptiCustomerId;
            string       carrierId  = load.OptiCarrierId;
            string       uniqueName = "qa" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
            AccountsPage optimizerAccountsPageElements = new AccountsPage()
                                                         .SyncCustomerWithTlrg(customerId);
            SettingsPage settingsPage = new SettingsPage()
                                        .ClickCustomerSettingsGeneralLink()
                                        .SearchAndSelectCustomer(customerId)
                                        .SetCustomerGeneralFields("2", "125", "1", uniqueName + "@echo.com", "(GMT -6:00) Central Time (US & Canada), Mexico City")
                                        .ClickSaveButton()
                                        .WaitForSaveConfirmation()
                                        .SyncNewCarrier(carrierId);
            PricingUploadPage pricingUploadPage = new PricingUploadPage()
                                                  .UploadLineHaulRates(customerId, carrierId, uniqueName);

            CreateLoadShipmentBuilder();
            string expectedLoadId = loadDetailsPage.GetLoadIdDisplayed();

            loadDetailsPage.ClickElement(loadDetailsPage.StartTlrgButton);
            string actualWarning   = driver.FindElementBy(loadDetailsPage.LoadWarning).Text;
            string expectedWarning = "You are currently viewing a READ ONLY version of this page. No changes are allowed.";
            string expectedStatus  = "In Progress";

            Assert.AreEqual(expectedWarning, actualWarning);
            HomePage homePage = new HomePage();

            homePage.ClickAllTab()
            .WaitForStartTlrgLoad(expectedLoadId, customerId, expectedStatus)
            .SearchAndSelectCustomer(customerId)
            .FilterLoads(homePage.LoadIdField, expectedLoadId);
            IList <string> actualLoad = homePage.GetLoadAtIndex(0);
            HomePageTable  table      = new HomePageTable();
            HomePageRow    row        = table.GetRowByLoadId(expectedLoadId);

            Assert.AreEqual(expectedLoadId, row.LoadId);
            Assert.AreEqual(expectedStatus, row.Status);
        }