Esempio n. 1
0
 // [Test, Description("Verifying Whether User is able to send More Than 100 characters to the Project Title")]
 public void TC_07_ValidateProjectTitleLengthWithMoreThan100Characters()
 {
     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.ClickDashboard();
         System.Threading.Thread.Sleep(3000);
         addProject.ClickAddProject();
         addProject.ProjectLengthMoreThan100();
         System.Threading.Thread.Sleep(3000);
         addProject.ClickContentType();
         String path = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Length of the Title exceeded its limit");
         System.Threading.Thread.Sleep(7000);
         String str = addProject.GetTitleLength();
         Assert.IsTrue(VerifyEquals("100/100", str, "Length Of Project Title got exceeded to its limit as " + str + "", "Length Of Project Title Not got exceeded to its limit as " + str + ""));
         addProject.ClickClose();
         System.Threading.Thread.Sleep(5000);
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }
Esempio n. 2
0
 // [Test, Description("Verifying User is able to Add Project For GitLab with Mandatory Fields")]
 public void TC_05_ValidateAddingProjectForGitLabWithMandatoryFields()
 {
     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.ClickDashboard();
         System.Threading.Thread.Sleep(3000);
         addProject.ClickAddProject();
         String expected = addProject.EnterProjectTitle();
         System.Threading.Thread.Sleep(3000);
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(18000);
         addProject.ClickSourceControlTypeGitLab();
         System.Threading.Thread.Sleep(13000);
         addProject.ClickRepository();
         System.Threading.Thread.Sleep(5000);
         addProject.EnterPublishedPath("Publishing path to create project");
         System.Threading.Thread.Sleep(5000);
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(18000);
         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;
     }
 }
Esempio n. 3
0
 // [Test, Description("Verifying User is able to send more than 1000 characters to Description field in Create Project")]
 public void TC_08_ValidateProjectDescriptionLengthWithMoreThan1000Characters()
 {
     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.ClickDashboard();
         System.Threading.Thread.Sleep(3000);
         addProject.ClickAddProject();
         String expected = addProject.EnterProjectTitle();
         addProject.ClickContentType();
         System.Threading.Thread.Sleep(15000);
         addProject.ClickRepository();
         addProject.EnterPublishedPath("Publishing path to create project");
         String str = addProject.ProjectDescriptionMorethan1000();
         Console.WriteLine("The Text Beyonnd 1000 is " + str);
         String path = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path, "Length of the Description exceeded its limit");
         String str1 = addProject.GetDescriptionLength();
         Assert.IsTrue(VerifyEquals("1000/1000", str1, "Length Of Project Title got exceeded to its limit as " + str1 + "", "Length Of Project Title Not got exceeded to its limit as " + str1 + ""));
         addProject.ClickCreateProject();
         System.Threading.Thread.Sleep(7000);
         addProject.ClickNotifications();
         System.Threading.Thread.Sleep(5000);
         addProject.BackToProject();
         CreateDistributionPage distmodule = new CreateDistributionPage(driver);
         System.Threading.Thread.Sleep(7000);
         distmodule.SearchForProject(expected);
         System.Threading.Thread.Sleep(7000);
         String path1 = TakeScreenshot(driver);
         addProject.SuccessScreenshot(path1, "Description Length");
         String txt = addProject.GetDescriptionText();
         Assert.IsTrue(VerifyContainsText(txt, str, "Description Text is validated successfully", "Description Text is not validated successfully"));
         System.Threading.Thread.Sleep(5000);
     }
     catch (AssertionException)
     {
         fail("Assertion failed");
         throw;
     }
 }