Example #1
0
 // [Test, Description("Verifying User is able to Add Project For Mercurial with all Fields")]
 public void TC_04_ValidateCreateProjectForMercurialWithAllFields()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickAddProject();
         System.Threading.Thread.Sleep(3000);
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickSourceControlTypeOno();
         System.Threading.Thread.Sleep(8000);
         addProject.EnterMercurialRepoPath();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.EnterDescription("This is to create Project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String status         = addProject.GetNotificationStatus();
         String projectDetails = addProject.GetCreatedProject();
         String path           = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Project Created Title");
         Assert.IsTrue(VerifyText("Success", status, "Project is Created with status:" + status + "", "Project is not created with status: " + status + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(15000);
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(3000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(3000);
         String actual = distmodule.getProjectTitle();
         String path1  = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "ProjectTitle");
         Assert.IsTrue(VerifyEquals(expected, actual, "Mercurial Project Got created Successfully", "Mercurial Project Not Created Succesfully"));
     }
     catch (AssertionException)
     {
         // addTestCaseStatus("Fail", testcaseID, "Test Case Failed");
         fail("Assertion failed");
         throw;
     }
 }
Example #2
0
 //[Test, Description("Verify User is able to add Distribution for the Mercurial Project with all Fields")]
 public void TC_03_ValidateCreateDistributionForMercurialProjectWithAllFields()
 {
     try
     {
         String TestName    = (TestContext.CurrentContext.Test.Name.ToString());
         String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString();
         CreateTest(TestName, description);
         System.Threading.Thread.Sleep(5000);
         AddProjectPage addProject = new AddProjectPage(driver);
         addProject.ClickAddProject();
         System.Threading.Thread.Sleep(3000);
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(5000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickSourceControlTypeOno();
         System.Threading.Thread.Sleep(8000);
         addProject.EnterMercurialRepoPath();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.EnterDescription("This is to create Project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(25000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         String status         = addProject.GetNotificationStatus();
         String projectDetails = addProject.GetCreatedProject();
         String path           = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Mercurial Project Created Successfully");
         Assert.IsTrue(VerifyText("Success", status, "Mercurial Project is Created with status:" + status + "", "Mercurial Project is not created with status: " + status + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(15000);
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(3000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(3000);
         distmodule.ClickDistribution();
         System.Threading.Thread.Sleep(8000);
         String expected1 = distmodule.EnterDistirbutionName();
         System.Threading.Thread.Sleep(7000);
         distmodule.EnterBranchForMercurial();
         System.Threading.Thread.Sleep(5000);
         distmodule.EnterTocPath();
         distmodule.EnterDescription("This is to create a distribution");
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickCreateDistribution();
         System.Threading.Thread.Sleep(40000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(15000);
         String status1 = addProject.GetNotificationStatus();
         String path1   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "Distribution: " + expected1 + " got Created successfully With TOC");
         Assert.IsTrue(VerifyText("Success", status1, "Distribution is Created For mercurial With TOC with status:" + status1 + "", "Distribution is not created with status: " + status1 + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickDistribution();
         System.Threading.Thread.Sleep(18000);
         String actual = distmodule.getDistributionName();
         String path2  = TakeScreenshot(driver);
         distmodule.SuccessScreenshot(path1, "Created Distribution");
         Assert.IsTrue(VerifyEquals(expected1, actual, "Create Distribution for Mercurial Project With TOC path is successful", "Create Distribution for Mercurial Project is not successful"));
         System.Threading.Thread.Sleep(8000);
         String expected2 = distmodule.EnterDistirbutionName();
         System.Threading.Thread.Sleep(7000);
         distmodule.EnterBranchWithoutTOCForMercurial();
         System.Threading.Thread.Sleep(5000);
         distmodule.EnterDescription("This is to create a distribution");
         System.Threading.Thread.Sleep(5000);
         distmodule.ClickCreateDistribution();
         System.Threading.Thread.Sleep(40000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(15000);
         String status2 = addProject.GetNotificationStatus();
         String path3   = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path3, "Distribution: " + expected2 + " got Created successfully Without TOC");
         Assert.IsTrue(VerifyText("Success", status2, "Distribution is Created For mercurial Without TOC with status:" + status2 + "", "Distribution is not created with status: " + status2 + ""));
         addProject.BackToProject();
         System.Threading.Thread.Sleep(3000);
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }