public void ModifyValidUser(UserSettingsData input) { string userName = "******"; TimeManager.ShortPause(); UserSettings.FocusOnUser(userName); //Assert.IsTrue(UserSettings.FocusOnUser(userName)); UserSettings.ClickModifyButton(); TimeManager.ShortPause(); UserSettings.FillInRealName(input.InputData.RealName); UserSettings.FillInEmail(input.InputData.Email); UserSettings.FillInTelephone(input.InputData.Telephone); //UserSettings.FillInType(input.InputData.Type); //UserSettings.FillInTitle(input.InputData.Title); UserSettings.FillInComment(input.InputData.Comments); TimeManager.ShortPause(); UserSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); Assert.IsTrue(UserSettings.IsUserOnList(userName)); //Verify Assert.AreEqual(UserSettings.GetCommonNameValue(), userName); Assert.AreEqual(UserSettings.GetRealNameValue(), input.ExpectedData.RealName); //Assert.AreEqual(UserSettings.GetTitleValue(), input.ExpectedData.Title); //Assert.AreEqual(UserSettings.GetTypeValue(), input.ExpectedData.Type); Assert.AreEqual(UserSettings.GetEmailValue(), input.ExpectedData.Email); Assert.AreEqual(UserSettings.GetTelephoneValue(), input.ExpectedData.Telephone); Assert.AreEqual(UserSettings.GetCommentValue(), input.ExpectedData.Comments); }
public void EmptyField(UserSettingsData input) { //focus a user UserSettings.FocusOnUser(input.InputData.CommonName); UserSettings.ClickModifyButton(); TimeManager.ShortPause(); Assert.IsFalse(UserSettings.IsNameFieldEnable(input.InputData.CommonName)); UserSettings.FillInRealName(input.InputData.RealName); UserSettings.FillInEmail(input.InputData.Email); UserSettings.FillInTelephone(input.InputData.Telephone); //UserSettings.FillInType(input.InputData.Type); //UserSettings.FillInTitle(input.InputData.Title); TimeManager.ShortPause(); UserSettings.ClickSaveButton(); TimeManager.ShortPause(); //Verify Assert.IsTrue(UserSettings.IsRealNameInvalid()); Assert.IsTrue(UserSettings.IsRealNameInvalidMsgCorrect(input.ExpectedData)); Assert.IsTrue(UserSettings.IsEmailInvalid(input.ExpectedData)); Assert.IsTrue(UserSettings.IsEmailInvalidMsgCorrect(input.ExpectedData)); Assert.IsTrue(UserSettings.IsTelephoneInvalid()); Assert.IsTrue(UserSettings.IsTelephoneInvalidMsgCorrect(input.ExpectedData)); /* * Assert.IsTrue(UserSettings.IsUserTypeInvalid()); * Assert.IsTrue(UserSettings.IsTypeInvalidMsgCorrect(input.ExpectedData)); * * Assert.IsTrue(UserSettings.IsUserTitleInvalid()); * Assert.IsTrue(UserSettings.IsTitleInvalidMsgCorrect(input.ExpectedData)); */ }
public void SponsorNameWillNotBeUpdateOnCommentField(ShareDashboardData input) { var dashboard = input.InputData.DashboardInfo; //Login to Jazz with UserD. Change the UserA name to UserAA. JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[3].LoginName, dashboard[0].Receivers[3].Password, "“云能效”系统管理"); UserSettings.NavigatorToUserSetting(); TimeManager.MediumPause(); UserSettings.FocusOnUser(dashboard[0].ShareUsers[0]); UserSettings.ClickModifyButton(); TimeManager.ShortPause(); UserSettings.FillInRealName(dashboard[0].ShareUsers[4]); TimeManager.ShortPause(); UserSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Login to Jazz with UserAA. Navigate to homepage, then to Collaborative Widget tab. HomePagePanel.ExitJazz(); JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[0].LoginName, dashboard[0].Receivers[0].Password, null); HomePagePanel.NavigateToMyShare(); //.The info in widgetA of "由UserA共享" cannot change to "由UserAA共享"。 Assert.AreEqual(input.ExpectedData.messages[0], HomePagePanel.GetMyShareWidgetShareUser(dashboard[0].WidgetName)); //Verify the comment send by UserA.The user's name cannot be change. HomePagePanel.MaximizeMyShareWidget(dashboard[0].WidgetName); TimeManager.ShortPause(); Assert.IsTrue(Widget.GetCommentOfOnePosition(1).Contains(dashboard[0].widgetComments[0])); Widget.ClickCloseMaxDialogButton(); TimeManager.ShortPause(); }
public void ModifyUserValid(UserSettingsData testData) { UserSettings.FocusOnUser(testData.InputData.OriginalName); UserSettings.ClickModifyButton(); TimeManager.ShortPause(); UserSettings.FillInUser(testData.InputData); UserSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); UserSettings.FocusOnUser(testData.ExpectedData.AccountID); //Assert.AreEqual(testData.ExpectedData.Name, UserSettings.GetNameValue()); Assert.AreEqual(testData.ExpectedData.RealName, UserSettings.GetRealNameValue()); //Assert.AreEqual(testData.ExpectedData.Title, UserSettings.GetTitleValue()); Assert.AreEqual(testData.ExpectedData.Email, UserSettings.GetEmailValue()); //Assert.AreEqual(testData.ExpectedData.AssociatedCustomer, UserSettings.GetAssociatedCustomerValue()); Assert.AreEqual(testData.ExpectedData.Comments, UserSettings.GetCommentValue()); //Assert.AreEqual(testData.ExpectedData.Type, UserSettings.GetTypeValue()); Assert.AreEqual(testData.ExpectedData.Telephone, UserSettings.GetTelephoneValue()); }
public void ModifyUserBlank(UserSettingsData testData) { UserSettings.FocusOnUser(testData.InputData.OriginalName); TimeManager.ShortPause(); UserSettings.ClickModifyButton(); TimeManager.ShortPause(); UserSettings.FillInUser(testData.InputData); UserSettings.ClickSaveButton(); Assert.IsTrue(UserSettings.IsCommonNameInvalid()); Assert.IsTrue(UserSettings.IsCommonNameInvalidMsgCorrect(testData.ExpectedData)); Assert.IsTrue(UserSettings.IsRealNameInvalid()); Assert.IsTrue(UserSettings.IsRealNameInvalidMsgCorrect(testData.ExpectedData)); Assert.IsTrue(UserSettings.IsTelephoneInvalid()); Assert.IsTrue(UserSettings.IsTelephoneInvalidMsgCorrect(testData.ExpectedData)); //Assert.IsTrue(UserSettings.IsEmailInvalid()); //Assert.IsTrue(UserSettings.IsEmailInvalidMsgCorrect(testData.ExpectedData)); Assert.IsTrue(UserSettings.IsUserTypeInvalid()); Assert.IsTrue(UserSettings.IsTypeInvalidMsgCorrect(testData.ExpectedData)); Assert.IsFalse(UserSettings.IsCommentsInvalid(testData.ExpectedData)); }
public void AddValidUser(UserSettingsData input) { //Click "+用户" UserSettings.ClickAddUser(); TimeManager.ShortPause(); UserSettings.FillInAddUser(input.InputData); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); UserSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); Assert.AreEqual(input.ExpectedData.AccountID, UserSettings.GetNameValue()); Assert.AreEqual(input.ExpectedData.RealName, UserSettings.GetRealNameValue()); Assert.AreEqual(input.ExpectedData.Type, UserSettings.GetTypeValue()); Assert.AreEqual(input.ExpectedData.Email, UserSettings.GetEmailValue()); Assert.AreEqual(input.ExpectedData.Telephone, UserSettings.GetTelephoneValue()); Assert.AreEqual(input.ExpectedData.Comments, UserSettings.GetCommentValue()); Assert.AreEqual(input.ExpectedData.Title, UserSettings.GetTitleValue()); Assert.IsTrue(UserSettings.IsUserOnList(input.ExpectedData.AccountID)); }
public void SendEmailAndInitialPasswordSuccess(UserSettingsData input) { //Click "+用户" UserSettings.ClickAddUser(); TimeManager.ShortPause(); UserSettings.FillInAddUser(input.InputData); TimeManager.MediumPause(); UserSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); Assert.IsTrue(UserSettings.IsEmailSendButtonDispalyed()); Assert.IsTrue(UserSettings.IsEmailSendButtonEnabled()); UserSettings.ClickEmailSendButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.Message)); JazzMessageBox.MessageBox.OK(); // Login to emailbox and click the link from the received email. need test manaully }