public void ThenIVerifyAndForName(string email, string phone, string customerName)
        {
            var sidePanelDetails = new CustomerListPage().GetCustomerDetailsFromSidePanel(customerName);

            Assert.AreEqual(email, sidePanelDetails["Email"]);
            Assert.AreEqual(phone, sidePanelDetails["Phone"]);
        }
        public void ThenIExpectTheCustomerEmailAndPhoneToMatchBetweenSidePanelAndDetailsPanel()
        {
            var sidePanelDetails = new CustomerListPage().GetCustomerDetailsFromSidePanel(_scenarioContext["Name"].ToString());
            var customerDetails  = new CustomerListPage().GetCustomerDetails();

            Assert.AreEqual(sidePanelDetails["Email"], customerDetails.Email);
            Assert.AreEqual(sidePanelDetails["Phone"], customerDetails.Phone);
        }
        public void ThenIExpectCustomersToBeDisplayed(int count, Table table)
        {
            var expectedResults = table.Rows.Select(r => r[0]).ToArray();
            var actualResults   = new CustomerListPage().GetCustomerNames();

            Assert.That(actualResults.Count == count);
            Assert.That(expectedResults.SequenceEqual(actualResults));
        }
예제 #4
0
 public Application()
 {
     driver = new ChromeDriver();
     driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
     registrationPage    = new RegistrationPage(driver);
     adminPanelLoginPage = new AdminPanelLoginPage(driver);
     customerListPage    = new CustomerListPage(driver);
     homePage            = new HomePage(driver);
 }
예제 #5
0
        public void PageSwapCustomerPages()
        {
            switch (CustomerIndex)
            {
            case 0:
                Frame = new CustomerCreatePage();
                break;

            case 1:
                Frame = new CustomerListPage();
                break;
            }
        }
예제 #6
0
        public HomeViewModel(FestiSpecProvider dataServer)
        {
            _dataServer = dataServer;
            // Pages
            _inspectionPage   = new InspectionPage();
            _inspectorPage    = new InspectorPage();
            _questionListPage = new QuestionListPage();
            _customerListPage = new CustomerListPage();
            _offertePage      = new OffertePage();
            _homePage         = new HomePage();
            CurrentPage       = _homePage;

            // Commands
            OpenHome           = new RelayCommand(() => CurrentPage = _homePage);
            OpenInspectionPage = new RelayCommand(() => CurrentPage = _inspectionPage);
            OpenInspectorPage  = new RelayCommand(() => CurrentPage = _inspectorPage);
            OpenQuestionList   = new RelayCommand(() => CurrentPage = _questionListPage);
            OpenCustomerList   = new RelayCommand(() => CurrentPage = _customerListPage);
            OpenOffertes       = new RelayCommand(() => CurrentPage = _offertePage);
            LogoutUser         = new RelayCommand <HomeWindow>(Logout);
        }
예제 #7
0
        //set root page: along with ENV: Pos or Customer
        private Page GetRootPage()
        {
            Page rootPage;

            if (string.IsNullOrEmpty(LocalStorage.GetAccessToken()))
            {
                // first use app, no access_token -> login at first
                rootPage = new PosLoginPage();
            }
            else
            {
                // have access_token: not need to login
                //ENV = Pos
                if (LocalStorage.GetEnviroment() == Constants.POS_ENV)
                {
                    rootPage = new CustomerListPage();
                }
                else // ENV = customer
                {
                    rootPage = new CustomerLoginPage();
                }
            }
            return(new NavigationPage(rootPage));
        }
        public void ThenIExpectCustomerDetailsToBeDisplayed(Table table)
        {
            var actualDetails = new CustomerListPage().GetCustomerDetails();

            table.CompareToInstance <CustomerDetails>(actualDetails);
        }