Exemple #1
0
 // [Test, Description("Verifying User is able to Add Project For GitLab  with all Fields")]
 public void TC_02_ValidateCreateProjectForGitLabWithAllFields()
 {
     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.ClickSourceControlTypeGitLab();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickRepository();
         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, "GitLab Project Got created Successfully", "GitLab Project Not Created Succesfully"));
     }
     catch (AssertionException)
     {
         // addTestCaseStatus("Fail", testcaseID, "Test Case Failed");
         fail("Assertion failed");
         throw;
     }
 }