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));

            Assert.NotNull(projectListItem);
            projectListItem.Click();

            Assert.IsTrue(_projectDashboardPage.IsCurrentPage());

            _projectDashboardPage.ProductBacklogButton.Click();

            Assert.IsTrue(_productBacklogPage.IsCurrentPage());

            _productBacklogPage.CreateStoryButton.Click();

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

            Assert.IsTrue(_productBacklogPage.IsCurrentPage());

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

            StoryListItem.Click();

            Assert.IsTrue(_userStoryDetailsPage.IsCurrentPage());
        }
Ejemplo n.º 2
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);
        }