Beispiel #1
0
        public void NewSale_WhenSubmitSale_SaleLogWillAddedToDiary()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.GoToNewSale().SelectCourseAndGoToPaymentPage().SelectPaymentAndCompleteSale();
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.Sale));
        }
Beispiel #2
0
        public void Setup()
        {
            //Runs once before every test

            //var driverService = PhantomJSDriverService.CreateDefaultService();
            //driverService.HideCommandPromptWindow = true;
            //driverService.IgnoreSslErrors = true;
            //driver = new PhantomJSDriver(driverService);


            //   DesiredCapabilities capability = DesiredCapabilities.Firefox();
            //   capability.SetCapability("platform", "WIN10");
            //   capability.SetCapability("version", "46");
            //driver = new RemoteWebDriver(
            //     new Uri("http://127.0.0.1:4444/wd/hub/"), capability, TimeSpan.FromSeconds(600));



            driver = new ChromeDriver();
            driver.Navigate().GoToUrl("https://auto-buy-gz-user1.geico.com/");

            try
            {
                IWebElement overrideLink = driver.FindElement(By.Id("overridelink"));
                overrideLink.Click();
            }
            catch (Exception) { }

            customer = new CustomerPage(driver);
            vehicle  = new VehiclePage(driver);
        }
Beispiel #3
0
Datei: Form1.cs Projekt: ColtW/UI
        // when the login button is pushed it will search the database by username
        // then read the username and password for that record and move on if they match
        // the input or give an error if they do not match.
        private void btnLogin_Click(object sender, EventArgs e)
        {
            SqlConnection connection = new SqlConnection();

            connection.ConnectionString = "Server=cis1.actx.edu;Database=project2;User Id=db2;Password = db20;";
            connection.Open();

            //login check

            using (SqlCommand findUsername = connection.CreateCommand())
            {
                findUsername.CommandText = "select * from dbo.Customers where Username = '******'";
                using (SqlDataReader reader = findUsername.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        user = reader.GetString(5);
                        pass = reader.GetString(6);
                    }
                }
            }

            if (user == textBox1.Text && pass == textBox2.Text)
            {
                TeamBWindowsFormCustomerPage.CustomerPage loginSuccess = new CustomerPage();
                loginSuccess.Activate();
                loginSuccess.Visible = true;
                this.Visible         = false;
            }
            else
            {
                MessageBox.Show("Incorrect credentials, try again.");
            }
        }
Beispiel #4
0
        private void customer_page(object sender, RoutedEventArgs e)
        {
            CustomerPage win = new CustomerPage();

            win.Show();
            this.Close();
        }
Beispiel #5
0
        public void TransferCustomer()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.ClickOnTheMenuAndGoToTransferPage().TransferCustomer();
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.Transfer));
        }
Beispiel #6
0
        public void DeleteCustomer()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Delete Customer
            custObj.DeleteCustomer(driver);
        }
Beispiel #7
0
        public void CancelSale()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.GoToNewSale().SelectCourseAndGoToPaymentPage().SelectPaymentAndCompleteSale();
            lead.ClickOnCancelButtonAndGoToCancelSale().CancelSale();
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.SaleCancelled));
        }
Beispiel #8
0
        public void ChangeSale()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.GoToNewSale().SelectCourseAndGoToPaymentPage().SelectPaymentAndCompleteSale();
            lead.ChangelSaleAndGoToSalePage().ChangeOptionAndSubmitSale();
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.ChangeaSale));
        }
Beispiel #9
0
        public void GivenIHaveSelectedCustomerPage()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //create new Customer
            custObj.AddCustomer(driver);
        }
Beispiel #10
0
        public void ThenIShoudBeAbleToAddNewCustomerWithValidData()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //create new Customer
            custObj.AddCustomer(driver);
        }
Beispiel #11
0
        public void ThenIShouldBeAbleToEditCustomerWithValidData()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Edit Customer
            custObj.EditCustomer(driver);
        }
Beispiel #12
0
        public void AlertAdded()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.GoToAlertPage().AddAlert("test alert");
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.AlertAdded));
            Assert.AreEqual("test alert", lead.AllLogs.First <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.AlertAdded).ClickToSeeAlertSummary().AlertMessage);
        }
Beispiel #13
0
        public void ThenIShouldBeAbleToDeleteCustomer()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Delete Customer
            custObj.DeleteCustomer(driver);
        }
Beispiel #14
0
        public void EditCustomer()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Edit Customer
            custObj.EditCustomer(driver);
        }
Beispiel #15
0
        public new void SetupMeeting()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.SetupMeetingAndGoToCalendar().SetupMeeting();
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.SetupMeeting));
            Assert.IsTrue(lead.ActionLogs.Any <DiaryLog>(a => a.ActionLogType == CustomerPage.LeadLogActionType.PhoneSchedule));
        }
Beispiel #16
0
        public void LogCheck()
        {
            CustomerPage pt = LoginAndCreateLead();

            pt.ClickOnTheMenuAndGoToPlacementTest()
            .ClickOnPTButton()
            .ClickOnAllocate();
            Assert.IsTrue(pt.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.PlacementTestAllocated));
        }
Beispiel #17
0
        public void CancelMeeting()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.SetupMeetingAndGoToCalendar().SetupMeeting();
            lead.CancelMeetingClickAndGoToCancelMeetingPage();
            Thread.Sleep(3000);
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.MeetingCanceled));
        }
Beispiel #18
0
        public void NavigateToLandingPage()
        {
            LandingPage lp = new LandingPage(driver);

            FunctionLibrary.Screenshot("LandingPageScreenshot1");
            CustomerPage cp = lp.ClickOnCustomerServiceLink();

            FunctionLibrary.Screenshot("CustomerPageScreenshot");
            FunctionLibrary.ReadExcelData();
        }
Beispiel #19
0
        public void DeleteCustonerTest()
        {
            // page object for Home page
            HomePage homeObj = new HomePage();

            homeObj.NavigateToCustomer(driver);
            // create object for CustomerPage
            CustomerPage custObj = new CustomerPage();

            //Delete customer test
            custObj.DeleteCustomer(driver);
        }
Beispiel #20
0
        public void AddNewCustomer()
        {
            //Create page object for HOME PAGE
            HomePage homeObj = new HomePage();

            homeObj.NavigatetoCustomer(driver);

            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //create new Customer
            custObj.AddCustomer(driver);
        }
Beispiel #21
0
        public ActionResult SaveRecord(CustomerPage proj)
        {
            project pro = new project();

            pro.name        = proj.project.name;
            pro.date        = Convert.ToDateTime(proj.project.date);
            pro.descreption = proj.project.descreption;
            pro.price       = proj.project.price;

            db.projects.Add(pro);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #22
0
        public void DeleteCustomerTest()
        {
            //page object for HomePage
            HomePage homeobj = new HomePage();

            //navigate to CustomerPage
            homeobj.NavigateToCustomer(driver);
            //Create page object for CustomerPage
            CustomerPage custobj = new CustomerPage();

            //Create new Add Customer Test Case
            custobj.DeleteCustomer(driver);
        }
Beispiel #23
0
        public ActionResult Index()
        {
            var custtomer = db.users.SingleOrDefault(x => x.email == "*****@*****.**");

            var proj = db.projects.ToList();
            var usrs = db.users.ToList();

            CustomerPage cust = new CustomerPage
            {
                customer = custtomer,
                users    = usrs,
                projects = proj
            };

            return(View(cust));
        }
Beispiel #24
0
        public void Place_ord(object sender, RoutedEventArgs e)
        {
            CustomerPage customerpage = new CustomerPage();

            this.NavigationService.Navigate(customerpage);
        }
Beispiel #25
0
 public ObjectForScriptingHelper(CustomerPage w)
 {
     this.mExternalWPF = w;
 }
        public void NavigateToCstomerPage()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.NavigateToCustomerPage(driver);
        }
        public void CreateCustomerTest()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.CreateCustomer(driver);
        }
        //Edit
        public void EditCustomerTest()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.EditCustomer(driver);
        }
        //Delete
        public void DeleteCustomerTest()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.DeleteCustomer(driver);
        }
        public App()
        {
            InitializeComponent();

            MainPage = new CustomerPage();
        }