Esempio n. 1
0
 public TeamsPageHelper DeleteTeam()
 {
     _teamsPage.ClickOnTeamFromTheList(1)
     .ClickOnTrashIconToRemoveSelectedTeam()
     .ClickOnDeleteButtonToConfirmDeletion();
     return(this);
 }
        public void DeleteTeam_Success()
        {
            // arrange
            string teamTitle = "test team";

            // act
            // --- in order to able to delete team we must have some team created
            _teamsPageHelper.CreateTeam();

            // arrange
            var oldTeamCount = _teamsPage.TeamCount;

            _teamsPage.ClickOnTeamFromTheList(1)
            .ClickOnTrashIconToRemoveSelectedTeam()
            .ClickOnDeleteButtonToConfirmDeletion();

            // assert
            Assert.Equal(oldTeamCount - 1, _teamsPage.TeamCount);
            Assert.False(_playgroundPageHelpers.CheckIfTitleOfItemIsDisplayed(1, teamTitle));
        }