31 require_once (
'../../../tests/fossologyTestCase.php');
32 require_once (
'../../../tests/TestEnvironment.php');
48 $page = $this->mybrowser->get(
"$URL?mod=folder_create");
49 $this->assertTrue($this->myassertText($page,
'/Create a new Fossology folder/'));
51 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'parentid');
52 $this->assertTrue($this->mybrowser->setField(
'parentid', $FolderId));
55 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
56 $desc =
'Folder created by EditFolderDesctriptionOnlyTest as subfolder of 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");
64 function testEditFolderDescriptionOnly()
68 print
"starting EditFolderDescriptoinOnlytest\n";
69 $loggedIn = $this->mybrowser->get($URL);
70 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
71 "FAIL! Could not find Organize menu\n");
72 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
73 $this->assertTrue($this->myassertText($loggedIn,
'/Edit Properties/'));
77 $page = $this->mybrowser->get(
"$URL?mod=folder_properties");
78 $this->assertTrue($this->myassertText($page,
'/Edit Folder Properties/'));
80 $desc =
"Folder description changed by EditFolderDescriptionOnlyTest-$pid as subfolder of Testing";
81 $this->assertTrue($this->mybrowser->setField(
'newdesc',
"$desc"),
82 "FAIL! Could not set description 'newdesc'\n");
83 $page = $this->mybrowser->clickSubmit(
'Edit!');
84 $this->assertTrue($page);
85 $this->assertTrue($this->myassertText($page,
"/Folder Properties changed/"),
86 "FAIL! Folder Properties changed not found\n");
88 $page = $this->mybrowser->get(
"$URL?mod=browse");
89 $this->assertTrue($this->myassertText($page,
"/$desc/"),
90 "FAIL! Folder $desc not found\n");
96 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
97 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
99 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
100 $page = $this->mybrowser->clickSubmit(
'Delete!');
101 $this->assertTrue($page);
102 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->folder_name/"),
103 "EditFolderDescriptionOnlyTest tearDown FAILED! Deletion of $this->folder_name not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)