3 * Copyright 2012, Roland Mas
5 * This file is part of FusionForge.
7 * FusionForge is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation; either version 2 of the License,
10 * or (at your option) any later version.
12 * FusionForge is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
24 class PluginMediawiki extends FForge_SeleniumTestCase
26 protected $alreadyActive = 0;
28 function testMediawiki()
30 $this->activatePlugin('mediawiki');
32 $this->populateStandardTemplate('empty');
35 $this->clickAndWait("link=Admin");
36 $this->clickAndWait("link=Tools");
37 $this->click("use_mediawiki");
38 $this->clickAndWait("submit");
39 $this->assertTrue($this->isTextPresent("Project information updated"));
41 $this->cron_for_plugin("create-wikis.php", "mediawiki");
44 $this->gotoProject('ProjectA');
45 $this->clickAndWait("link=Mediawiki");
46 $this->assertFalse($this->isTextPresent("not created yet"));
48 $this->clickAndWait("link=edit this page");
49 $this->assertTrue($this->isTextPresent("You have followed a link to a page that does not exist yet."));
50 $this->type("//textarea[@id='wpTextbox1']", "= Bleh =
53 And more lorem ipsum too.");
54 $this->type("//input[@id='wpSummary']", "Page created during testsuite run");
56 $this->clickAndWait("//input[@id='wpSave']");
58 $this->clickAndWait("link=Mediawiki");
59 $this->assertTrue($this->isTextPresent("lorem ipsum"));
60 $this->assertTrue($this->isElementPresent("//h1[contains(.,'Bleh')]"));
61 $this->assertTrue($this->isElementPresent("//h2[contains(.,'Blahblah')]"));
67 // c-file-style: "bsd"