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 a86c47decaa8898661e85a3fe8f365979ecfde53 (commit) via 12295d37edadf93c93d610e2ae3b6b007b5f143d (commit) from 30cbfab9c1dd9d19cc33a1e31f198730502f1e92 (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 ----------------------------------------------------------------- https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=a86c47decaa8898661e85a3fe8f365979ecfde53 commit a86c47decaa8898661e85a3fe8f365979ecfde53 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Tue Apr 27 16:21:39 2021 +0000 speed up func tests diff --git a/tests/func/20_Forums/forumsTest.php b/tests/func/20_Forums/forumsTest.php index a447273..e6328cb 100644 --- a/tests/func/20_Forums/forumsTest.php +++ b/tests/func/20_Forums/forumsTest.php @@ -60,19 +60,19 @@ class CreateForum extends FForge_SeleniumTestCase $this->assertFalse($this->isTextPresent("Permission denied.")); $this->assertTrue($this->isTextPresent("open-discussion")); $this->clickAndWait("link=open-discussion"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Start New Thread"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("subject", "Message1"); $this->type("body", "Text1"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Message Posted Successfully")); $this->clickAndWait("link=Forums"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("open-discussion")); $this->clickAndWait("link=open-discussion"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Message1")); } @@ -89,12 +89,12 @@ class CreateForum extends FForge_SeleniumTestCase $this->switchUser(FORGE_ADMIN_USERNAME); $this->open( ROOT.'/forum/message.php?msg_id=6' ); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Welcome to developers")); $this->logout(); $this->open( ROOT.'/forum/message.php?msg_id=6' ); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isLoginRequired()); $this->triggeredLogin(FORGE_ADMIN_USERNAME); $this->assertTrue($this->isTextPresent("Welcome to developers")); @@ -116,14 +116,14 @@ class CreateForum extends FForge_SeleniumTestCase $this->clickAndWait("link=open-discussion"); $this->clickAndWait("link=Welcome to open-discussion"); $this->clickAndWait("link=[ Reply ]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isLoginRequired()); $this->triggeredLogin(FORGE_ADMIN_USERNAME); $this->type("body", "Here is my 19823 reply"); $this->clickAndWait("submit"); $this->assertTextPresent("Message Posted Successfully"); $this->clickAndWait("link=Welcome to open-discussion"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTextPresent("Here is my 19823 reply"); } @@ -137,26 +137,26 @@ class CreateForum extends FForge_SeleniumTestCase $this->gotoProject('ProjectA'); $this->clickAndWait("link=Mailing Lists"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//body//main[@id='maindiv']//a[.='Administration']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Add Mailing List"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("list_name", "toto"); $this->type("//input[@name='description']", "Toto mailing list"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("List Added")); $this->clickAndWait("link=Forums"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//body//main[@id='maindiv']//a[.='Administration']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Add Forum"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("forum_name", "toto"); $this->type("//input[@name='description']", "Toto forum"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Error: a mailing list with the same email address already exists")); } diff --git a/tests/func/20_News/newsTest.php b/tests/func/20_News/newsTest.php index be0488c..2ddad87 100644 --- a/tests/func/20_News/newsTest.php +++ b/tests/func/20_News/newsTest.php @@ -58,47 +58,47 @@ class CreateNews extends FForge_SeleniumTestCase // Create a simple news. $this->clickAndWait("link=News"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("summary", "First news"); $this->type("details", "This is a simple news."); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=News"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("First news")); $this->clickAndWait("link=First news"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("First news")); $this->assertTrue($this->isTextPresent("This is a simple news.")); // Create a second news. $this->clickAndWait("link=News"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("summary", "Second news"); $this->type("details", "This is another text"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=News"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Second news"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Second news")); $this->assertTrue($this->isTextPresent("This is another text")); // Check that news are visible in the activity $this->clickAndWait("link=Activity"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTextPresent("First news"); $this->assertTextPresent("Second news"); // Check modification of a news. $this->clickAndWait("link=News"); $this->clickAndWait("//a[contains(@href, '" . ROOT . "/news/admin/?group_id=7')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Second news"); $this->type("details", "This is another text (corrected)"); $this->clickAndWait("submit"); @@ -116,7 +116,7 @@ class CreateNews extends FForge_SeleniumTestCase $this->assertTextPresent("Special ' chars \""); $this->clickAndWait("link=News"); $this->clickAndWait("//a[contains(@href, '". ROOT . "/news/admin/?group_id=7')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Test3"); $this->clickAndWait("//form[@id='newsadminform']//input[@name='status' and @value=4]"); $this->clickAndWait("submit"); diff --git a/tests/func/20_Surveys/surveysTest.php b/tests/func/20_Surveys/surveysTest.php index 16f4e8d..7226c6d 100644 --- a/tests/func/20_Surveys/surveysTest.php +++ b/tests/func/20_Surveys/surveysTest.php @@ -89,7 +89,7 @@ class Surveys extends FForge_SeleniumTestCase $this->clickAndWait("//input[@name='to_add[]' and @value='3']"); $this->clickAndWait("submit"); $this->clickAndWait("link=My first survey: L'année dernière à Noël, 3 < 4, 中国 \" <em>, père & fils"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTextPresent("This is a my fifth question (text field) ?"); $this->assertTextPresent("This is a comment line of text"); $this->assertTextPresent("This is my third question (yes/no) ?"); @@ -103,7 +103,7 @@ class Surveys extends FForge_SeleniumTestCase $this->clickAndWait("link=Administration"); $this->clickAndWait("link=Show Results"); $this->clickAndWait("link=My first survey: L'année dernière à Noël, 3 < 4, 中国 \" <em>, père & fils"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTextPresent("Warning - you are about to vote a second time on this survey."); $this->clickAndWait("link=Administration"); $this->clickAndWait("link=Show Results"); @@ -161,13 +161,13 @@ class Surveys extends FForge_SeleniumTestCase // // Log out and check no survey is visible // $this->clickAndWait("link=Log Out"); // $this->select($this->byName("none"))->selectOptionByLabel("projecta"); -// $this->waitForPageToLoad("30000"); +// $this->waitForPageToLoad(); // $this->clickAndWait("link=Surveys"); // $this->assertTextPresent("No Survey is found"); // // // Check direct access to a survey. // $this->open("/survey/survey.php?group_id=6&survey_id=1"); -// $this->waitForPageToLoad("30000"); +// $this->waitForPageToLoad(); // $this->assertFalse($this->isTextPresent("My first survey: L'année dernière à Noël, 3 < 4, 中国 \" <em>, père & fils")); } } diff --git a/tests/func/20_Tasks/createTaskTest.php b/tests/func/20_Tasks/createTaskTest.php index b555e4c..490b711 100644 --- a/tests/func/20_Tasks/createTaskTest.php +++ b/tests/func/20_Tasks/createTaskTest.php @@ -78,13 +78,13 @@ class CreateTask extends FForge_SeleniumTestCase // Initialize "rep_time_tracking" table $this->clickAndWait("link=Reporting"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Initialize / Rebuild Reporting Tables"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("im_sure"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // $this->switchUser('uadmin'); $this->gotoProject('ProjectA'); @@ -104,7 +104,7 @@ class CreateTask extends FForge_SeleniumTestCase $this->type("details", "Details: Hello Paris"); $this->type("hours", "10"); $this->clickAndWait("//body//main[@id='maindiv']/form/table/tbody/tr[9]/td/input"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTextPresent("Task Created Successfully"); // Create a second task @@ -113,7 +113,7 @@ class CreateTask extends FForge_SeleniumTestCase $this->type("details", "Details: Hello France"); $this->type("hours", "15"); $this->clickAndWait("//body//main[@id='maindiv']/form/table/tbody/tr[9]/td/input"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTextPresent("Task Created Successfully"); // Create a third task @@ -122,7 +122,7 @@ class CreateTask extends FForge_SeleniumTestCase $this->type("details", "Details: Hello World"); $this->type("hours", "20"); $this->clickAndWait("//body//main[@id='maindiv']/form/table/tbody/tr[9]/td/input"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Task Created Successfully")); } @@ -309,11 +309,11 @@ class CreateTask extends FForge_SeleniumTestCase function assignTask() { $this->gotoProject("ProjectA"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Tasks"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=To Do"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Task1: Hello Paris"); $this->addSelection("assigned_to[]", "label=ucontrib Lastname"); $this->removeSelection("assigned_to[]", "label=ucoredev Lastname"); @@ -321,7 +321,7 @@ class CreateTask extends FForge_SeleniumTestCase $this->switchUser('ucontrib'); $this->open(ROOT); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=ProjectA"); $this->clickAndWait("link=My Page"); // You cannot click on "Assigned Tasks" tabs, @@ -330,7 +330,7 @@ class CreateTask extends FForge_SeleniumTestCase $this->assertTextPresent("Task2: Hello France"); $this->switchUser('uadmin'); $this->open(ROOT); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); } function orderTask() @@ -344,7 +344,7 @@ class CreateTask extends FForge_SeleniumTestCase function createSubproject() { $this->gotoProject("ProjectA"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Project Admin"); $this->clickAndWait("link=Tools"); $this->clickAndWait("link=Tasks Administration"); @@ -360,7 +360,7 @@ class CreateTask extends FForge_SeleniumTestCase function createPrivateSubproject() { $this->gotoProject("ProjectA"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Project Admin"); $this->clickAndWait("link=Tools"); $this->clickAndWait("link=Tasks Administration"); @@ -381,7 +381,7 @@ class CreateTask extends FForge_SeleniumTestCase $this->clickAndWait("link=Tasks"); $this->clickAndWait("link=To Do"); $this->clickAndWait("link=Gantt Chart"); - $this->waitForPopUp("Gantt_Chart", "30000"); + $this->waitForPopUp("Gantt_Chart", ); $this->selectWindow("name=Gantt_Chart"); $this->assertTextPresent("Assignee"); diff --git a/tests/func/20_Trackers/relationTest.php b/tests/func/20_Trackers/relationTest.php index 80c0412..a900acb 100644 --- a/tests/func/20_Trackers/relationTest.php +++ b/tests/func/20_Trackers/relationTest.php @@ -58,18 +58,18 @@ class CreateTrackerRelation extends FForge_SeleniumTestCase // Testing extra-fields $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//a[contains(@href, '".ROOT. "/tracker/admin/')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Custom Fields"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "Depends on"); $this->type("alias", "depends_on"); $this->clickAndWait("//input[@name='field_type' and @value=9]"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Depends on")); } } diff --git a/tests/func/20_Trackers/trackersTest.php b/tests/func/20_Trackers/trackersTest.php index cce7891..5d7da14 100644 --- a/tests/func/20_Trackers/trackersTest.php +++ b/tests/func/20_Trackers/trackersTest.php @@ -58,24 +58,24 @@ class CreateTracker extends FForge_SeleniumTestCase // Test: Create a simple bug report (Message1/Text1). $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Bugs")); $this->assertTrue($this->isTextPresent("Support")); $this->assertTrue($this->isTextPresent("Patches")); $this->assertTrue($this->isTextPresent("Feature Requests")); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//a[contains(@href, '".ROOT. "/tracker/admin/')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit New"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("summary", "Summary1"); $this->type("details", "Description1"); $this->clickAndWait("//form[@id='trackeraddform']//input[@type='submit']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Summary1")); $this->clickAndWait("link=Summary1"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Description1")); // Test: Adding a comment and checking that it is recorded. @@ -100,9 +100,9 @@ class CreateTracker extends FForge_SeleniumTestCase // Test: Updating the URL extra field and checking that it is recorded. $this->type("//form[@id='trackermodform']//input[@type='text']", "http://google.com/"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Summary1"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); try { $this->assertEquals("http://google.com/", $this->getValue("//form[@id='trackermodform']//input[@type='text']")); } catch (PHPUnit\Framework\AssertionFailedError $e) { @@ -112,10 +112,10 @@ class CreateTracker extends FForge_SeleniumTestCase // Test: Updating the priority and checking that it is recorded. $this->select($this->byName("priority"))->selectOptionByLabel("5 - Highest"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("5")); $this->clickAndWait("link=Summary1"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); } function testExtraFields() @@ -126,20 +126,20 @@ class CreateTracker extends FForge_SeleniumTestCase // Testing extra-fields $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//a[contains(@href, '".ROOT. "/tracker/admin/')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Custom Fields"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "Number"); $this->type("alias", "number"); $this->clickAndWait("field_type"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='field-number']/td[9]/a[1]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "1"); $this->clickAndWait("post_changes"); $this->assertTextPresent("Element inserted"); @@ -150,22 +150,22 @@ class CreateTracker extends FForge_SeleniumTestCase // Testing [#3609]: Select Box does not accept 0 as choice $this->type("name", "0"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Element inserted")); // Testing [#3649]: 0 not accepted when modifying a select list value $this->clickAndWait("link=Manage Custom Fields"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='field-number']/td[8]/a[5]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "10"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='field-number']/td[8]/a[5]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "0"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Element updated")); } @@ -177,24 +177,24 @@ class CreateTracker extends FForge_SeleniumTestCase // Create a new tracker and delete it after. $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//a[contains(@href,'".ROOT."/tracker/admin/')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "newTracker"); $this->type("//input[@name='description']", "This is a new tracker"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Tracker created successfully")); $this->assertTrue($this->isTextPresent("newTracker")); $this->assertTrue($this->isTextPresent("This is a new tracker")); $this->clickAndWait("link=newTracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Delete"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("sure"); $this->clickAndWait("really_sure"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Successfully Deleted.")); $this->assertFalse($this->isTextPresent("newTracker")); $this->assertFalse($this->isTextPresent("This is a new tracker")); diff --git a/tests/func/20_Trackers/workflowTest.php b/tests/func/20_Trackers/workflowTest.php index 6a8ba2d..be907fe 100644 --- a/tests/func/20_Trackers/workflowTest.php +++ b/tests/func/20_Trackers/workflowTest.php @@ -60,39 +60,39 @@ class CreateTrackerWorkflow extends FForge_SeleniumTestCase $this->clickAndWait("link=Tracker"); $this->clickAndWait("link=Bugs"); $this->clickAndWait("//a[contains(@href, '".ROOT. "/tracker/admin/')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Custom Fields"); $this->type("name", "MyStatus"); $this->type("alias", "mystatus"); $this->clickAndWait("//input[@name='field_type' and @value=7]"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='field-mystatus']/td[9]/a[1]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "New"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Custom Fields"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='field-mystatus']/td[9]/a[1]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "Analyse"); $this->select($this->byName("status_id"))->selectOptionByLabel("Open"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Workflow"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Custom Fields"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='field-mystatus']/td[9]/a[1]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "Candidate"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Custom Fields"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='field-mystatus']/td[9]/a[1]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("name", "Open"); $this->clickAndWait("post_changes"); $this->type("name", "Resolved"); @@ -109,9 +109,9 @@ class CreateTrackerWorkflow extends FForge_SeleniumTestCase $this->type("name", "Closed"); $this->select($this->byName("status_id"))->selectOptionByLabel("Closed"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Manage Workflow"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr[@id='configuring-1']//td[3]/input"); $this->clickAndWait("//tr[@id='configuring-1']//td[4]/input"); @@ -200,7 +200,7 @@ class CreateTrackerWorkflow extends FForge_SeleniumTestCase $this->clickAndWait("//tr[@id='configuring-10']//td[9]/input"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Workflow saved")); // Ensure that it is not possible to configure the workflow without initial state. @@ -215,13 +215,13 @@ class CreateTrackerWorkflow extends FForge_SeleniumTestCase $this->clickAndWait("//tr[@id='initval']//td[9]/input"); $this->clickAndWait("//tr[@id='initval']//td[10]/input"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Error: Initial values not saved")); $this->assertTrue($this->isTextPresent("Workflow saved")); // unset postponned $this->clickAndWait("//tr[@id='initval']//td[9]/input"); $this->clickAndWait("post_changes"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Workflow saved")); } } diff --git a/tests/func/30_RBAC/rbacTest.php b/tests/func/30_RBAC/rbacTest.php index 78c8c63..4b786aa 100644 --- a/tests/func/30_RBAC/rbacTest.php +++ b/tests/func/30_RBAC/rbacTest.php @@ -35,13 +35,13 @@ class RBAC extends FForge_SeleniumTestCase $this->gotoProject('ProjectA'); $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Project Information")); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Current Project Members")); $this->clickAndWait("//tr/td/form/div[contains(.,'Anonymous')]/../../../td/form/div/input[contains(@value,'Unlink Role')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Role unlinked successfully")); $this->createUser ('staffmember') ; @@ -49,7 +49,7 @@ class RBAC extends FForge_SeleniumTestCase $this->assertFalse($this->isTextPresent("ProjectA")); $this->open( ROOT . '/projects/projecta') ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isLoginRequired()); $this->triggeredLogin('staffmember'); $this->assertTrue($this->isTextPresent("Project Members")); @@ -61,25 +61,25 @@ class RBAC extends FForge_SeleniumTestCase $this->switchUser(FORGE_ADMIN_USERNAME); $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Create "Project approvers" role $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='role_name']", "Project approvers") ; $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Grant it permissions $this->select($this->byXPath("//select[@name='data[approve_projects][-1]']"))->selectOptionByLabel("Approve projects"); $this->select($this->byXPath("//select[@name='data[approve_news][-1]']"))->selectOptionByLabel("Approve news"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Check permissions were saved $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("Project approvers") ; $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $selectedOptions = $this->select($this->byXPath("//select[@name='data[approve_projects][-1]']"))->selectedLabels(); $this->assertEquals(array("Approve projects"), $selectedOptions); @@ -90,7 +90,7 @@ class RBAC extends FForge_SeleniumTestCase // Whoops, we don't actually want the news moderation bit, unset it $this->select($this->byXPath("//select[@name='data[approve_news][-1]']"))->selectOptionByLabel("No Access"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $selectedOptions = $this->select($this->byXPath("//select[@name='data[approve_projects][-1]']"))->selectedLabels(); $this->assertEquals(array("Approve projects"), $selectedOptions); $selectedOptions = $this->select($this->byXPath("//select[@name='data[approve_news][-1]']"))->selectedLabels(); @@ -102,35 +102,35 @@ class RBAC extends FForge_SeleniumTestCase // Add them to their respective roles, check they're here $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("Project approvers"); $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='form_unix_name']", "projapp") ; $this->clickAndWait("//input[@value='Add User']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("projapp Lastname")); $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("News moderators") ; $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='form_unix_name']", "newsmod") ; $this->clickAndWait("//input[@value='Add User']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("newsmod Lastname")); // Add a wrong user to the role, then remove it $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='form_unix_name']", "projapp") ; $this->clickAndWait("//input[@value='Add User']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("projapp Lastname")); $this->assertTrue($this->isTextPresent("newsmod Lastname")); $this->clickAndWait("//a[contains(@href,'/users/projapp')]/../../td/input[@type='checkbox']") ; $this->clickAndWait("//input[@name='reallyremove']") ; $this->clickAndWait("//input[@name='dormusers']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("projapp Lastname")); $this->assertTrue($this->isTextPresent("newsmod Lastname")); @@ -140,13 +140,13 @@ class RBAC extends FForge_SeleniumTestCase // Temporarily grant project approval rights to user // (For cases where project_registration_restricted=true) $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("Project approvers"); $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='form_unix_name']", "toto") ; $this->clickAndWait("//input[@value='Add User']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("toto Lastname")); // Register project @@ -154,114 +154,114 @@ class RBAC extends FForge_SeleniumTestCase // Revoke project approval rights $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("Project approvers"); $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//a[contains(@href,'/users/toto')]/../../td/input[@type='checkbox']") ; $this->clickAndWait("//input[@name='reallyremove']") ; $this->clickAndWait("//input[@name='dormusers']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("toto Lastname")); // Try approving it as two users without the right to do so $this->switchUser ("toto") ; $this->open( ROOT . '/admin/approve-pending.php') ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isPermissionDenied()) ; $this->switchUser ("newsmod") ; $this->open( ROOT . '/admin/approve-pending.php') ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isPermissionDenied()) ; // Submit a news in the project $this->switchUser ("toto") ; $this->gotoProject ("TotoProject") ; $this->clickAndWait("link=News"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("summary", "First TotoNews"); $this->type("details", "This is a simple news for Toto's project."); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Try to push it to front page with user toto $this->open( ROOT . '/admin/pending-news.php') ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isPermissionDenied()) ; // Try to push it to front page with user projapp $this->switchUser ("projapp") ; $this->open( ROOT . '/admin/pending-news.php') ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isPermissionDenied()) ; // Push it to front page with user newsmod $this->switchUser ("newsmod") ; $this->open( ROOT . '/admin/pending-news.php') ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isTextPresent("These items need to be approved")) ; $this->assertTrue ($this->isTextPresent("First TotoNews")) ; $this->clickAndWait("//a[contains(.,'First TotoNews')]") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//input[@type='radio' and @value='1']") ; $this->clickAndWait("submit") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isTextPresent("These items were approved this past week")) ; $this->open( ROOT ) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isTextPresent("First TotoNews")) ; // Non-regression test for #265 $this->logout(); $this->open( ROOT ) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue ($this->isTextPresent("First TotoNews")) ; $this->clickAndWait("link=First TotoNews") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse ($this->isPermissionDenied()) ; // Non-regression test for Adacore ticket K802-005 // (Deletion of global roles) $this->switchUser(FORGE_ADMIN_USERNAME); $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='role_name']", "Temporary role") ; $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//option[.='Temporary role']")); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("Temporary role"); $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='form_unix_name']", "toto") ; $this->clickAndWait("//input[@value='Add User']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("toto Lastname")); $this->clickAndWait("//input[@type='checkbox' and @name='sure']") ; $this->clickAndWait("//input[@value='Delete role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Cannot remove a non empty role")); $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("Temporary role"); $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//a[contains(@href,'/users/toto')]/../../td/input[@type='checkbox']") ; $this->clickAndWait("//input[@name='reallyremove']") ; $this->clickAndWait("//input[@name='dormusers']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//option[.='Temporary role']")); $this->select($this->byXPath("//form[contains(@action,'globalroleedit.php')]//select[@name='role_id']"))->selectOptionByLabel("Temporary role"); $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Edit Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//input[@type='checkbox' and @name='sure']") ; $this->clickAndWait("//input[@value='Delete role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isElementPresent("//option[.='Temporary role']")); } @@ -276,38 +276,38 @@ class RBAC extends FForge_SeleniumTestCase // Create "Project moderators" role $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='role_name']", "Project moderators") ; $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Grant it permissions $this->select($this->byXPath("//select[@name='data[approve_projects][-1]']"))->selectOptionByLabel("Approve projects"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Add bigboss $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='form_unix_name']", "bigboss") ; $this->clickAndWait("//input[@value='Add User']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("bigboss Lastname")); // Create "Documentation masters" role $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='role_name']", "Documentation masters") ; $this->clickAndWait("//form[contains(@action,'globalroleedit.php')]//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Make it shared $this->clickAndWait("//input[@type='checkbox' and @name='public']") ; $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Add docmaster $this->type ("//form[contains(@action,'globalroleedit.php')]//input[@name='form_unix_name']", "docmaster") ; $this->clickAndWait("//input[@value='Add User']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("docmaster Lastname")); // Register projects @@ -318,105 +318,105 @@ class RBAC extends FForge_SeleniumTestCase // Create roles $this->gotoProject ("MetaProject") ; $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'roleedit.php')]/..//input[@name='role_name']", "Senior Developer") ; $this->clickAndWait("//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'roleedit.php')]/..//input[@name='role_name']", "Junior Developer") ; $this->clickAndWait("//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'roleedit.php')]/..//input[@name='role_name']", "Doc Writer") ; $this->clickAndWait("//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Add users $this->gotoProject ("MetaProject") ; $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "guru") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Senior Developer"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("guru Lastname")); $this->assertTrue($this->isElementPresent("//tr/td/a[.='guru Lastname']/../../td/div[contains(.,'Senior Developer')]")) ; $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "trainee") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Junior Developer"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("trainee Lastname")); $this->assertTrue($this->isElementPresent("//tr/td/a[.='trainee Lastname']/../../td/div[contains(.,'Junior Developer')]")) ; $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "docmaster") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Doc Writer"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("docmaster Lastname")); $this->assertTrue($this->isElementPresent("//tr/td/a[.='docmaster Lastname']/../../td/div[contains(.,'Doc Writer')]")) ; $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "bigboss") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Senior Developer"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("bigboss Lastname")); $this->assertTrue($this->isElementPresent("//tr/td/div[contains(.,'Senior Developer')]/..//input[@value='Remove']/../input[@name='username' and @value='bigboss']")) ; // Oops, bigboss doesn't need the extra role after all $this->clickAndWait("//tr/td/div[contains(.,'Senior Developer')]/../div/form/input[@name='username' and @value='bigboss']/../input[@value='Remove']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isElementPresent("//tr/td/div[contains(.,'Senior Developer')]/../div/form/input[@value='Remove']/../input[@name='username' and @value='bigboss']")) ; // Remove/re-add a user $this->clickAndWait("//tr/td/div[contains(.,'Junior Developer')]/../div/form/input[@name='username' and @value='trainee']/../input[@value='Remove']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("trainee Lastname")); $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "trainee") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Junior Developer"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("trainee Lastname")); $this->assertTrue($this->isElementPresent("//tr/td/a[.='trainee Lastname']/../../td/div[contains(.,'Junior Developer')]")) ; // Edit permissions of the JD role $this->gotoProject ("MetaProject") ; $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//td/form/div[contains(.,'Junior Developer')]/../div/input[@value='Edit Permissions']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//select[contains(@name,'data[frs_admin]')]"))->selectOptionByLabel("FRS access"); $this->select($this->byXPath("//select[contains(@name,'data[docman]')]"))->selectOptionByLabel("Read only"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $selectedOptions = $this->select($this->byXPath("//select[contains(@name,'data[docman]')]"))->selectedLabels(); $this->assertEquals(array("Read only"), $selectedOptions); $selectedOptions = $this->select($this->byXPath("//select[contains(@name,'data[frs_admin]')]"))->selectedLabels(); $this->assertEquals(array("FRS access"), $selectedOptions); $this->select($this->byXPath("//select[contains(@name,'data[new_frs]')]"))->selectOptionByLabel("Read only"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $selectedOptions = $this->select($this->byXPath("//select[contains(@name,'data[new_frs]')]"))->selectedLabels(); $this->assertEquals(array("Read only"), $selectedOptions); // Check that SD is technician on trackers but DM isn't $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit New"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//select[@name='assigned_to']")) ; $this->assertTrue($this->isElementPresent("//select[@name='assigned_to']/option[.='guru Lastname']")) ; $this->assertFalse($this->isElementPresent("//select[@name='assigned_to']/option[.='docmaster Lastname']")) ; @@ -425,118 +425,118 @@ class RBAC extends FForge_SeleniumTestCase $this->switchUser('guru'); $this->gotoProject ("MetaProject") ; $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit New"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//select[@name='assigned_to']")) ; $this->switchUser('trainee'); $this->gotoProject ("MetaProject") ; $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit New"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isElementPresent("//select[@name='assigned_to']")) ; // Also check that guru isn't a manager on SubProject yet $this->switchUser('guru'); $this->gotoProject("SubProject"); $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit New"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isElementPresent("//select[@name='assigned_to']")) ; // Mark SD role as shared $this->switchUser('bigboss'); $this->gotoProject("MetaProject"); $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//td/form/div[contains(.,'Senior Developer')]/../div/input[@value='Edit Permissions']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//input[@type='checkbox' and @name='public']") ; $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Link MetaProject/SD role into SubProject $this->gotoProject ("SubProject") ; $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//input[@value='Link external role']/../../div/fieldset/select/option[.='Senior Developer (in project MetaProject)']")) ; $this->select($this->byXPath("//input[@value='Link external role']/../../div/fieldset/select"))->selectOptionByLabel("Senior Developer (in project MetaProject)") ; $this->clickAndWait("//input[@value='Link external role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//td/form/div[contains(.,'Senior Developer (in project MetaProject)')]/../div/input[contains(@value,'Unlink Role')]")); // Grant it tracker manager permissions $this->clickAndWait("//td/form/div[contains(.,'Senior Developer (in project MetaProject)')]/../div/input[@value='Edit Permissions']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//select[contains(@name,'data[tracker]')]"))->selectOptionByLabel("Manager"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // Check that guru now has manager permissions on SubProject $this->switchUser('guru'); $this->gotoProject("SubProject"); $this->clickAndWait("link=Tracker"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Bugs"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit New"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//select[@name='assigned_to']")) ; // Link global "Documentation masters" role into SubProject $this->switchUser("bigboss") ; $this->gotoProject("SubProject"); $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//input[@value='Link external role']/../../div/fieldset/select/option[.='Documentation masters (global role)']")) ; $this->assertFalse($this->isElementPresent("//input[@value='Link external role']/../../div/fieldset/select/option[.='Project moderators (global role)']")) ; $this->select($this->byXPath("//input[@value='Link external role']/../../div/fieldset/select"))->selectOptionByLabel("Documentation masters (global role)") ; $this->clickAndWait("//input[@value='Link external role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//td/form/div[contains(.,'Documentation masters (global role)')]/../div/input[contains(@value,'Unlink Role')]")); // Check that a project admin (not forge admin) can create a new role $this->gotoProject ("SubProject") ; $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "guru") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Admin"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("guru Lastname")); $this->assertTrue($this->isElementPresent("//tr/td/a[.='guru Lastname']/../../td/div[contains(.,'Admin')]")) ; $this->switchUser('guru'); $this->gotoProject ("SubProject") ; $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'roleedit.php')]/..//input[@name='role_name']", "Role created by guru") ; $this->clickAndWait("//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse ($this->isPermissionDenied()) ; $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isElementPresent("//td/form/div[contains(.,'Role created by guru')]/../div/input[@value='Edit Permissions']")) ; // Non-regression test for Adacore ticket K802-005 @@ -544,50 +544,50 @@ class RBAC extends FForge_SeleniumTestCase $this->switchUser(FORGE_ADMIN_USERNAME); $this->gotoProject ("MetaProject") ; $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'roleedit.php')]/..//input[@name='role_name']", "Temporary role") ; $this->clickAndWait("//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Temporary role")); $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "trainee") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Temporary role"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//td/form/div[contains(.,'Temporary role')]/../../form/div/input[@value='Delete role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//input[@type='checkbox' and @name='sure']") ; $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Cannot remove a non empty role")); $this->clickAndWait("//tr/td/div[contains(.,'Temporary role')]/../div/form/input[@name='username' and @value='trainee']/../input[@value='Remove']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//td/form/div[contains(.,'Temporary role')]/../../form/div/input[@value='Delete role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//input[@type='checkbox' and @name='sure']") ; $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("Temporary role")); // Non-regression test $this->clickAndWait("link=Site Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Display Full Project List/Edit Projects"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=SubProject"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Permanently Delete Project"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("sure"); $this->clickAndWait("reallysure"); $this->clickAndWait("reallyreallysure"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Home"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("SubProject")); // Make sure permissions are saved for news-related forums @@ -595,43 +595,43 @@ class RBAC extends FForge_SeleniumTestCase $this->gotoProject ("MetaProject") ; $this->clickAndWait("link=News"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("summary", "First news"); $this->type("details", "This is a simple news."); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=News"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("First news")); $this->clickAndWait("link=First news"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("First news")); $this->assertTrue($this->isTextPresent("This is a simple news.")); $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//td/form/div[contains(.,'Anonymous')]/../div/input[@value='Edit Permissions']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//tr/td[contains(.,'first-news')]/../td/fieldset/select"))->selectOptionByLabel("Read only"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $selectedOptions = $this->select($this->byXPath("//tr/td[contains(.,'first-news')]/../td/fieldset/select"))->selectedLabels(); $this->assertEquals(array("Read only"), $selectedOptions); $this->select($this->byXPath("//tr/td[contains(.,'first-news')]/../td/fieldset/select"))->selectOptionByLabel("Moderated post"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $selectedOptions = $this->select($this->byXPath("//tr/td[contains(.,'first-news')]/../td/fieldset/select"))->selectedLabels(); $this->assertEquals(array("Moderated post"), $selectedOptions); $this->select($this->byXPath("//tr/td[contains(.,'first-news')]/../td/fieldset/select"))->selectOptionByLabel("Unmoderated post"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $selectedOptions = $this->select($this->byXPath("//tr/td[contains(.,'first-news')]/../td/fieldset/select"))->selectedLabels(); $this->assertEquals(array("Unmoderated post"), $selectedOptions); } diff --git a/tests/func/30_Search/searchTest.php b/tests/func/30_Search/searchTest.php index 7938931..6846441 100644 --- a/tests/func/30_Search/searchTest.php +++ b/tests/func/30_Search/searchTest.php @@ -37,62 +37,62 @@ class Search extends FForge_SeleniumTestCase $this->createProject('ProjectB'); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "XXXXXXXXXXXXXXXXXXXXXXXXXX"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("No matches found for")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "projecta"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("public description for ProjectA")); $this->assertFalse($this->isTextPresent("public description for ProjectB")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "description public ProjectA"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("public description for ProjectA")); $this->assertFalse($this->isTextPresent("public description for ProjectB")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "description 'public ProjectA'"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("No matches found for")); $this->assertFalse($this->isTextPresent("public description for ProjectA")); $this->assertFalse($this->isTextPresent("public description for ProjectB")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "description public"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("public description for ProjectA")); $this->assertTrue($this->isTextPresent("public description for ProjectB")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "'description public'"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("No matches found for")); $this->assertFalse($this->isTextPresent("public description for ProjectA")); $this->assertFalse($this->isTextPresent("public description for ProjectB")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "'public description'"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("public description for ProjectA")); $this->assertTrue($this->isTextPresent("public description for ProjectB")); @@ -106,10 +106,10 @@ class Search extends FForge_SeleniumTestCase } $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "'public description'"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("public description for ProjectA")); $this->assertTrue($this->isTextPresent("public description for ProjectB")); @@ -120,10 +120,10 @@ class Search extends FForge_SeleniumTestCase $this->assertTrue($this->isTextPresent("public description for project-x30")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("//input[@name='words']", "x15"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("public description for project-x15")); $this->assertFalse($this->isTextPresent("public description for ProjectB")); @@ -136,41 +136,41 @@ class Search extends FForge_SeleniumTestCase $this->createUser('tartiflette'); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byName("type_of_search"))->selectOptionByLabel("People"); $this->type("//input[@name='words']", "tartempion"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("No matches found for")); $this->assertFalse($this->isTextPresent("ratatouille Lastname")); $this->assertFalse($this->isTextPresent("tartiflette Lastname")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byName("type_of_search"))->selectOptionByLabel("People"); $this->type("//input[@name='words']", "ratatouille"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("ratatouille Lastname")); $this->assertFalse($this->isTextPresent("tartiflette Lastname")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byName("type_of_search"))->selectOptionByLabel("People"); $this->type("//input[@name='words']", "lastname ratatouille"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("ratatouille Lastname")); $this->assertFalse($this->isTextPresent("tartiflette Lastname")); $this->open(ROOT) ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byName("type_of_search"))->selectOptionByLabel("People"); $this->type("//input[@name='words']", "Lastname"); $this->clickAndWait("//input[@name='Search']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertFalse($this->isTextPresent("No matches found for")); $this->assertTrue($this->isTextPresent("ratatouille Lastname")); $this->assertTrue($this->isTextPresent("tartiflette Lastname")); @@ -308,7 +308,7 @@ class Search extends FForge_SeleniumTestCase $this->clickAndWait("link=Forums"); $this->clickAndWait("link=open-discussion"); $this->clickAndWait("link=Start New Thread"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("subject", "Message1 in a bottle"); $this->type("body", "ninetynine of them on Charlie's wall - also, ZONGO"); $this->clickAndWait("submit"); @@ -326,7 +326,7 @@ class Search extends FForge_SeleniumTestCase $this->clickAndWait("link=Forums"); $this->clickAndWait("link=developers-discussion"); $this->clickAndWait("link=Start New Thread"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("subject", "Message4 in an envelope"); $this->type("body", "not the same thing as an antilope (and different thread anyway) (but still related to Charlie) - also, ZONGO"); $this->clickAndWait("submit"); @@ -529,26 +529,26 @@ class Search extends FForge_SeleniumTestCase $this->gotoProject('ProjectA'); $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//tr/td/form/div[contains(.,'Any user logged in')]/../../../td/form/div/input[contains(@value,'Unlink Role')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'roleedit.php')]/..//input[@name='role_name']", "Trainee") ; $this->clickAndWait("//input[@value='Create Role']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type ("//form[contains(@action,'users.php')]//input[@name='form_unix_name' and @type='text']", "ratatouille") ; $this->select($this->byXPath("//input[@value='Add Member']/../fieldset/select[@name='role_id']"))->selectOptionByLabel("Trainee"); $this->clickAndWait("//input[@value='Add Member']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//td/form/div[contains(.,'Trainee')]/../div/input[@value='Edit Permissions']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//select[contains(@name,'data[project_read]')]"))->selectOptionByLabel("Visible"); $this->select($this->byXPath("//tr/td[.='Bugs']/../td/fieldset/select[contains(@name,'data[tracker]')]"))->selectOptionByLabel("Read only"); $this->select($this->byXPath("//tr/td[.='Patches']/../td/fieldset/select[contains(@name,'data[tracker]')]"))->selectOptionByLabel("No Access"); @@ -558,12 +558,12 @@ class Search extends FForge_SeleniumTestCase $this->select($this->byXPath("//tr/td[.='developers-discussion']/../td/fieldset/select[contains(@name,'data[forum]')]"))->selectOptionByLabel("No Access"); $this->select($this->byXPath("//select[contains(@name,'data[docman]')]"))->selectOptionByLabel("Read only"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("//td/form/div[contains(.,'Anonymous')]/../div/input[@value='Edit Permissions']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->select($this->byXPath("//select[contains(@name,'data[project_read]')]"))->selectOptionByLabel("Visible"); $this->select($this->byXPath("//tr/td[.='Bugs']/../td/fieldset/select[contains(@name,'data[tracker]')]"))->selectOptionByLabel("No Access"); $this->select($this->byXPath("//tr/td[.='Patches']/../td/fieldset/select[contains(@name,'data[tracker]')]"))->selectOptionByLabel("No Access"); @@ -573,7 +573,7 @@ class Search extends FForge_SeleniumTestCase $this->select($this->byXPath("//tr/td[.='developers-discussion']/../td/fieldset/select[contains(@name,'data[forum]')]"))->selectOptionByLabel("No Access"); $this->select($this->byXPath("//select[contains(@name,'data[docman]')]"))->selectOptionByLabel("No Access"); $this->clickAndWait("//input[@value='Submit']") ; - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->switchUser('ratatouille'); $this->gotoProject('ProjectA'); diff --git a/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php b/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php index ffc4ccd..4d1dd42 100644 --- a/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php +++ b/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php @@ -90,13 +90,13 @@ class ScmGitSmartHTTPTest extends FForge_SeleniumTestCase $this->openWithOneRetry(ROOT); $this->clickAndWait("link=ProjectA"); $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Project Information")); $this->clickAndWait("link=Users and permissions"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Current Project Members")); $this->clickAndWait("//tr/td/form/div[contains(.,'Anonymous')]/../../../td/form/div/input[contains(@value,'Unlink Role')]"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Role unlinked successfully")); // Update repositories diff --git a/tests/func/50_PluginsScmHg/hgHTTPTest.php b/tests/func/50_PluginsScmHg/hgHTTPTest.php index 196e128..34a9b78 100644 --- a/tests/func/50_PluginsScmHg/hgHTTPTest.php +++ b/tests/func/50_PluginsScmHg/hgHTTPTest.php @@ -89,13 +89,13 @@ class ScmHgHTTPTest extends FForge_SeleniumTestCase // $this->openWithOneRetry(ROOT); // $this->clickAndWait("link=ProjectA"); // $this->clickAndWait("link=Admin"); -// $this->waitForPageToLoad("30000"); +// $this->waitForPageToLoad(); // $this->assertTrue($this->isTextPresent("Project Information")); // $this->clickAndWait("link=Users and permissions"); -// $this->waitForPageToLoad("30000"); +// $this->waitForPageToLoad(); // $this->assertTrue($this->isTextPresent("Current Project Members")); // $this->clickAndWait("//tr/td/form/div[contains(.,'Anonymous')]/../../../td/form/div/input[contains(@value,'Unlink Role')]"); -// $this->waitForPageToLoad("30000"); +// $this->waitForPageToLoad(); // $this->assertTrue($this->isTextPresent("Role unlinked successfully")); // // // Update repositories diff --git a/tests/func/60_PluginsBlocks/blocksTest.php b/tests/func/60_PluginsBlocks/blocksTest.php index 3f417dc..72594ca 100644 --- a/tests/func/60_PluginsBlocks/blocksTest.php +++ b/tests/func/60_PluginsBlocks/blocksTest.php @@ -59,33 +59,33 @@ class UserBlocks extends FForge_SeleniumTestCase $this->gotoProject('ProjectA'); $this->clickAndWait("link=Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("link=Tools"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("use_blocks"); $this->clickAndWait("submit"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->assertTrue($this->isTextPresent("Project information updated")); $this->clickAndWait("link=Blocks Admin"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->clickAndWait("activate[summary_description]"); // $this->clickAndWait("activate[summary_right]"); $this->clickAndWait("//input[@value='Save Blocks']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->open("/plugins/blocks/index.php?id=7&type=admin&pluginname=blocks"); $this->clickAndWait("link=Configure"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("body", "This is my nice block."); $this->clickAndWait("//input[@value='Save']"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // $this->clickAndWait("//main[@id='maindiv']/form/table/tbody/tr[2]/td[4]/a"); - // $this->waitForPageToLoad("30000"); + // $this->waitForPageToLoad(); // $this->type("body", "{boxTop Project}\nThis is the summary block.\n{boxBottom}"); // $this->clickAndWait("//input[@value='Save']"); - // $this->waitForPageToLoad("30000"); + // $this->waitForPageToLoad(); $this->clickAndWait("link=Summary"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); // $this->assertText("//td[@id='main']/table[1]/tbody/tr/td[1]", "This is my nice block."); // $this->assertEquals("This is the summary block.", $this->getText("//td[@id='main']/table[1]/tbody/tr/td[2]/table[1]/tbody/tr[2]/td")); $this->assertTrue($this->isTextPresent("This is my nice block.")); diff --git a/tests/func/60_PluginsGlobalactivity/globalactivityTest.php b/tests/func/60_PluginsGlobalactivity/globalactivityTest.php index c9f5364..d1111ed 100644 --- a/tests/func/60_PluginsGlobalactivity/globalactivityTest.php +++ b/tests/func/60_PluginsGlobalactivity/globalactivityTest.php @@ -67,7 +67,7 @@ class GlobalActivity extends FForge_SeleniumTestCase $this->clickAndWait("link=Forums"); $this->clickAndWait("link=open-discussion"); $this->clickAndWait("link=Start New Thread"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("subject", "Message1 in a bottle"); $this->type("body", "ninetynine of them on Charlie's wall - also, ZONGO"); $this->clickAndWait("submit"); @@ -76,7 +76,7 @@ class GlobalActivity extends FForge_SeleniumTestCase $this->clickAndWait("link=Forums"); $this->clickAndWait("link=open-discussion"); $this->clickAndWait("link=Start New Thread"); - $this->waitForPageToLoad("30000"); + $this->waitForPageToLoad(); $this->type("subject", "Message2"); $this->type("body", "Forum post in project B"); $this->clickAndWait("submit"); diff --git a/tests/func/60_PluginsOnlineHelp/contextualHelpTest.php b/tests/func/60_PluginsOnlineHelp/contextualHelpTest.php index 614ecd0..3db4a1b 100644 --- a/tests/func/60_PluginsOnlineHelp/contextualHelpTest.php +++ b/tests/func/60_PluginsOnlineHelp/contextualHelpTest.php @@ -80,7 +80,7 @@ class ContextualHelp extends FForge_SeleniumTestCase $this->clickAndWait($action); $this->clickAndWait("link=Get Help"); sleep(1); - $this->waitForPopUp("HelpWindow", "30000"); + $this->waitForPopUp("HelpWindow", ); $this->selectWindow("name=HelpWindow"); $this->assertTextPresent($text); $this->close(); https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=12295d37edadf93c93d610e2ae3b6b007b5f143d commit 12295d37edadf93c93d610e2ae3b6b007b5f143d Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Tue Apr 27 15:10:36 2021 +0000 speed up func tests diff --git a/tests/func/SeleniumForge.php b/tests/func/SeleniumForge.php index 18c0707..470547f 100644 --- a/tests/func/SeleniumForge.php +++ b/tests/func/SeleniumForge.php @@ -638,7 +638,7 @@ abstract class FForge_SeleniumTestCase extends PHPUnit\Extensions\Selenium2TestC } } - protected function waitForPageToLoad($integer = 30000) { + protected function waitForPageToLoad($integer = 10000) { //do we need to do something??? $this->pause($integer); } ----------------------------------------------------------------------- Summary of changes: tests/func/20_Forums/forumsTest.php | 34 +-- tests/func/20_News/newsTest.php | 26 +- tests/func/20_Surveys/surveysTest.php | 8 +- tests/func/20_Tasks/createTaskTest.php | 28 +-- tests/func/20_Trackers/relationTest.php | 10 +- tests/func/20_Trackers/trackersTest.php | 56 ++--- tests/func/20_Trackers/workflowTest.php | 36 +-- tests/func/30_RBAC/rbacTest.php | 278 ++++++++++----------- tests/func/30_Search/searchTest.php | 80 +++--- tests/func/50_PluginsScmGit/gitSmartHTTPTest.php | 6 +- tests/func/50_PluginsScmHg/hgHTTPTest.php | 6 +- tests/func/60_PluginsBlocks/blocksTest.php | 20 +- .../globalactivityTest.php | 4 +- .../60_PluginsOnlineHelp/contextualHelpTest.php | 2 +- tests/func/SeleniumForge.php | 2 +- 15 files changed, 298 insertions(+), 298 deletions(-) hooks/post-receive -- FusionForge _______________________________________________ Fusionforge-commits mailing list Fusionforge-commits@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits