Esempio n. 1
0
		public void Test001_RegisteredUserUploadsAvatar()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Registered User uploads Avatar'");

			var loginPage = new LoginPage(_driver);
			loginPage.LoginUsingDirectUrl(_baseUrl, _registeredUserName, _registeredUserPassword);

			var manageUserProfilePage = new ManageUserProfilePage(_driver);
			manageUserProfilePage.OpenUsingLink(_baseUrl);

			manageUserProfilePage.AddProfileAvatar(_avatarFileToUpload);

			var userAccountPage = new UserAccountPage(_driver);
			userAccountPage.OpenUsingLink(_baseUrl);
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT avatar file is loaded correctly");

			userAccountPage.WaitForElement(By.XPath(ManageUserProfilePage.ProfilePhoto)).Info();
			Assert.That(manageUserProfilePage.WaitForElement(By.XPath(ManageUserProfilePage.ProfilePhoto)).GetAttribute("src"), Is.StringContaining(_avatarFileToUpload),
						"The User Avatar is not added correctly");
		}
Esempio n. 2
0
		public void Test005_RegisteredUserChangesProfile()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Registered User changes Profile'");

			var loginPage = new LoginPage(_driver);
			loginPage.LetMeOut();

			loginPage.OpenUsingUrl(_baseUrl);
			loginPage.DoLoginUsingUrl(_registeredUserName, _registeredUserPassword);

			var manageUserProfilePage = new ManageUserProfilePage(_driver);
			manageUserProfilePage.OpenUsingLink(_baseUrl);

			manageUserProfilePage.AddCity(_cityName);

			var userAccountPage = new UserAccountPage(_driver);
			userAccountPage.OpenUsingLink(_baseUrl);

			userAccountPage.OpenMyProfileInfo();

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the City Info is present on the screen");
			Assert.That(userAccountPage.FindElement(By.XPath(UserAccountPage.LocationCity)).Text, Is.EqualTo(_cityName),
						"The City Info is not displayed correctly");
		}
		public void Test004_VerifyVerifiedRegistration()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Verify 'Verified' registration option'");

			var loginPage = new LoginPage(_driver);
			loginPage.LoginAsHost(_baseUrl);

			var adminSiteSettingsPage = new AdminSiteSettingsPage(_driver);
			adminSiteSettingsPage.OpenUsingButtons(_baseUrl);

			adminSiteSettingsPage.SetUserRegistrationType(AdminSiteSettingsPage.VerifiedRadioButton);

			loginPage.RegisterUser(_userWithVerifiedRegistration, "DisplayName", "*****@*****.**", "www3434");

			var manageUserProfilePage = new ManageUserProfilePage(_driver);
			manageUserProfilePage.OpenUsingLink(_baseUrl);
			manageUserProfilePage.OpenTab(By.XPath(ManageUserProfilePage.ManageAccountTab));
			manageUserProfilePage.AccordionOpen(By.XPath(ManageUserProfilePage.AccountSettings));

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the User can Edit Profile");
			Assert.IsTrue(manageUserProfilePage.FindElement(By.XPath(ManageUserProfilePage.DisplayName)).Enabled,
			              "Display Name textbox is disabled");

			loginPage.LoginAsHost(_baseUrl);

			var manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the User is authorized");
			Assert.IsFalse(
				manageUsersPage.ElementPresent(
					By.XPath("//tr[td[text() = '" + _userWithVerifiedRegistration + "']]/td/img[contains(@id, '_imgApproved')]")),
				"The User is authorized");
		}
Esempio n. 4
0
		public void Test003_RegisteredUserChangesProfile()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Registered User changes Password'");

			var loginPage = new LoginPage(_driver);
			loginPage.LoginUsingDirectUrl(_baseUrl, _registeredUserName, _registeredUserPassword);

			var manageUserProfilePage = new ManageUserProfilePage(_driver);
			manageUserProfilePage.OpenUsingLink(_baseUrl);

			manageUserProfilePage.ChangePassword(_registeredUserPassword, _newPassword);

			loginPage.LoginUsingLoginLink(_registeredUserName, _newPassword);

			var mainPage = new MainPage(_driver);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the name of logged User is correct");
			Assert.That(mainPage.WaitForElement(By.XPath(ControlPanelIDs.RegisterLink)).Text,
						Is.EqualTo(_registeredUserDisplayName),
						"The User is not added correctly");
		}