27 require_once (
'../../../tests/fossologyTestCase.php');
28 require_once (
'../../../tests/TestEnvironment.php');
44 function testCreateFolder()
48 print
"starting CreateFoldertest\n";
49 $loggedIn = $this->mybrowser->get($URL);
50 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
51 "FAIL! Could not find Organize menu\n");
52 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
53 $this->assertTrue($this->myassertText($loggedIn,
'/Create/'));
57 $page = $this->mybrowser->get(
"$URL?mod=folder_create");
58 $this->assertTrue($this->myassertText($page,
'/Create a new Fossology folder/'));
60 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'parentid');
61 $this->assertTrue($this->mybrowser->setField(
'parentid', $FolderId));
66 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
67 $desc =
'Folder created by CreateFolderTest as subfolder of Basic-Testing';
68 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
69 $page = $this->mybrowser->clickSubmit(
'Create!');
70 $this->assertTrue($page);
71 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
72 "FAIL! Folder $this->folder_name Created not found\n");
79 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
80 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
82 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
83 $page = $this->mybrowser->clickSubmit(
'Delete!');
84 $this->assertTrue($page);
85 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->folder_name/"),
86 "CreateFoldeTest tearDown FAILED! Deletion of $this->folder_name not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)