32 require_once (
'../../../tests/fossologyTestCase.php');
33 require_once (
'../../../tests/TestEnvironment.php');
50 $page = $this->mybrowser->get(
"$URL?mod=folder_create");
51 $this->assertTrue($this->myassertText($page,
'/Create a new Fossology folder/'));
53 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'parentid');
54 $this->assertTrue($this->mybrowser->setField(
'parentid', $FolderId));
56 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
57 $desc =
'Folder created by DeleteFolderTest as subfolder of Testing';
58 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
59 $page = $this->mybrowser->clickSubmit(
'Create!');
60 $this->assertTrue($page);
61 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
62 "FAIL! Folder $this->folder_name Created not found\n");
65 function testDeleteFolder()
69 print
"starting DeleteFoldertest\n";
71 $loggedIn = $this->mybrowser->get($URL);
72 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
73 "FAIL! Could not find Organize menu\n");
74 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
75 $this->assertTrue($this->myassertText($loggedIn,
'/Delete Folder/'));
79 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
80 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
81 $FolderId = $this->
getFolderId(
'DeleteMe', $page,
'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 "FAIL! Deletion of $this->folder_name not found\n");
89 $page = $this->mybrowser->get(
"$URL?mod=browse");
90 $this->assertFalse($this->myassertText($page,
'/DeleteMe/'),
91 "NOTE: Folder DeleteMe still exists after 120 seconds");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)