コード例 #1
0
 public void Registration_JoinNowSuccess_WS_1052()
 {
     if (!DataParser.ReturnExecution("WS_1052"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1052.xml";
         string firstName      = RegisterData.GetRegisterFirstName(_file),
                lastName       = RegisterData.GetRegisterLastName(_file),
                ID             = RegisterData.GetRegisterID(_file),
                email          = RegisterData.GetRegisterEmail(_file);
         Register registerPage = InitialPage.Go().ClickJoinNow();
         Assert.AreEqual("First Name", registerPage.GetName("First Name"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsFirstNameFieldAvailable(), "First Name field is not available");
         Assert.AreEqual("Last Name", registerPage.GetName("Last Name"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsLastNameAvailable(), "Last Name button is not available");
         Assert.AreEqual("Employee ID", registerPage.GetName("Employee ID"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsIDFieldAvailable(), "ID field is not available");
         Assert.AreEqual("Email Address", registerPage.GetName("Email Address"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsEmailFieldAvailable(), "email field is not available");
         registerPage.EnterFirstName(firstName)
         .EnterLastName(lastName)
         .EnterEmployeeID(ID)
         .EnterEmployeeEmail(email)
         .ClickRegister();
         Assert.AreEqual(
             "Success!\r\nWe found you. Check your inbox at " + email +
             " for a link to finish registration. Thank you!", registerPage.GetSuccessMsg(),
             "Message is not the expected");
     }
 }
コード例 #2
0
 public void Registration_UnsuccesfulEmpId_WS_1218()
 {
     if (!DataParser.ReturnExecution("WS_1218"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1218.xml";
         string firstName      = RegisterData.GetRegisterFirstName(_file),
                lastName       = RegisterData.GetRegisterLastName(_file),
                ID             = RegisterData.GetRegisterID(_file),
                email          = RegisterData.GetRegisterEmail(_file);
         Register registerPage = InitialPage.Go().ClickJoinNow();
         Assert.AreEqual("First Name", registerPage.GetName("First Name"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsFirstNameFieldAvailable(), "First Name field is not available");
         Assert.AreEqual("Last Name", registerPage.GetName("Last Name"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsLastNameAvailable(), "Last Name button is not available");
         Assert.AreEqual("Employee ID", registerPage.GetName("Employee ID"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsIDFieldAvailable(), "ID field is not available");
         Assert.AreEqual("Email Address", registerPage.GetName("Email Address"), "First Name is now well spell");
         Assert.IsTrue(registerPage.IsEmailFieldAvailable(), "email field is not available");
         registerPage.EnterFirstName(firstName)
         .EnterLastName(lastName)
         .EnterEmployeeID(ID)
         .EnterEmployeeEmail(email)
         .ClickRegister();
         Assert.AreEqual(
             "Hmm, we couldn't find anyone matching the information you entered. Please make sure your email and Employee ID are correct. Also, maybe we have a different variation of your first or last name?",
             registerPage.GetSuccessMsg(), "Message is not the expected");
     }
 }
コード例 #3
0
 public void ContactUs_Submission_WS_1431()
 {
     if (!DataParser.ReturnExecution("WS_1431"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1431.xml";
         string firstname      = RegisterData.GetRegisterFirstName(_file),
                lastname       = RegisterData.GetRegisterLastName(_file),
                email          = RegisterData.GetRegisterEmail(_file),
                inquiry        = RegisterData.GetInquiryType(_file),
                msg            = RegisterData.GetInquiry(_file);
         HelpHomePage helpPage = InitialPage.Go().Logon().ClickLogin().NavigateToHelp();
         helpPage.EnterFirstName(firstname)
         .EnterLastName(lastname)
         .EnterEmail(email)
         .SelectCountry(inquiry)
         .EnterInquiry(msg)
         .ClickSubmit();
         Assert.AreEqual("Your inquiry has been successfully submitted. Please expect a response within 1 - 2 business days.", helpPage.GetSuccessfullMsg(),
                         "The inquiry was not send successfully or the message is wrong");
     }
 }