Exemplo n.º 1
0
        public void OneTimeSetupCreateSprint()
        {
            _guid = Guid.NewGuid().ToString().Substring(0, 8);

            _userDashboardPage    = new UserDashboardPage(MainWindow);
            _projectDashboardPage = new ProjectDashboardPage(MainWindow);
            _manageSprintsPage    = new ManageSprintsPage(MainWindow);
            _createSprintPage     = new CreateSprintPage(MainWindow);

            LoginPage.Login("*****@*****.**", "Aut0mation");
            Assert.IsTrue(_userDashboardPage.IsCurrentPage());

            _userDashboardPage.GetProjectListItem("e2eProjectName1").Click();
            Assert.IsTrue(_projectDashboardPage.IsCurrentPage());

            _projectDashboardPage.ManageSprintsButton.Click();

            var messageBox = MessageBoxUtil.GetInfoMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            MessageBoxUtil.ClickOKButton(messageBox);

            Assert.IsTrue(_manageSprintsPage.IsCurrentPage());

            _manageSprintsPage.CreateSprintButton.Click();
            Assert.IsTrue(_createSprintPage.IsCurrentPage());
        }
        public void DismissNoProjectsMsgBox()
        {
            var messageBox = MainWindow.MessageBox("Info");

            if (messageBox != null)
            {
                MessageBoxUtil.ClickOKButton(messageBox);
            }
        }
        public void ShouldFailCreateWithBlankProjectDescription()
        {
            _createProjectPage.ProjectNameTextBox.Text        = "E2E Project";
            _createProjectPage.ProjectDescriptionTextBox.Text = "";
            _createProjectPage.CreateProjectButton.Click();
            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            MessageBoxUtil.ClickOKButton(messageBox);
        }
Exemplo n.º 4
0
        public void OneTimeSetup()
        {
            _userDashboardPage        = new UserDashboardPage(MainWindow);
            _projectDashboardPage     = new ProjectDashboardPage(MainWindow);
            _productBacklogPage       = new ProductBacklogPage(MainWindow);
            _userStoryDetailsPage     = new UserStoryDetailsPage(MainWindow);
            _createUserStoryPage      = new CreateUserStoryPage(MainWindow);
            _createAcceptanceTestPage = new CreateAcceptanceTestPage(MainWindow);

            LoginPage.Login("*****@*****.**", "Aut0mation");
            Assert.IsTrue(_userDashboardPage.IsCurrentPage());

            var projectListItem = (WPFListItem)_userDashboardPage.ProjectListBox.Items.Find(item => "e2eProjectName1".Equals(item.Text));

            projectListItem.Click();

            Assert.IsTrue(_projectDashboardPage.IsCurrentPage());

            _projectDashboardPage.ProductBacklogButton.Click();

            Assert.IsTrue(_productBacklogPage.IsCurrentPage());

            _productBacklogPage.CreateStoryButton.Click();

            Assert.IsTrue(_createUserStoryPage.IsCurrentPage());

            _createUserStoryPage.enterCorrectStoryDetails("e2eUserStoryTest", "10", "e2eDescriptionTest");

            Assert.IsTrue(_productBacklogPage.IsCurrentPage());

            var StoryListItem = (WPFListItem)_productBacklogPage.StoryListBox.Items.Find(item => "e2eUserStoryTest".Equals(item.Text));

            _productBacklogPage.CreateStoryButton.Click();

            _createUserStoryPage.enterCorrectStoryDetails("e2eUserStoryUserStoryDetails", "10", "e2eDescription");

            Assert.IsTrue(_productBacklogPage.IsCurrentPage());


            var ProductListItem = (WPFListItem)_productBacklogPage.StoryListBox.Items.Find(item => "e2eUserStoryUserStoryDetails".Equals(item.Text));

            ProductListItem.Click();

            _userStoryDetailsPage.CreateAcceptanceTestButton.Click();

            _createAcceptanceTestPage.enterCorrectAcceptanceDetails("e2eGiven1", "e2eWhen1", "e2eThen1");

            _createAcceptanceTestPage.CreateButton.Click();

            var messageBox = MessageBoxUtil.GetSuccessMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);
        }
Exemplo n.º 5
0
        public void ShouldFailIfAllLeftBlankWithCompoundErrorMessage()
        {
            _createSprintPage.CreateButton.Click();
            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            Assert.IsTrue(MessageBoxUtil.GetTextContent(messageBox).Contains("You must enter"));
            Assert.IsTrue(MessageBoxUtil.GetTextContent(messageBox).Contains("You must select"));

            MessageBoxUtil.ClickOKButton(messageBox);
        }
        public void ShouldCreateWithValidDetails()
        {
            EnterValidCredentials();
            _createProjectPage.CreateProjectButton.Click();
            var messageBox = MessageBoxUtil.GetSuccessMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            MessageBoxUtil.ClickOKButton(messageBox);
            Assert.IsTrue(_userDashboardPage.IsCurrentPage());
            _userDashboardPage.CreateProjectButton.Click();
            Assert.IsTrue(_createProjectPage.IsCurrentPage());
        }
Exemplo n.º 7
0
        public void ShouldFailOnSearchingNonExistingUser()
        {
            _projectDashboardPage.SearchEmailTextBox.Text = "*****@*****.**";
            _projectDashboardPage.SearchButton.Click();

            var messageBox = MessageBoxUtil.GetErrorMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            Assert.IsTrue(MessageBoxUtil.GetTextContent(messageBox).Contains("not exist"));

            MessageBoxUtil.ClickOKButton(messageBox);
        }
Exemplo n.º 8
0
        public void ShouldFailLoginWithInvalidCredentials()
        {
            LoginPage.Login("BadLogin4462`[", "BadPassword33");

            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);

            LoginPage.EmailTextBox.Text    = "";
            LoginPage.PasswordTextBox.Text = "";
        }
Exemplo n.º 9
0
        public void ShouldFailRegistrationWithInvalidServerSideValidation()
        {
            EnterValidCredentials();

            RegisterPage.EmailTextBox.Text = "Not an email";
            RegisterPage.RegisterButton.Click();

            var messageBox = MessageBoxUtil.GetErrorMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);
        }
Exemplo n.º 10
0
        public void ShouldFailRegistrationWithEmptyFirstName()
        {
            EnterValidCredentials();

            RegisterPage.FirstnameTextBox.Text = "";
            RegisterPage.RegisterButton.Click();

            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);
        }
Exemplo n.º 11
0
        public void ShouldFailIfStartDateIsInThePast()
        {
            EnterValidCredentials();
            _createSprintPage.StartDatePicker.Date = DateTime.Now.AddDays(-7);

            _createSprintPage.CreateButton.Click();
            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            Assert.IsTrue(MessageBoxUtil.GetTextContent(messageBox).Contains("can't be in the past"));

            MessageBoxUtil.ClickOKButton(messageBox);
            ResetCreateSprintFields();
        }
Exemplo n.º 12
0
        public void ShouldFailRegistrationWithMismatchedPasswords()
        {
            EnterValidCredentials();

            RegisterPage.ConfirmPasswordTextBox.Text = "wrongpassword";
            RegisterPage.RegisterButton.Click();

            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            Assert.IsTrue(MessageBoxUtil.GetTextContent(messageBox).Contains("must match"));

            MessageBoxUtil.ClickOKButton(messageBox);
        }
Exemplo n.º 13
0
        public void ShouldFailIfNoStartDateEntered()
        {
            EnterValidCredentials();
            _createSprintPage.StartDatePicker.Date = null;

            _createSprintPage.CreateButton.Click();
            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            Assert.IsTrue(MessageBoxUtil.GetTextContent(messageBox).Contains("You must select"));

            MessageBoxUtil.ClickOKButton(messageBox);
            ResetCreateSprintFields();
        }
Exemplo n.º 14
0
        public void ShouldFailIfEndDateIsBeforeStartDate()
        {
            EnterValidCredentials();
            _createSprintPage.StartDatePicker.Date = DateTime.Now.AddDays(21);

            _createSprintPage.CreateButton.Click();
            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            Assert.IsTrue(MessageBoxUtil.GetTextContent(messageBox).Contains("must be after"));

            MessageBoxUtil.ClickOKButton(messageBox);
            ResetCreateSprintFields();
        }
Exemplo n.º 15
0
        public void ShouldSuccessfullyLoginAsUserWithNoProjects()
        {
            LoginPage.Login("*****@*****.**", "Aut0mation");

            var messageBox = MessageBoxUtil.GetInfoMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);

            Assert.IsTrue(_userDashboardPage.IsCurrentPage());

            _userDashboardPage.LogoutButton.Click();
        }
Exemplo n.º 16
0
        public void ShouldFailCreatingAUserStoryWithEmptyDescription()
        {
            Assert.IsTrue(_createUserStoryPage.IsCurrentPage());

            _createUserStoryPage.enterEmptyNameStoryDetails("e2eUserStory", "10");

            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);

            _createUserStoryPage.CancelButton.Click();

            _productBacklogPage.CreateStoryButton.Click();

            Assert.IsTrue(_createUserStoryPage.IsCurrentPage());
        }
        public void ShouldFailCreatingAnAcceptanceTestWithEmptyThen()
        {
            Assert.IsTrue(_userStoryDetailsPage.IsCurrentPage());

            _userStoryDetailsPage.CreateAcceptanceTestButton.Click();

            _createAcceptanceTestPage.enterEmptyThenAcceptanceDetails("e2eGiven4", "e2eWhen4");

            _createAcceptanceTestPage.CreateButton.Click();

            var messageBox = MessageBoxUtil.GetWarningMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);

            _createAcceptanceTestPage.CancelButton.Click();

            Assert.IsTrue(_userStoryDetailsPage.IsCurrentPage());
        }
Exemplo n.º 18
0
        public void ShouldSuccessfullyCreateASprint()
        {
            EnterValidCredentials();

            string sprintName = _createSprintPage.SprintNameTextBox.Text;

            _createSprintPage.CreateButton.Click();

            var messageBox = MessageBoxUtil.GetSuccessMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            MessageBoxUtil.ClickOKButton(messageBox);

            Assert.IsTrue(_manageSprintsPage.IsCurrentPage());

            WPFListItem sprintListItem = _manageSprintsPage.GetSprintListItem(sprintName);

            Assert.NotNull(sprintListItem);

            _manageSprintsPage.CreateSprintButton.Click();
        }
Exemplo n.º 19
0
        public void ShouldSuccessfullyRegisterWithValidCredentials()
        {
            EnterValidCredentials();

            RegisterPage.DeveloperCheckBox.Select();
            RegisterPage.ScrumMasterCheckBox.Select();
            RegisterPage.ProductOwnerCheckBox.Select();

            Assert.IsTrue(RegisterPage.DeveloperCheckBox.IsSelected);
            Assert.IsTrue(RegisterPage.ScrumMasterCheckBox.IsSelected);
            Assert.IsTrue(RegisterPage.ProductOwnerCheckBox.IsSelected);

            RegisterPage.RegisterButton.Click();

            var messageBox = MessageBoxUtil.GetSuccessMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);
            Assert.IsTrue(LoginPage.IsCurrentPage());

            LoginPage.RegisterButton.Click();
        }
        public void ShouldSuccessfullyCreateAnAcceptanceTestAsAProductOwner()

        {
            Assert.IsTrue(_userStoryDetailsPage.IsCurrentPage());

            _userStoryDetailsPage.CreateAcceptanceTestButton.Click();

            _createAcceptanceTestPage.enterCorrectAcceptanceDetails("e2eGiven1", "e2eWhen1", "e2eThen1");

            _createAcceptanceTestPage.CreateButton.Click();

            var messageBox = MessageBoxUtil.GetSuccessMessageBox(MainWindow);

            Assert.NotNull(messageBox);

            MessageBoxUtil.ClickOKButton(messageBox);

            var UserStoryAcceptanceTests = (WPFListItem)_userStoryDetailsPage.UserStoryAcceptanceTests.Items.Find(item => "e2eGiven1".Equals(item.Text));

            Assert.NotNull(UserStoryAcceptanceTests);

            Assert.IsTrue(_userStoryDetailsPage.IsCurrentPage());
        }
        public void OneTimeSetupCreateSprint()
        {
            _userDashboardPage    = new UserDashboardPage(MainWindow);
            _projectDashboardPage = new ProjectDashboardPage(MainWindow);
            _manageSprintsPage    = new ManageSprintsPage(MainWindow);
            _createSprintPage     = new CreateSprintPage(MainWindow);

            LoginPage.Login("*****@*****.**", "Aut0mation");
            Assert.IsTrue(_userDashboardPage.IsCurrentPage());

            _userDashboardPage.GetProjectListItem("e2eProjectName1").Click();
            Assert.IsTrue(_projectDashboardPage.IsCurrentPage());

            _projectDashboardPage.ManageSprintsButton.Click();

            var messageBox = MessageBoxUtil.GetInfoMessageBox(MainWindow);

            Assert.NotNull(messageBox);
            MessageBoxUtil.ClickOKButton(messageBox);

            Assert.IsTrue(_manageSprintsPage.IsCurrentPage());

            _manageSprintsPage.CreateSprintButton.Click();
            Assert.IsTrue(_createSprintPage.IsCurrentPage());

            EnterValidCredentials();

            _createSprintPage.CreateButton.Click();

            var messageBox1 = MessageBoxUtil.GetSuccessMessageBox(MainWindow);

            Assert.NotNull(messageBox1);

            MessageBoxUtil.ClickOKButton(messageBox1);

            Assert.IsTrue(_manageSprintsPage.IsCurrentPage());
        }