示例#1
0
        public void Icrm_CreateNewProject_NewProjectShouldBeSaved()
        {
            //Arrange
            currentPage.ToolBar.SelectToolMenu("New", "Project...");
            var projectPage = new IcrmProjectsPage(currentPage.myDriver);

            currentPage.Dispose();

            var projectData = new ProjectDTO
            {
                AccountName    = "Tag.Ltd",
                ProjectName    = "TLXQA Automation Testing Project",
                ProjectManager = "Hogan, Lee",
                SoldBy         = "Lee Hogan",
                BillMode       = "Task",
                InvoiceType    = "On Completion"
            };

            //Act
            expectedProjectId = projectPage.CreateNewProject(projectData);

            //Assert
            Assert.IsFalse(string.IsNullOrEmpty(expectedProjectId), "New Project is not created successfully.");
            Assert.IsTrue(expectedProjectId.Contains(projectData.AccountName), "New project name format is wrong.");

            currentPage = projectPage;
        }
示例#2
0
 public void Icrm_LaunchWebCalender_WebCalenderShouldBeLaunched()
 {
     if (!currentPage.IsMainTabExpanded("timelinx"))
     {
         currentPage.NavigateMainTabTo("timelinx");
     }
     currentPage = currentPage.SelectMainMenu("WebCalendar");
 }
示例#3
0
        public void Icrm_RunAServiceQueryForThatDay_ResultShouldBeDisplayed()
        {
            var projectPage = new IcrmProjectsPage(currentPage.myDriver);

            projectPage.ToolBar.SelectToolMenu("Project Tools", "Service Query");
            currentPage = projectPage.RunServiceQuery(/*DateTime.Today.Date.ToString("MM/dd/yyyy")*/ "4/6/2017", 5);
            projectPage.Dispose();
        }
示例#4
0
        public void Icrm_GivingManagerApprovelToARecord_ManagerApprovelShouldBeGiven()
        {
            var projectPage           = new IcrmProjectsPage(currentPage.myDriver);
            var managerApprovelResult = projectPage.GiveManagerApprovelToARecord(3);

            Assert.IsTrue(managerApprovelResult, "Manager approvel is not given");
            currentPage = projectPage;
            projectPage.Dispose();
        }
示例#5
0
        public void Icrm_AddTeamMemberToAProject_TeamMemberShouldBeAdded()
        {
            var projectPage = new IcrmProjectsPage(currentPage.myDriver);

            var teamMemberInsertionStatus = projectPage.AddNewTeamMemberTOAProject("Graphics", "Gtag");

            currentPage = projectPage;
            Assert.IsTrue(teamMemberInsertionStatus, "Team Member for the project is not added properly");
        }
示例#6
0
        public void Icrm_ClickOnTasks_TasksShouldBeDisplayed()
        {
            //Act
            currentPage = currentPage.SelectMainMenu("Tasks");

            //Assert
            var tasksPage = currentPage as IcrmTaskPage;

            Assert.IsTrue(tasksPage.myDriver.Url.EndsWith("TLXProjectTask.aspx"), "Clicking on Tasks is not opening Tasks page correctly");
        }
示例#7
0
        public void Icrm_NavigateToTimeGrid_TimeGridShouldBeOpenedInMainContentWindow()
        {
            var taskPage = new IcrmTaskPage(currentPage.myDriver);

            if (!taskPage.IsMainTabExpanded("timelinx"))
            {
                taskPage.NavigateMainTabTo("timelinx");
            }
            currentPage = taskPage.SelectMainMenu("timegrid");
            Assert.IsTrue(currentPage.myDriver.Title.Contains("TimeGrid"), "TimeGrid not opened correctly");
        }
示例#8
0
        public void Icrm_SelectATaskAndAddTime_TimeForTheTaskShouldBeAdded()
        {
            var taskPage      = new IcrmTaskPage(currentPage.myDriver);
            var timeEntryData = new TimeDTO
            {
                Location        = "office",
                ServiceCategory = "Emergency Work",
                Consultant      = "Lee Hogan",
                Duration        = "2",
                BillingComments = "This is to test the time entry in timesheet through automation"
            };

            currentPage = taskPage.AddTimeToTaskInTimeGrid("Project/Task", "Tag.Ltd", expectedProjectId, timeEntryData);
        }
示例#9
0
        public void Icrm_AddTimeToATask_TimeShouldBeAddedToTheTask()
        {
            var taskPage = new IcrmTaskPage(currentPage.myDriver);

            var timeEntryData = new TimeDTO
            {
                Location        = "office",
                ServiceCategory = "Emergency Work",
                Consultant      = "Lee Hogan",
                Duration        = "2",
                BillingComments = "This is to test the time entry through automation"
            };

            currentPage = taskPage.AddTimeToTask(timeEntryData);
        }
示例#10
0
        public void Icrm_LoginWithValidCredentials_LoginShouldBeSuccessful()
        {
            //Arrange
            IcrmLoginPage loginPage = new IcrmLoginPage(driver);

            //Act
            currentPage = loginPage.Login(ConfigurationManager.AppSettings["Username"], ConfigurationManager.AppSettings["Password"]);

            //Assert
            Assert.IsTrue(loginPage.IsLoginSuccessful(), "Login is failed.");
            Assert.IsNotNull(currentPage, "Error when login.");
            Assert.IsTrue(currentPage is IcrmAccountsPage, "After login, Accounts page is not returned");
            Assert.IsFalse(currentPage.myDriver.Url.EndsWith("Login.aspx"));

            loginPage.Dispose();
        }
示例#11
0
        public void Icrm_SearchForTask_TaskShouldBeDisplayed()
        {
            //Arrange
            var tasksPage = currentPage as IcrmTaskPage;

            //Act
            currentPage = tasksPage.SearchTask("Project #", "Equal to", "Tag.L-2");

            //Assert
            Assert.AreEqual(1, tasksPage.SearchResultGrid.GetTotalNumberOfSearchResult(), "Search result did not return correct number of tasks.");
            var allTasks = tasksPage.SearchResultGrid.GetRowByIndex(0);

            Assert.AreEqual("Acceptance Testing", allTasks["Task"], "Returned task result is not as expected.");

            tasksPage.Dispose();
        }
示例#12
0
        public void Icrm_ClickOnProjects_ProjectsShouldBeDisplayed()
        {
            //Arrange
            var accountsPage = currentPage as IcrmAccountsPage;

            //Act
            currentPage = accountsPage.SelectMainMenu("Projects");

            //Assert
            var projectsPage = currentPage as IcrmProjectsPage;

            Assert.IsNotNull(projectsPage, "Clicking on Projects menu does not return Projects Page");
            Assert.IsTrue(projectsPage.myDriver.Url.EndsWith("TLXProject.aspx"), "URL of Projects Page does not end with correct name.");
            Assert.IsTrue(projectsPage.SearchResultGrid.GetTotalNumberOfSearchResult() > 0, "Projects are not listed properly in porjects page.");

            accountsPage.Dispose();
        }
示例#13
0
        public void Icrm_CreateNewTask_NewTaskShouldBeSaved()
        {
            var projectTaskPage = new IcrmProjectsPage(currentPage.myDriver);

            currentPage.Dispose();

            var taskData = new TaskDTO
            {
                TaskContact = "Gtag, Gowtham",
                TaskName    = "Demo Task " + expectedProjectId,
                Category    = "testing",
                Department  = "Test",
                Phase       = "1",
                ParentTask  = null
            };
            var taskInsertionStatus = projectTaskPage.AddNewTask(taskData);

            currentPage = projectTaskPage;
            Assert.IsTrue(taskInsertionStatus, "Task for the project is not created properly");
        }
示例#14
0
        public void Icrm_SearchForAProject_ProjectShouldBeDisplayed()
        {
            //Arrange
            IcrmProjectsPage projectsPage = currentPage as IcrmProjectsPage;

            //IcrmProjectsPage projectsPage = new IcrmProjectsPage(currentPage.myDriver);
            //Act
            currentPage = projectsPage.SearchProject("Project #", "Equal to", ProjectNoToSearch);

            //Assert
            Assert.AreEqual(1, projectsPage.SearchResultGrid.GetTotalNumberOfSearchResult(), "Expected total number of results are wrong.");

            var allRows = projectsPage.SearchResultGrid.GetAllRows();

            Assert.AreEqual(1, allRows.Count, "Returned rows are not correct.");

            var actualProjectName = allRows[0][projectsPage.SearchResultGrid.GetColumnNames()[0]];

            Assert.AreEqual(ProjectNoToSearch, actualProjectName, "Searched project is not returned.");

            projectsPage.Dispose();
        }
示例#15
0
        public void Icrm_SearchForAnAccount_AccountShouldBeDisplayed()
        {
            int expectedNumberOfResults = 1;

            //Arrange
            IcrmAccountsPage accountsPage = currentPage as IcrmAccountsPage;

            //Act
            currentPage = accountsPage.SearchAccount("Account", "Equal to", ACCOUNT_NAME_TO_SEARCH);

            //Assert
            Assert.AreEqual(expectedNumberOfResults, accountsPage.SearchResultGrid.GetTotalNumberOfSearchResult(), "Expected total number of results are wrong.");

            var allRows = accountsPage.SearchResultGrid.GetAllRows();

            Assert.AreEqual(expectedNumberOfResults, allRows.Count, "Returned rows are not correct.");

            var actualAccountName = allRows[0][accountsPage.SearchResultGrid.GetColumnNames()[0]];

            Assert.AreEqual(ACCOUNT_NAME_TO_SEARCH, actualAccountName, "Searched account is not returned.");

            accountsPage.Dispose();
        }
示例#16
0
        public void Icrm_AssignTeamMemberToATask_TeamMemberShouldBeAssignedToTheTask()
        {
            var taskPage = new IcrmTaskPage(currentPage.myDriver);

            currentPage = taskPage.AssignTeamMemberToTask(1, "Gtag,");
        }