[Fusionforge-commits] FusionForge branch master updated. 44ec6b0fc5c6380cb9bac955e56f1aa8a6de3c38

Franck VILLAUME nerville at fusionforge.org
Sun Nov 17 17:07:34 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  44ec6b0fc5c6380cb9bac955e56f1aa8a6de3c38 (commit)
      from  89d6cda9c98e8c2ea5a717f9aa100fb7e716a409 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 44ec6b0fc5c6380cb9bac955e56f1aa8a6de3c38
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Nov 17 17:07:14 2013 +0100

    test: indent

diff --git a/tests/func/Tasks/createTaskTest.php b/tests/func/Tasks/createTaskTest.php
index 3f18196..e0368b2 100644
--- a/tests/func/Tasks/createTaskTest.php
+++ b/tests/func/Tasks/createTaskTest.php
@@ -45,368 +45,367 @@ require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
 
 class CreateTask extends FForge_SeleniumTestCase
 {
-    function testcreateTask()
-    {
-        $this->setUpTasks();
-        $this->createSomeTasks();
-        // $this->browseTasks();
-        $this->setTaskPriority();
-        $this->completeTask();
-        $this->closeTask();
-        $this->deleteTask();
-        // $this->assignTask();
-        $this->orderTask();
-        $this->registerEmailAddressForNotification();
-        // $this->createSubproject();
-        // $this->createPrivateSubproject();
-        // $this->displayGANTT();
-        // $this->displayActivityReportByDeveloper();
-        // $this->displayActivityReportBySubproject();
-        $this->exportCSV();
-    }
-
-    function setUpTasks()
-    {
-	$this->populateStandardTemplate(array('tasks'));
-        $this->init();
-
-        // Initialize "rep_time_tracking" table
-        $this->click("link=Reporting");
-        $this->waitForPageToLoad("30000");
-
-        $this->click("link=Initialize / Rebuild Reporting Tables");
-        $this->waitForPageToLoad("30000");
-        $this->click("im_sure");
-        $this->click("submit");
-        $this->waitForPageToLoad("30000");
-
-//        $this->switchUser('uadmin');
-        $this->gotoProject('ProjectA');
-
-        $this->clickAndWait("link=Tasks");
-        $this->assertTextPresent("To Do");
-        $this->assertTextPresent("Next Release");
-        $this->clickAndWait("link=To Do");
-        $this->assertTextPresent("No Matching Tasks found");
-     }
-
-    function createSomeTasks()
-    {
-        // Create a first task
-        $this->clickAndWait("link=Add Task");
-        $this->type("summary", "Task1: Hello Paris");
-        $this->type("details", "Details: Hello Paris");
-        $this->type("hours", "10");
-        $this->click("//body//div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
-        $this->waitForPageToLoad("30000");
-        $this->assertTextPresent("Task Created Successfully");
-
-        // Create a second task
-        $this->clickAndWait("link=Add Task");
-        $this->type("summary", "Task2: Hello France");
-        $this->type("details", "Details: Hello France");
-        $this->type("hours", "15");
-        $this->click("//body//div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
-        $this->waitForPageToLoad("30000");
-         $this->assertTextPresent("Task Created Successfully");
-
-        // Create a third task
-        $this->clickAndWait("link=Add Task");
-        $this->type("summary", "Task3: Hello World");
-        $this->type("details", "Details: Hello World");
-        $this->type("hours", "20");
-        $this->click("//body//div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
-        $this->waitForPageToLoad("30000");
-        $this->assertTrue($this->isTextPresent("Task Created Successfully"));
-    }
-
-    function browseTasks()
-    {
-        // Let us check that the 3 tasks appear on the list of tasks
-        $this->clickAndWait("link=Tasks");
-        $this->clickAndWait("link=To Do");
-        $this->assertTextPresent("Task1: Hello Paris");
-        $this->assertTextPresent("Task2: Hello France");
-        $this->assertTextPresent("Task3: Hello World");
-
-        // Let us assign tasks to users so that we can filter by assignee
-        $this->clickAndWait("link=exact:Task1: Hello Paris");
-        $this->removeSelection("assigned_to[]", "label=None");
-        $this->addSelection("assigned_to[]", "label=ucoredev Lastname");
-        $this->clickAndWait("submit");
-        $this->clickAndWait("link=exact:Task2: Hello France");
-        $this->removeSelection("assigned_to[]", "label=None");
-        $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
-        $this->clickAndWait("submit");
-        $this->clickAndWait("link=exact:Task3: Hello World");
-        $this->removeSelection("assigned_to[]", "label=None");
-        $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
-        $this->clickAndWait("submit");
-
-        // There should not be unassigned tasks
-        $this->select("_assigned_to", "label=Unassigned");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("No Matching Tasks found");
-
-        // Tasks 2 and 3 should be assigned to ucontrib
-        $this->select("_assigned_to", "label=ucontrib Lastname");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task2:");
-        $this->assertTextPresent("Task3:");
-
-        // Task 1 should be assigned to ucoredev
-        $this->select("_assigned_to", "label=ucoredev Lastname");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task1:");
-
-        // "Any" should show the 3 tasks
-        $this->select("_assigned_to", "label=Any");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task1:");
-        $this->assertTextPresent("Task2:");
-        $this->assertTextPresent("Task3:");
-
-        // Let use close a task to sort by status
-        $this->clickAndWait("link=exact:Task1: Hello Paris");
-        $this->click("status_id");
-        $this->select("status_id", "label=Closed");
-        $this->clickAndWait("submit");
-
-        // Select open tasks
-        $this->select("_status", "label=Open");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task2:");
-        $this->assertTextPresent("Task3:");
-
-        // Select closed tasks
-        $this->select("_status", "label=Closed");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task1:");
-
-        // Select "Any" status
-        $this->select("_status", "label=Any");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task1:");
-        $this->assertTextPresent("Task2:");
-        $this->assertTextPresent("Task3:");
-
-        // Let us add categories to sort by category
-        $this->clickAndWait("link=Admin");
-        $this->clickAndWait("link=Add/Edit Categories");
-        $this->type("name", "mycategory");
-        $this->clickAndWait("post_changes");
-        $this->assertTextPresent("Category Inserted");
-        $this->type("name", "yourcategory");
-        $this->clickAndWait("post_changes");
-        $this->assertTextPresent("Category Inserted");
-        $this->assertTextPresent("mycategory");
-        $this->assertTextPresent("yourcategory");
-
-        // Set Task1 to mycategory
-        $this->clickAndWait("link=To Do");
-        $this->clickAndWait("link=exact:Task1: Hello Paris");
-        $this->select("category_id", "label=mycategory");
-        $this->clickAndWait("submit");
-
-        // Set Task2 to yourcategory
-        $this->clickAndWait("link=To Do");
-        $this->clickAndWait("link=exact:Task2: Hello France");
-        $this->select("category_id", "label=yourcategory");
-        $this->clickAndWait("submit");
-
-        // Select "Any" category
-        $this->select("_category_id", "label=Any");
-        $this->clickAndWait("submit");
-        $this->select("_order", "label=Task Summary");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task1:");
-        $this->assertTextPresent("Task2:");
-        $this->assertTextPresent("Task3:");
-
-        // Select "mycategory" category
-        $this->select("_category_id", "label=mycategory");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task1:");
-        $this->assertFalse($this->isTextPresent("Task2:"));
-        $this->assertFalse($this->isTextPresent("Task3:"));
-
-        // Select "yourcategory" category
-        $this->select("_category_id", "label=yourcategory");
-        $this->clickAndWait("submit");
-        $this->assertFalse($this->isTextPresent("Task1:"));
-        $this->assertTextPresent("Task2:");
-        $this->assertFalse($this->isTextPresent("Task3:"));
-
-        // Set Detail view to Detailed
-        $this->clickAndWait("link=To Do");
-        $this->select("_category_id", "label=Any");
-        $this->select("_view", "label=Detailed");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Details: Hello Paris");
-        $this->assertTextPresent("Details: Hello France");
-        $this->assertTextPresent("Details: Hello World");
-
-        // Set Detail view to Summary
-        $this->select("_view", "label=Summary");
-        $this->clickAndWait("submit");
-        $this->assertFalse($this->isTextPresent("Details: Hello"));
-
-    }
-
-    function setTaskPriority()
-    {
-        // Set the priority of a task
-        $this->clickAndWait("link=exact:Task2: Hello France");
-        $this->select("priority", "label=5 - Highest");
-        $this->clickAndWait("submit");
-
-        // Check the priority is OK
-        $this->clickAndWait("link=exact:Task2: Hello France");
-        $this->assertTextPresent("Highest");
-    }
-
-    function completeTask()
-    {
-        // Set the completing value of a task
-        $this->select("percent_complete", "label=45%");
-        $this->click("//option[@value='45']");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task Updated Successfully");
-
-        // Check the percentage is OK
-        $this->clickAndWait("link=exact:Task2: Hello France");
-        $this->assertTextPresent("45%");
-    }
-
-    function closeTask()
-    {
-        // Done in browseTasks()
-    }
-
-    function deleteTask()
-    {
-        // Delete a task
-        $this->clickAndWait("link=To Do");
-        $this->clickAndWait("link=exact:Task3: Hello World");
-        $this->clickAndWait("link=Delete this task");
-        $this->click("confirm_delete");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Task Successfully Deleted");
-
-        // Let us check that Task3 no longer appears on the list of tasks
-        $this->clickAndWait("link=Tasks");
-        $this->clickAndWait("link=To Do");
-        $this->assertTextPresent("Task1: Hello Paris");
-        $this->assertTextPresent("Task2: Hello France");
-        $this->assertFalse($this->isTextPresent("Task3: Hello World"));
-    }
-
-    function assignTask()
-    {
-        $this->gotoProject("ProjectA");
-        $this->waitForPageToLoad("30000");
-        $this->click("link=Tasks");
-        $this->waitForPageToLoad("30000");
-        $this->click("link=To Do");
-        $this->waitForPageToLoad("30000");
-        $this->clickAndWait("link=exact:Task1: Hello Paris");
-        $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
-        $this->removeSelection("assigned_to[]", "label=ucoredev Lastname");
-        $this->clickAndWait("submit");
-
-        $this->switchUser('ucontrib');
-        $this->open( ROOT );
-        $this->waitForPageToLoad("30000");
-        $this->clickAndWait("link=ProjectA");
-        $this->clickAndWait("link=My Page");
-        // You cannot click on "Assigned Tasks" tabs,
-        // but the text is present in the page anyway.
-        // $this->click("link=Assigned Tasks");
-        $this->assertTextPresent("Task2: Hello France");
-        $this->switchUser('uadmin');
-        $this->open( ROOT );
-        $this->waitForPageToLoad("30000");
-    }
-
-    function orderTask()
-    {
-    }
-
-    function registerEmailAddressForNotification()
-    {
-    }
-
-    function createSubproject()
-    {
-	    $this->gotoProject("ProjectA");
-	    $this->waitForPageToLoad("30000");
-        $this->clickAndWait("link=Project Admin");
-        $this->clickAndWait("link=Tools");
-        $this->clickAndWait("link=Tasks Administration");
-        $this->clickAndWait("link=Add a Subproject");
-        $this->type("project_name", "public");
-        $this->type("//input[@name='description']", "This is a public subproject");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Subproject Inserted");
-        $this->clickAndWait("link=Tasks");
-        $this->assertTextPresent("This is a public subproject");
-    }
-
-    function createPrivateSubproject()
-    {
-        $this->gotoProject("ProjectA");
-        $this->waitForPageToLoad("30000");
-        $this->clickAndWait("link=Project Admin");
-        $this->clickAndWait("link=Tools");
-        $this->clickAndWait("link=Tasks Administration");
-        $this->clickAndWait("link=Add a Subproject");
-        $this->click("//input[@name='is_public' and @value='0']");
-        $this->type("project_name", "private");
-        $this->type("//input[@name='description']", "This is a private subproject");
-        $this->clickAndWait("submit");
-        $this->assertTextPresent("Subproject Inserted");
-        $this->clickAndWait("link=Tasks");
-        $this->assertTextPresent("This is a private subproject");
-    }
-
-    function displayGANTT()
-    {
-        // Display GANTT diagram
-        $this->open("/pm/reporting/index.php?what=tech&span=&period=lifespan&group_id=6#b");
-        $this->clickAndWait("link=Tasks");
-        $this->clickAndWait("link=To Do");
-        $this->click("link=Gantt Chart");
-        $this->waitForPopUp("Gantt_Chart", "30000");
-        $this->selectWindow("name=Gantt_Chart");
-        $this->assertTextPresent("Assignee");
-
-        $this->close();
-        $this->selectWindow("");
-    }
-
-    function displayActivityReportByDeveloper()
-    {
-        // Display activity report by developer
-        $this->clickAndWait("link=Reporting");
-        $this->select("what", "label=Report by Assignee");
-        $this->clickAndWait("//input[@value='Show']");
-        $this->assertTextPresent("Tasks By Assignee");
-        $this->assertTextPresent("ucontrib");
-        $this->assertFalse($this->isTextPresent("ucoredev"));
-    }
-
-    function displayActivityReportBySubproject()
-    {
-        // Display activity report by subproject
-        $this->select("what", "label=Report by Subproject");
-        $this->clickAndWait("//input[@value='Show']");
-        $this->assertTextPresent("Tasks By Category");
-        $this->assertTextPresent("To Do");
-    }
-
-    function exportCSV()
-    {
-    }
+	function testcreateTask()
+	{
+		$this->setUpTasks();
+		$this->createSomeTasks();
+		// $this->browseTasks();
+		$this->setTaskPriority();
+		$this->completeTask();
+		$this->closeTask();
+		$this->deleteTask();
+		// $this->assignTask();
+		$this->orderTask();
+		$this->registerEmailAddressForNotification();
+		// $this->createSubproject();
+		// $this->createPrivateSubproject();
+		// $this->displayGANTT();
+		// $this->displayActivityReportByDeveloper();
+		// $this->displayActivityReportBySubproject();
+		$this->exportCSV();
+	}
+
+	function setUpTasks()
+	{
+		$this->populateStandardTemplate(array('tasks'));
+		$this->init();
+
+		// Initialize "rep_time_tracking" table
+		$this->click("link=Reporting");
+		$this->waitForPageToLoad("30000");
+
+		$this->click("link=Initialize / Rebuild Reporting Tables");
+		$this->waitForPageToLoad("30000");
+		$this->click("im_sure");
+		$this->click("submit");
+		$this->waitForPageToLoad("30000");
+
+	//        $this->switchUser('uadmin');
+		$this->gotoProject('ProjectA');
+
+		$this->clickAndWait("link=Tasks");
+		$this->assertTextPresent("To Do");
+		$this->assertTextPresent("Next Release");
+		$this->clickAndWait("link=To Do");
+		$this->assertTextPresent("No Matching Tasks found");
+	}
+
+	function createSomeTasks()
+	{
+		// Create a first task
+		$this->clickAndWait("link=Add Task");
+		$this->type("summary", "Task1: Hello Paris");
+		$this->type("details", "Details: Hello Paris");
+		$this->type("hours", "10");
+		$this->click("//body//div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
+		$this->waitForPageToLoad("30000");
+		$this->assertTextPresent("Task Created Successfully");
+
+		// Create a second task
+		$this->clickAndWait("link=Add Task");
+		$this->type("summary", "Task2: Hello France");
+		$this->type("details", "Details: Hello France");
+		$this->type("hours", "15");
+		$this->click("//body//div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
+		$this->waitForPageToLoad("30000");
+		$this->assertTextPresent("Task Created Successfully");
+
+		// Create a third task
+		$this->clickAndWait("link=Add Task");
+		$this->type("summary", "Task3: Hello World");
+		$this->type("details", "Details: Hello World");
+		$this->type("hours", "20");
+		$this->click("//body//div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
+		$this->waitForPageToLoad("30000");
+		$this->assertTrue($this->isTextPresent("Task Created Successfully"));
+	}
+
+	function browseTasks()
+	{
+		// Let us check that the 3 tasks appear on the list of tasks
+		$this->clickAndWait("link=Tasks");
+		$this->clickAndWait("link=To Do");
+		$this->assertTextPresent("Task1: Hello Paris");
+		$this->assertTextPresent("Task2: Hello France");
+		$this->assertTextPresent("Task3: Hello World");
+
+		// Let us assign tasks to users so that we can filter by assignee
+		$this->clickAndWait("link=exact:Task1: Hello Paris");
+		$this->removeSelection("assigned_to[]", "label=None");
+		$this->addSelection("assigned_to[]", "label=ucoredev Lastname");
+		$this->clickAndWait("submit");
+		$this->clickAndWait("link=exact:Task2: Hello France");
+		$this->removeSelection("assigned_to[]", "label=None");
+		$this->addSelection("assigned_to[]", "label=ucontrib Lastname");
+		$this->clickAndWait("submit");
+		$this->clickAndWait("link=exact:Task3: Hello World");
+		$this->removeSelection("assigned_to[]", "label=None");
+		$this->addSelection("assigned_to[]", "label=ucontrib Lastname");
+		$this->clickAndWait("submit");
+
+		// There should not be unassigned tasks
+		$this->select("_assigned_to", "label=Unassigned");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("No Matching Tasks found");
+
+		// Tasks 2 and 3 should be assigned to ucontrib
+		$this->select("_assigned_to", "label=ucontrib Lastname");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task2:");
+		$this->assertTextPresent("Task3:");
+
+		// Task 1 should be assigned to ucoredev
+		$this->select("_assigned_to", "label=ucoredev Lastname");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task1:");
+
+		// "Any" should show the 3 tasks
+		$this->select("_assigned_to", "label=Any");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task1:");
+		$this->assertTextPresent("Task2:");
+		$this->assertTextPresent("Task3:");
+
+		// Let use close a task to sort by status
+		$this->clickAndWait("link=exact:Task1: Hello Paris");
+		$this->click("status_id");
+		$this->select("status_id", "label=Closed");
+		$this->clickAndWait("submit");
+
+		// Select open tasks
+		$this->select("_status", "label=Open");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task2:");
+		$this->assertTextPresent("Task3:");
+
+		// Select closed tasks
+		$this->select("_status", "label=Closed");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task1:");
+
+		// Select "Any" status
+		$this->select("_status", "label=Any");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task1:");
+		$this->assertTextPresent("Task2:");
+		$this->assertTextPresent("Task3:");
+
+		// Let us add categories to sort by category
+		$this->clickAndWait("link=Admin");
+		$this->clickAndWait("link=Add/Edit Categories");
+		$this->type("name", "mycategory");
+		$this->clickAndWait("post_changes");
+		$this->assertTextPresent("Category Inserted");
+		$this->type("name", "yourcategory");
+		$this->clickAndWait("post_changes");
+		$this->assertTextPresent("Category Inserted");
+		$this->assertTextPresent("mycategory");
+		$this->assertTextPresent("yourcategory");
+
+		// Set Task1 to mycategory
+		$this->clickAndWait("link=To Do");
+		$this->clickAndWait("link=exact:Task1: Hello Paris");
+		$this->select("category_id", "label=mycategory");
+		$this->clickAndWait("submit");
+
+		// Set Task2 to yourcategory
+		$this->clickAndWait("link=To Do");
+		$this->clickAndWait("link=exact:Task2: Hello France");
+		$this->select("category_id", "label=yourcategory");
+		$this->clickAndWait("submit");
+
+		// Select "Any" category
+		$this->select("_category_id", "label=Any");
+		$this->clickAndWait("submit");
+		$this->select("_order", "label=Task Summary");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task1:");
+		$this->assertTextPresent("Task2:");
+		$this->assertTextPresent("Task3:");
+
+		// Select "mycategory" category
+		$this->select("_category_id", "label=mycategory");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task1:");
+		$this->assertFalse($this->isTextPresent("Task2:"));
+		$this->assertFalse($this->isTextPresent("Task3:"));
+
+		// Select "yourcategory" category
+		$this->select("_category_id", "label=yourcategory");
+		$this->clickAndWait("submit");
+		$this->assertFalse($this->isTextPresent("Task1:"));
+		$this->assertTextPresent("Task2:");
+		$this->assertFalse($this->isTextPresent("Task3:"));
+
+		// Set Detail view to Detailed
+		$this->clickAndWait("link=To Do");
+		$this->select("_category_id", "label=Any");
+		$this->select("_view", "label=Detailed");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Details: Hello Paris");
+		$this->assertTextPresent("Details: Hello France");
+		$this->assertTextPresent("Details: Hello World");
+
+		// Set Detail view to Summary
+		$this->select("_view", "label=Summary");
+		$this->clickAndWait("submit");
+		$this->assertFalse($this->isTextPresent("Details: Hello"));
+	}
+
+	function setTaskPriority()
+	{
+		// Set the priority of a task
+		$this->clickAndWait("link=exact:Task2: Hello France");
+		$this->select("priority", "label=5 - Highest");
+		$this->clickAndWait("submit");
+
+		// Check the priority is OK
+		$this->clickAndWait("link=exact:Task2: Hello France");
+		$this->assertTextPresent("Highest");
+	}
+
+	function completeTask()
+	{
+		// Set the completing value of a task
+		$this->select("percent_complete", "label=45%");
+		$this->click("//option[@value='45']");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task Updated Successfully");
+
+		// Check the percentage is OK
+		$this->clickAndWait("link=exact:Task2: Hello France");
+		$this->assertTextPresent("45%");
+	}
+
+	function closeTask()
+	{
+		// Done in browseTasks()
+	}
+
+	function deleteTask()
+	{
+		// Delete a task
+		$this->clickAndWait("link=To Do");
+		$this->clickAndWait("link=exact:Task3: Hello World");
+		$this->clickAndWait("link=Delete this task");
+		$this->click("confirm_delete");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Task Successfully Deleted");
+
+		// Let us check that Task3 no longer appears on the list of tasks
+		$this->clickAndWait("link=Tasks");
+		$this->clickAndWait("link=To Do");
+		$this->assertTextPresent("Task1: Hello Paris");
+		$this->assertTextPresent("Task2: Hello France");
+		$this->assertFalse($this->isTextPresent("Task3: Hello World"));
+	}
+
+	function assignTask()
+	{
+		$this->gotoProject("ProjectA");
+		$this->waitForPageToLoad("30000");
+		$this->click("link=Tasks");
+		$this->waitForPageToLoad("30000");
+		$this->click("link=To Do");
+		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("link=exact:Task1: Hello Paris");
+		$this->addSelection("assigned_to[]", "label=ucontrib Lastname");
+		$this->removeSelection("assigned_to[]", "label=ucoredev Lastname");
+		$this->clickAndWait("submit");
+
+		$this->switchUser('ucontrib');
+		$this->open( ROOT );
+		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("link=ProjectA");
+		$this->clickAndWait("link=My Page");
+		// You cannot click on "Assigned Tasks" tabs,
+		// but the text is present in the page anyway.
+		// $this->click("link=Assigned Tasks");
+		$this->assertTextPresent("Task2: Hello France");
+		$this->switchUser('uadmin');
+		$this->open( ROOT );
+		$this->waitForPageToLoad("30000");
+	}
+
+	function orderTask()
+	{
+	}
+
+	function registerEmailAddressForNotification()
+	{
+	}
+
+	function createSubproject()
+	{
+		$this->gotoProject("ProjectA");
+		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("link=Project Admin");
+		$this->clickAndWait("link=Tools");
+		$this->clickAndWait("link=Tasks Administration");
+		$this->clickAndWait("link=Add a Subproject");
+		$this->type("project_name", "public");
+		$this->type("//input[@name='description']", "This is a public subproject");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Subproject Inserted");
+		$this->clickAndWait("link=Tasks");
+		$this->assertTextPresent("This is a public subproject");
+	}
+
+	function createPrivateSubproject()
+	{
+		$this->gotoProject("ProjectA");
+		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("link=Project Admin");
+		$this->clickAndWait("link=Tools");
+		$this->clickAndWait("link=Tasks Administration");
+		$this->clickAndWait("link=Add a Subproject");
+		$this->click("//input[@name='is_public' and @value='0']");
+		$this->type("project_name", "private");
+		$this->type("//input[@name='description']", "This is a private subproject");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Subproject Inserted");
+		$this->clickAndWait("link=Tasks");
+		$this->assertTextPresent("This is a private subproject");
+	}
+
+	function displayGANTT()
+	{
+		// Display GANTT diagram
+		$this->open("/pm/reporting/index.php?what=tech&span=&period=lifespan&group_id=6#b");
+		$this->clickAndWait("link=Tasks");
+		$this->clickAndWait("link=To Do");
+		$this->click("link=Gantt Chart");
+		$this->waitForPopUp("Gantt_Chart", "30000");
+		$this->selectWindow("name=Gantt_Chart");
+		$this->assertTextPresent("Assignee");
+
+		$this->close();
+		$this->selectWindow("");
+	}
+
+	function displayActivityReportByDeveloper()
+	{
+		// Display activity report by developer
+		$this->clickAndWait("link=Reporting");
+		$this->select("what", "label=Report by Assignee");
+		$this->clickAndWait("//input[@value='Show']");
+		$this->assertTextPresent("Tasks By Assignee");
+		$this->assertTextPresent("ucontrib");
+		$this->assertFalse($this->isTextPresent("ucoredev"));
+	}
+
+	function displayActivityReportBySubproject()
+	{
+		// Display activity report by subproject
+		$this->select("what", "label=Report by Subproject");
+		$this->clickAndWait("//input[@value='Show']");
+		$this->assertTextPresent("Tasks By Category");
+		$this->assertTextPresent("To Do");
+	}
+
+	function exportCSV()
+	{
+	}
 }
 
 // Local Variables:

-----------------------------------------------------------------------

Summary of changes:
 tests/func/Tasks/createTaskTest.php |  723 +++++++++++++++++------------------
 1 file changed, 361 insertions(+), 362 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list