3 * Copyright (C) 2010 Alcatel-Lucent
4 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
5 * Copyright 2010-2011, Franck Villaume - Capgemini
7 * This file is part of FusionForge.
9 * FusionForge is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published
11 * by the Free Software Foundation; either version 2 of the License,
12 * or (at your option) any later version.
14 * FusionForge is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 * Standard Alcatel-Lucent disclaimer for contributing to open source
27 * "The test suite ("Contribution") has not been tested and/or
28 * validated for release as or in products, combinations with products or
29 * other commercial use. Any use of the Contribution is entirely made at
30 * the user's own responsibility and the user can not rely on any features,
31 * functionalities or performances Alcatel-Lucent has attributed to the
34 * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
35 * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
36 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
37 * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
38 * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
39 * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
40 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
41 * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
42 * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
46 require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
48 class CreateDocURL extends FForge_SeleniumTestCase
50 function testCreateDocURL()
52 $this->populateStandardTemplate('docs');
54 $this->gotoProject('ProjectA');
55 $this->clickAndWait("link=Docs");
56 $this->clickAndWait("addItemDocmanMenu");
57 $this->click("buttonDir");
58 $this->type("groupname", "docdirectory");
59 $this->clickAndWait("submitaddsubgroup");
60 $this->clickAndWait("addItemDocmanMenu");
61 $this->click("buttonDoc");
62 $this->type("title", "My document");
63 $this->type("description", "L'année dernière à Noël, 3 < 4, 中国 \" <em>, père & fils");
64 $this->click("//input[@name='type' and @value='pasteurl']");
65 $this->type("file_url", "http://buildbot.fusionforge.org/");
66 $this->clickAndWait("submit");
67 $this->assertTextPresent("Document http://buildbot.fusionforge.org/ submitted successfully");
68 $this->assertTextPresent("My document");
69 $this->assertTextPresent("L'année dernière à Noël, 3 < 4, 中国 \" <em>, père & fils");
71 $this->gotoProject('ProjectA');
72 $this->clickAndWait("link=Docs");
73 $this->clickAndWait("listFileDocmanMenu");
74 $this->clickAndWait("link=docdirectory");
75 $this->clickAndWait("//img[@alt='trashdir']");
76 $this->assertTextPresent("Documents folder docdirectory moved to trash successfully");