コード例 #1
0
ファイル: Program.cs プロジェクト: piyaj20/MarsProject
        public void EditLanguageTest()
        {
            //page objects for ProfilePage
            ProfilePage profileObj = new ProfilePage(driver);

            profileObj.editLanguage(driver);
        }
コード例 #2
0
        public void SetUp()
        {
            //Append the html report file to current project path

            string reportPath = "C:\\Users\\Jay\\source\\repos\\FacebookProject\\Reports\\TestRunReport.html";

            //Boolean value for replacing exisisting report
            extent = new ExtentReports(reportPath, true);
            //Add QA system info to html report
            extent.AddSystemInfo("Host Name", "YourHostName")
            .AddSystemInfo("Environment", "YourQAEnvironment")
            .AddSystemInfo("Username", "YourUserName");
            //Adding config.xml file
            extent.LoadConfig("Extent-config.xml");  //Get the config.xml file from http://extentreports.com


            //Launch the browser
            driver     = new ChromeDriver();
            driver.Url = "https://www.facebook.com/";
            Console.WriteLine("ChromeDriver started successfully");
            loginpageObj   = new LoginPage(driver);
            profilepageObj = new ProfilePage(driver);
            searchpageObj  = new SearchPage(driver);
            homepageObj    = new HomePage(driver);
        }
コード例 #3
0
        private void UniversityAdd_Event(University university)
        {
            ProfilePage profilepage = new ProfilePage(university, dbl);

            profilepage.RectorAdded_Event += RectorAdd_Event;
            GridsFrame.Navigate(profilepage);
        }
コード例 #4
0
ファイル: TestsForVk.cs プロジェクト: HannaKisel/TAT_18
        public void TestAbilityToReadMessages()
        {
            AuthorizationPage authorizationPage = new AuthorizationPage(Driver);
            ProfilePage       profilePage       = authorizationPage.LogIn();

            profilePage.GoToMessagePage().ReadFirstMessage().GoToFriendsPage();
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: piyaj20/MarsProject
        public void DeleteLanguageTest()
        {
            //page objects for ProfilePage
            ProfilePage profileObj = new ProfilePage(driver);

            profileObj.deleteLanguage(driver);
        }
コード例 #6
0
        public void ThenPasswordShouldBeChangedSuccessfully()
        {
            Driver.TurnWaitOn();
            var profilePage = new ProfilePage();

            profilePage.changePasswordValidation();
        }
コード例 #7
0
        private void ProgramStatusInformationIsEdited()
        {
            var editProgramStatusPanel = _profilePage.EditProgramStatus();

            _enterProgramStatusModel = new EnterProgramStatusModelBuilder().WithTestingAccommodation(true).WithMcKinneyVento(false).Build();
            _profilePage = editProgramStatusPanel.Edit(_enterProgramStatusModel);
        }
コード例 #8
0
        public void WhenIAddLanguageInTheProfile()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.AddNewLanguage();
        }
コード例 #9
0
        public void GivenEnterTheFullname()
        {
            driver = new ChromeDriver();
            ProfilePage p = new ProfilePage();

            p.ProfileName(driver);
        }
コード例 #10
0
        public void WhenISearchInTheSearchField()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.SearchSkill();
        }
コード例 #11
0
        public void WhenIClickOnChangePasswordAndEnterAllValidDetails()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.ChangePassword();
        }
コード例 #12
0
        public void WhenIUpdateCertificationInTheProfile()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.UpdateCertification();
        }
コード例 #13
0
        public void WhenIAddDescriptionInTheDescriptionField()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.Description();
        }
コード例 #14
0
        public void ThenIShouldBeAbleToValidateThatExistentLanguageRecordHasBeenDeleted()
        {
            TurnOnWait();
            ProfilePage languageObject = new ProfilePage();

            languageObject.DeleteAssertion();
        }
コード例 #15
0
        public void ThenIShouldBeAbleToSeeTheExistentRecordUpdated()
        {
            TurnOnWait();
            ProfilePage languageObject = new ProfilePage();

            languageObject.EditAssertion();
        }
コード例 #16
0
        public void ThenIShouldBeAbleToSeeANewLanguageRecordCreated()
        {
            TurnOnWait();
            ProfilePage languageObject = new ProfilePage();

            languageObject.AddAssertion();
        }
コード例 #17
0
        public void WhenIUpdateLanguageInTheProfile()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.UpdateLanguage();
        }
コード例 #18
0
        public void WhenIAddSkillInTheProfile()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.AddNewSkill();
        }
コード例 #19
0
ファイル: RegistrationTests.cs プロジェクト: Strend/packages
        public void AfterTest()
        {
            ProfilePage profile = new ProfilePage();

            profile.Logout(Driver.Browser);
            Driver.DisposeBrowser();
        }
コード例 #20
0
        public void When_LeadingWhiteSpace_Expect_UpdateFailure(string description, string expectedMessage)
        {
            try
            {
                ProfilePage profilePage = new ProfilePage(Driver);
                profilePage.DescriptionSection.UpdateDescription(description);

                try
                {
                    Assert.Multiple(() =>
                    {
                        Assert.That(profilePage.DescriptionSection.IsOpen(), Is.True);
                        Assert.That(expectedMessage, Is.EqualTo(new ProfilePage(Driver).GetErrorPopUpMessage()));
                    });
                }
                catch (Exception e)
                {
                    if (e is AssertionException)
                    {
                        throw;
                    }
                    Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}");
                }
            }
            catch (Exception e)
            {
                if (e is AssertionException)
                {
                    throw;
                }
                Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}");
            }
        }
コード例 #21
0
        public void WhenIDeleteSkillInTheProfile()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.DeleteSkill();
        }
        public void When_FilterCategory_Expect_FilterSuccessful(ShareSkill expectedSkilShare, string category, string subcategory)
        {
            try
            {
                // arrange
                DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password);
                // act
                // find an existing skill
                expectedSkilShare.Id = helper.GetOrAdd(expectedSkilShare);
                _setUpContext.Add(expectedSkilShare);
                Driver.WaitForAjax();

                SearchResultPage searchResultPage = new ProfilePage(Driver).SearchBar.SearchSkill("Cucumber");
                searchResultPage.RefineResultsPane.FilterByCategory(category);
                Driver.WaitForAjax();
                searchResultPage.RefineResultsPane.FilterBySubCategory(subcategory);
                Driver.WaitForAjax();
                // assert
                Assert.Multiple(() =>
                {
                    Assert.That(searchResultPage.ResultSection.SearchResults.SearchResultList.IsNullOrEmpty(), Is.False);
                    Assert.True(searchResultPage.ResultSection.SearchResults.SearchResultList.First().GetSkillTitle() == expectedSkilShare.Title);
                });
            }
            catch (Exception e)
            {
                if (e is AssertionException)
                {
                    throw;
                }
                Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}");
            }
        }
コード例 #23
0
        public void Can_publish_a_279_char_tweet()
        {
            //publish a 279-char tweet
            var initialTweetCount = _homePage.TweetCount;
            var tweetDialog       = _homePage.MenuBar.OpenTweetDialog();

            Assert.IsTrue(tweetDialog.Header == "Compose new Tweet", "Tweet dialog header is not as expected.");

            _homePage = tweetDialog.AddText(_testInput);
            Assert.AreEqual("See 1 new Tweet", _homePage.NewTweetNotification, "Tweet notification text is not as expected.");

            //verify tweets total increased by 1 on Home page
            _homePage = _homePage.ViewTweet();
            var updatedTweetCount = _homePage.TweetCount;

            Assert.Greater(updatedTweetCount, initialTweetCount, $"Updated tweet count should be: {initialTweetCount+1}, " +
                           $"but it was {updatedTweetCount}.");
            //verify tweets total increased by 1 on Profile page
            var profilePage = ProfilePage.NavigateToThisPageViaUrl(_driver);

            Assert.AreEqual(initialTweetCount + 1, profilePage.TweetCount, $"Updated tweet count should be: {initialTweetCount + 1}, " +
                            $"but it was {updatedTweetCount}.");
            var publishedTweet = profilePage.GetTweetContent(indexInList: 0);

            Assert.That(publishedTweet.Contains(_testInput), "The tweet does not contain the expected text.");
        }
コード例 #24
0
        public void GetPublicProfiles()
        {
            var appId = Guid.NewGuid();
            var core  = new UserCore();

            for (int i = 0; i < 5; i++)
            {
                var page = new ProfilePage()
                {
                    ApplicationIdentifier = appId,
                    Handle          = Guid.NewGuid().ToString(),
                    OwnerIdentifier = Guid.NewGuid(),
                };

                core.Save(page);
            }
            var app = new Application()
            {
                Identifier = appId,
            };

            var profiles = core.PublicProfiles(app);

            Assert.AreEqual <int>(5, profiles.Count());
        }
コード例 #25
0
        public void EditProfileFullName()
        {
            HomePage     homePage      = new HomePage(Driver);
            ProfilePage  profilePage   = new ProfilePage(Driver);
            UserHelper   jsonConverter = new UserHelper();
            User         user          = jsonConverter.GetUser();
            SignInPage   signInPage    = new SignInPage(Driver);
            RightNavMenu rightNavMenu  = new RightNavMenu(Driver);

            var fName = $"FN{DateTime.Now.ToString("yyyyMMddHHmmss")}";
            var lName = $"LN{DateTime.Now.ToString("yyyyMMddHHmmss")}";

            homePage
            .ClickAccountIcon();
            rightNavMenu
            .ClickSignInLink();
            signInPage
            .FillInEmailAddressInput(user)
            .FillInPasswordInput(user)
            .ClickSignInButton();
            profilePage
            .ClickAccountIconForSignInUser()
            .ClickAccountLink()
            .ClickProfilePasswordMenuItem()
            .EditFullNameAndSave(fName, lName)
            .ClickSaveButton();

            jsonConverter.ReplaceUserDataInJson(user, fName, lName);

            Assert.AreEqual($"{fName} {lName}", profilePage.GetFullName(), "User Name is changed");
        }
コード例 #26
0
        public void When_ValidEducationDetails_Expect_AdddSuccessful(Education education)
        {
            try
            {
                DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password);

                // act
                ProfilePage profilePage = new ProfilePage(Driver); // reload
                profilePage.Open();
                profilePage.MainSection.EnterEducationDetails(education);
                Driver.WaitForAjax();
                education.Id = helper.GetOrAdd(education);
                _setUpContext.Add(education);

                // assert
                Driver.WaitForAjax();
                Assert.IsTrue(profilePage.MainSection.SearchForRow(education));
                Assert.That(
                    "Education has been added",
                    Is.EqualTo(profilePage.GetSuccessPopUpMessage()));
            }
            catch (Exception e)
            {
                if (e is AssertionException)
                {
                    throw;
                }
                Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}");
            }
        }
コード例 #27
0
        public void ProfilePageUpdate()
        {
            var page = new ProfilePage()
            {
                ApplicationIdentifier = Guid.NewGuid(),
                Handle          = Guid.NewGuid().ToString(),
                OwnerIdentifier = Guid.NewGuid(),
            };

            var core = new UserCore();

            core.Save(page);
            var newPage = new ProfilePage()
            {
                ExistingHandle        = page.Handle,
                Handle                = Guid.NewGuid().ToString(),
                ApplicationIdentifier = page.ApplicationIdentifier,
                OwnerIdentifier       = page.OwnerIdentifier,
            };

            core.Save(newPage);
            var get = core.Get(page);

            Assert.IsNull(get);
            get = core.Get(newPage);
            Assert.AreEqual <string>(newPage.Handle, get.Handle);
            Assert.AreEqual <Guid>(newPage.ApplicationIdentifier, get.ApplicationIdentifier);
            Assert.AreEqual <Guid>(newPage.OwnerIdentifier, get.OwnerIdentifier);
        }
コード例 #28
0
 public void GoHome()
 {
     LoginPage.LoginWithDefault();
     ProfilePage.GoTo();
     Navbar.GoHome();
     Assert.IsTrue(DashboardPage.IsAt);
 }
コード例 #29
0
        public void WhenIDeleteEducationInTheProfile()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.DeleteEducation();
        }
コード例 #30
0
        public void WhenIAddEducationInTheProfile()
        {
            Driver.TurnOnWait();
            var profilePage = new ProfilePage();

            profilePage.AddNewEducation();
        }
コード例 #31
0
        public void When_FourLanguagesAdded_Expect_AddDisabled()
        {
            try
            {
                // arrange
                DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password);
                foreach (var i in new string[] { "1", "2", "3" })
                {
                    var language = ReadFromExcel(i);
                    language.Id = helper.GetOrAdd(language);
                    _setUpContext.Add(language);
                }

                // act
                ProfilePage profilePage = new ProfilePage(Driver); // reload
                profilePage.Open();
                var newLanguage = ReadFromExcel("4");
                profilePage.MainSection.EnterLanguageDetails(newLanguage);
                Driver.WaitForAjax();
                newLanguage.Id = helper.GetOrAdd(newLanguage);
                _setUpContext.Add(newLanguage);

                // assert
                Driver.WaitForAjax();
                Assert.That(profilePage.MainSection.IsAddRowButtonEnbaled(), Is.False);
            }
            catch (Exception e)
            {
                if (e is AssertionException)
                {
                    throw;
                }
                Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}");
            }
        }
コード例 #32
0
        private void GoToTheStudentProfilePage()
        {
            _profilePage = _homePage.TopMenu.GoToStudentsPage().GoToProfilePage();

        }
コード例 #33
0
 private void VisitThatStudentsProfilePage()
 {
     _studentIndex = _homePage.TopMenu.GoToStudentsPage();
     _profilePage = _studentIndex.GoToProfilePage();
 }
コード例 #34
0
 private void ProgramStatusInputted()
 {
     var programStatusModel = new EnterProgramStatusModelBuilder().Build();
     _profilePage = _programStatusPage.InputProgramStatus(programStatusModel);
 }