public SeniorityPageHelper DeleteSeniority() { _seniorityPage.ClickOnSeniorityFromTheList(1) .ClickOnTrashIconToRemoveSelectedSeniority() .ClickOnDeleteButtonToConfirmDeletion(); return(this); }
public void DeleteSeniority_Success() { // arrange string seniorityTitle = "test seniority"; // act // --- in order to able to delete seniority we must have some seniority created _seniorityPageHelper.CreateSeniority(); // arrange //count the number of seniorities before deleting var oldSeniorityCount = _seniorityPage.SenioritiesCount; _seniorityPage.ClickOnSeniorityFromTheList(1) .ClickOnTrashIconToRemoveSelectedSeniority() .ClickOnDeleteButtonToConfirmDeletion(); // assert that number of seniorities is reduced for 1 Assert.Equal(oldSeniorityCount - 1, _seniorityPage.SenioritiesCount); Assert.False(_playgroundPageHelpers.CheckIfTitleOfItemIsDisplayed(1, seniorityTitle)); }