Ejemplo n.º 1
0
        public void End_To_End()
        {
            // arrange
            string     testrunId     = Guid.NewGuid().ToString("N");
            PitstopApp pitstop       = new PitstopApp(testrunId, TestConstants.PitstopStartUrl);
            var        homePage      = pitstop.Start();
            string     licenseNumber = TestDataGenerators.GenerateRandomLicenseNumber();

            // act
            pitstop.Menu
            .CustomerManagement()
            .RegisterCustomer()
            .Cancel()
            .RegisterCustomer()
            .FillCustomerDetails(
                $"TestCustomer {testrunId}", "Verzonnenstraat 21",
                "Uitdeduimerveen", "1234 AZ", "+31612345678", "*****@*****.**")
            .Submit()
            .SelectCustomer($"TestCustomer {testrunId}")
            .Back();

            pitstop.Menu
            .VehicleManagement()
            .RegisterVehicle()
            .Cancel()
            .RegisterVehicle()
            .FillVehicleDetails(licenseNumber, "Testla", "Model T", $"TestCustomer {testrunId}")
            .Submit()
            .SelectVehicle(licenseNumber)
            .Back();

            pitstop.Menu
            .WorkshopManagement()
            .RegisterMaintenanceJob()
            .Cancel()
            .RegisterMaintenanceJob()
            .FillJobDetails("08:00", "12:00", $"Job {testrunId}", licenseNumber)
            .Submit()
            .SelectMaintenanceJob($"Job {testrunId}")
            .Back();

            pitstop.Menu
            .WorkshopManagement()
            .SelectMaintenanceJob($"Job {testrunId}")
            .GetJobStatus(out string beforeJobStatus)
            .Complete()
            .FillJobDetails("08:00", "11:00", $"Mechanic notes {testrunId}")
            .Complete()
            .GetJobStatus(out string afterJobStatus)
            .Back();

            // assert
            Assert.Equal("Planned", beforeJobStatus);
            Assert.Equal("Completed", afterJobStatus);

            // cleanup
            pitstop.Stop();
        }
Ejemplo n.º 2
0
        public void MainMenu_About()
        {
            // arrange
            Guid       testrunId = Guid.NewGuid();
            PitstopApp pitstop   = new PitstopApp(testrunId, TestConstants.PitstopStartUrl);
            var        homePage  = pitstop.Start();

            // act
            var page = pitstop.Menu
                       .About();

            // assert
            Assert.True(page.IsActive());

            // cleanup
            pitstop.Stop();
        }