public void When_ExistingSkillData_Expect_DeleteSuccessful(ShareSkill shareSkillToDelete) { try { // arrange DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password); shareSkillToDelete.Id = helper.GetOrAdd(shareSkillToDelete); _setUpContext.Add(shareSkillToDelete); // act // find an existing skill ListingManagementPage listingManagementPage = new ListingManagementPage(Driver); listingManagementPage.Open(); Driver.WaitForAjax(); listingManagementPage.DeleteShareSkill(shareSkillToDelete); // assert Assert.Multiple(() => { Assert.AreEqual(listingManagementPage.Url, Driver.GetCurrentUrl()); Assert.That($"{shareSkillToDelete.Title} has been deleted", Is.EqualTo(listingManagementPage.GetSuccessPopUpMessage())); }); } catch (Exception e) { if (e is AssertionException) { throw; } Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}"); } }
public void When_ValidShareSkillData_Expect_UpdateSuccessful(ShareSkill addedShareSkill, ShareSkill shareSkillToUpdate) { try { DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password); addedShareSkill.Id = helper.GetOrAdd(addedShareSkill); _setUpContext.Add(addedShareSkill); ListingManagementPage listingManagementPage = new ListingManagementPage(Driver); listingManagementPage.Open(); SkillSharePage shareSkillPage = listingManagementPage.UpdateShareSkill(addedShareSkill); shareSkillPage.EnterShareSkill(shareSkillToUpdate); Driver.WaitForAjax(); shareSkillToUpdate.Id = helper.GetOrAdd(shareSkillToUpdate); _setUpContext.Add(shareSkillToUpdate); Driver.WaitForAjax(); Assert.Multiple(() => { Assert.AreEqual(listingManagementPage.Url, Driver.GetCurrentUrl()); Assert.That(listingManagementPage.SearchShareSkill(shareSkillToUpdate), Is.Not.Null); }); } catch (Exception e) { if (e is AssertionException) { throw; } Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}"); } }
public void EditShareSkill() { //Starting Extent report ReportHelpers.test = ReportHelpers.extent.StartTest("Edit ShareSkill entry"); //Created object to interact with HomePage and SignInPage classes and their methods HomePage HomePageObj = new HomePage(); SignInPage SignInPageObj = new SignInPage(); //Called objects to run methods of these classes HomePageObj.Open(); HomePageObj.OpenLoginForm(); SignInPageObj.LogInSteps(); //Created object to interact with ShareSkill and ManageListings classes and their methods SkillSharePage SkillSharePageObj = new SkillSharePage(); ListingManagementPage ListingManagementPageObj = new ListingManagementPage(SkillSharePageObj); //Called objects to run OpenManageListing and EditShareSkill methods ListingManagementPageObj.OpenManageListing(); ListingManagementPageObj.EditShareSkill(); //Called objects to run EditShareSkill method SkillSharePageObj.EditShareSkill(); //Called objects to run ValidateShareSkillEntry method ListingManagementPageObj.ValidateShareSkillEntry(); }
public void GivenTheSkillSearchResultsForAreShown(string searchKey) { ExcelData data = ExcelDataReaderUtil.FetchRowUsingKey(searchKey); var shareSkill = ObjectFactory.CreateInstance <ShareSkill>(data); _context.Set(shareSkill); // assumption that title is considered unique (even though it seems to have an internal ID that is not visible on page) // retrieve ID shareSkill.Id = _helper.GetOrAdd(shareSkill); var objectsToBeDeleted = TestHelper.GetListOfObjectsToBeRemoved(_context); objectsToBeDeleted.Add(shareSkill); ListingManagementPage listPage = new ListingManagementPage(_driver); listPage.Open(); searchResultPage = listPage.SearchBar.SearchSkill(searchKey); _driver.WaitForAjax(); }
public void DeleteShareSkill() { //Starting Extent report ReportHelpers.test = ReportHelpers.extent.StartTest("Delete ShareSkill entry"); //Created object to interact with HomePage and SignInPage classes and their methods HomePage HomePageObj = new HomePage(); SignInPage SignInPageObj = new SignInPage(); //Called objects to run methods of these classes HomePageObj.Open(); HomePageObj.OpenLoginForm(); SignInPageObj.LogInSteps(); //Created object to interact with ManageListings class and its methods ListingManagementPage ListingManagementPageObj = new ListingManagementPage(); //Called object to run DeleteListing method ListingManagementPageObj.OpenManageListing(); ListingManagementPageObj.DeleteListing(); ListingManagementPageObj.ValidateDeleteListing(); }
public void ThenTheUserShouldBeAbleToEditTheSavesDetailsUnderManagingListInManageListingPage_() { var ListingManagementeditandsave = new ListingManagementPage(driver); ListingManagementeditandsave.ListingManagement_Editing(); }
public ShareSkillAddSD() { SkillSharePageObj = new SkillSharePage(); ListingManagementPageObj = new ListingManagementPage(SkillSharePageObj); }
public void WhenWhenIClickedOnDeleteButtonAndNoFromThePopUp() { var Listingmanagementclickingno = new ListingManagementPage(driver); Listingmanagementclickingno.ListingManagement_ClickingNo(); }