Пример #1
0
        public ReportsPageHelper CreateReport()
        {
            string summary        = "test summary1";
            string issueType      = "Task";
            string severityType   = "Medium";
            string priorityType   = "Blocker";
            string description    = "test description1";
            string firstStepText  = "test first step1";
            string secondStepText = "test second step1";

            _reportsPage = _reportsPage.ClickOnReportIssueButton();
            _reportsPage = _reportsPage.EnterSummary(summary);
            _reportsPage = _reportsPage.SelectIssueType(issueType);
            _reportsPage = _reportsPage.SelectSeverityType(severityType);
            _reportsPage = _reportsPage.SelectPriorityType(priorityType);
            _reportsPage = _reportsPage.EnterDescription(description);
            _reportsPage = _reportsPage.EnterFirstStep(firstStepText);
            _reportsPage = _reportsPage.AddNewStep();
            _reportsPage = _reportsPage.EnterSecondStep(secondStepText);
            _reportsPage = _reportsPage.SubmitReportIssue();
            return(this);
        }
Пример #2
0
        public void CreateNewReportIssue_Success()
        {
            // arrange
            string summary = "test summary";

            // these two values of variables is taken from enums
            string issueType    = ReportsPageConstants.REPORT_ISSUE_TYPE_Task;
            string severityType = ReportsPageConstants.SEVERITY_TYPE_Medium;

            string priorityType   = "Blocker";
            string description    = "test description";
            string firstStepText  = "test first step";
            string secondStepText = "test second step";

            //count the number of reports before deleting
            int oldReportIssuesCount = _reportsPage.ReportIssuesCount;

            // act
            _reportsPage = _reportsPage.ClickOnReportIssueButton();
            _reportsPage = _reportsPage.EnterSummary(summary);
            _reportsPage = _reportsPage.SelectIssueType(issueType);
            _reportsPage = _reportsPage.SelectSeverityType(severityType);
            _reportsPage = _reportsPage.SelectPriorityType(priorityType);
            _reportsPage = _reportsPage.EnterDescription(description);
            _reportsPage = _reportsPage.EnterFirstStep(firstStepText);
            _reportsPage = _reportsPage.AddNewStep();
            _reportsPage = _reportsPage.EnterSecondStep(secondStepText);
            _reportsPage = _reportsPage.SubmitReportIssue();

            // assert that number of technologies is reduced for 1
            Assert.Equal(oldReportIssuesCount + 1, _reportsPage.ReportIssuesCount);
            Assert.Equal(summary, _reportsPage.GetSummaryOfReportIssue(1));


            //  clean up
            _reportsPage.ClickOnReportFromTheList(1);
            _reportsPageHelper.DeleteReport();
        }