public void ThenITickLogOutOption(string option)
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.HomePage.CurrentUserDropDown.Click();
     Sync.ExplicitWait(1);
     Sync.FindElementWait(By.XPath($"//a[contains(@class,'dropdown-item') and text()='{option}']"));
     AppointmentManagerPages.HomePage.CurrentUserDropDownItem(option).Click();
 }
 public void ThenICanEditTheService()
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.ServiceNameField.Clear();
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.ServiceNameField.SendKeys("Livrari");
     AppointmentManagerPages.Common.SaveButton.Click();
 }
 public void WhenICreateAServiceWithTheName(string serviceName)
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.CreateANewServiceButton.Click();
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.ServiceNameField.Click();
     AppointmentManagerPages.MyServicesPage.ServiceNameField.SendKeys(serviceName);
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.SaveButton.Click();
 }
 public void GivenILogInWithUserTestTest_RoAndMLQLdJetoKXHGttMRACryptedPassword(string username, string password)
 {
     Sync.ExplicitWait(2);
     AppointmentManagerPages.HomePage.LogInPageButton.Click();
     Sync.ExplicitWait(1);
     AppointmentManagerPages.LogInPage.EmailLogInField.SendKeys(username);
     Sync.ExplicitWait(2);
     AppointmentManagerPages.LogInPage.PasswordLogInField.SendKeys(password);
     Sync.ExplicitWait(1);
     AppointmentManagerPages.LogInPage.SubmitLogInButton.Click();
 }
 public void GivenICreateANewUserWithUsernameAndPassword(string username, string password)
 {
     AppointmentManagerPages.HomePage.RegisterPageButton.Click();
     Sync.ExplicitWait(2);
     AppointmentManagerPages.RegisterPage.EmailRegisterField.SendKeys(username);
     Sync.ExplicitWait(1);
     AppointmentManagerPages.RegisterPage.PasswordRegisterField.SendKeys(password);
     Sync.ExplicitWait(1);
     AppointmentManagerPages.RegisterPage.RepeatPasswordRegisterField.SendKeys(password);
     Sync.ExplicitWait(1);
     AppointmentManagerPages.RegisterPage.SubmitRegisterButton.Click();
 }
        public void ThenIDeleteTheCreatedService(string button)
        {
            Sync.ExplicitWait(1);

            if (button == "Delete")
            {
                AppointmentManagerPages.MyServicesPage.DeteleButtonMyServices.Click();
            }
            else
            {
                AppointmentManagerPages.MyServicesPage.ButtonsFromSecondRowService(button).Click();
            }
        }
 public void ThenICanAnAppointment(string option)
 {
     if (option == "Set to Done")
     {
         Sync.ExplicitWait(2);
         AppointmentManagerPages.MyServicesPage.SetToDoneButton.Click();
     }
     else
     {
         Sync.ExplicitWait(1);
         AppointmentManagerPages.Common.DetailsButton.Click();
         Sync.ExplicitWait(1);
         AppointmentManagerPages.MyServicesPage.ConfirmOrDeclineAppointment(option).Click();
     }
 }
 public void GivenIMakeAnAppointmentToAService()
 {
     Sync.ExplicitWait(1);
     Sync.FindElementWait(By.XPath("(//tbody/tr/td[4])[1]"));
     AppointmentManagerPages.ServicesPage.DetailButtonFirstService.Click();
     Sync.ExplicitWait(1);
     Utilities.DoubleClick(AppointmentManagerPages.ServicesPage.CreateAppointmentButton);
     Sync.ExplicitWait(1);
     AppointmentManagerPages.ServicesPage.AppointmentDateField.SendKeys("12 December, 2020 17:00");
     Sync.ExplicitWait(1);
     AppointmentManagerPages.ServicesPage.NewAppointmentLabel.Click();
     Sync.ExplicitWait(1);
     Sync.FindElementWait(By.XPath("//button[text()='Save']"));
     AppointmentManagerPages.MyServicesPage.SaveButton.Click();
 }
示例#9
0
        public void ThenICanEditTheUserProfile(Table editProfileTable)
        {
            Sync.ExplicitWait(1);
            AppointmentManagerPages.MyProfilePage.EditProfileButton.Click();
            Sync.ExplicitWait(1);

            var dictionary = TableExtensions.ToDictionary(editProfileTable);

            Sync.ExplicitWait(1);
            AppointmentManagerPages.MyProfilePage.FirstNameField.Clear();
            Sync.ExplicitWait(1);
            AppointmentManagerPages.MyProfilePage.FirstNameField.SendKeys(dictionary["FirstName"]);
            Sync.ExplicitWait(1);
            AppointmentManagerPages.MyProfilePage.LastNameField.Clear();
            Sync.ExplicitWait(1);
            AppointmentManagerPages.MyProfilePage.LastNameField.SendKeys(dictionary["LastName"]);
            Sync.ExplicitWait(1);
            AppointmentManagerPages.MyProfilePage.PhoneField.Clear();
            Sync.ExplicitWait(1);
            AppointmentManagerPages.MyProfilePage.PhoneField.SendKeys(dictionary["Phone"]);

            Sync.ExplicitWait(2);
            AppointmentManagerPages.MyProfilePage.UpdateInfoButton.Click();
        }
 public void GivenIAccesMyServicesPage(string pageName)
 {
     Sync.ExplicitWait(2);
     AppointmentManagerPages.HomePage.UsersMyServiceClientsMyAppointmentsAboutPAGES(pageName).Click();
 }
 public void ThenIChooseTheDetailsOptionFromTheDesiredService(string button)
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.ButtonsFromSecondRowService(button).Click();
 }
 public void ThenTheApoointmentStateShouldBeUpdatedTo(string status)
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.AppointmentStatusFirstRow.Text.Should().Be(status);
 }
 public void ThenICanTRegisterInTheApplication()
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.Common.ErrorLabel.Exists().Should().BeTrue();
 }
 public void ThenIDeleteTheNewCreatedService(string button)
 {
     Sync.ExplicitWait(2);
     AppointmentManagerPages.MyServicesPage.DeteleButtonSecondRow.Click();
     Sync.ExplicitWait(1);
 }
 public void ThenTheTheNewServiceNameServiceTestExist(string name)
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyServicesPage.ServiceNameSecondRow(name).Exists().Should().BeTrue();
 }
 public void ThenTheFollowingErrorMessageShouldBeDisplayed(string errorMessage)
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.Common.ErrorMessage(errorMessage).Displayed.Should().BeTrue();
 }
 public void ThenIAmSuccessfullyLoggedInWith(string username)
 {
     Sync.ExplicitWait(2);
     AppointmentManagerPages.LogInPage.UserLabelAfterLogIn(username).Exists().Should().BeTrue();
 }
 public void WhenITickUser()
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.ServicesPage.MailLinkSecondRow.Click();
 }
 public void ThenTheLogInFailedWith(string username)
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.LogInPage.LogInTag.Displayed.Should().BeTrue();
 }
 public void ThenICanTEditOthersUserProfile()
 {
     Sync.ExplicitWait(1);
     AppointmentManagerPages.MyProfilePage.EditProfileButton.Displayed.Should().BeFalse();
 }