16 require_once (
'../../../tests/fossologyTestCase.php');
17 require_once (
'../../../tests/TestEnvironment.php');
33 function testCreateFolder()
37 print
"starting CreateFoldertest\n";
38 $loggedIn = $this->mybrowser->get($URL);
39 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
40 "FAIL! Could not find Organize menu\n");
41 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
42 $this->assertTrue($this->myassertText($loggedIn,
'/Create/'));
46 $page = $this->mybrowser->get(
"$URL?mod=folder_create");
47 $this->assertTrue($this->myassertText($page,
'/Create a new Fossology folder/'));
49 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'parentid');
50 $this->assertTrue($this->mybrowser->setField(
'parentid', $FolderId));
55 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
56 $desc =
'Folder created by CreateFolderTest as subfolder of Basic-Testing';
57 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
58 $page = $this->mybrowser->clickSubmit(
'Create!');
59 $this->assertTrue($page);
60 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
61 "FAIL! Folder $this->folder_name Created not found\n");
68 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
69 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
71 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
72 $page = $this->mybrowser->clickSubmit(
'Delete!');
73 $this->assertTrue($page);
74 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->folder_name/"),
75 "CreateFoldeTest tearDown FAILED! Deletion of $this->folder_name not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)