20 require_once (
'../../../tests/fossologyTestCase.php');
21 require_once (
'../../../tests/TestEnvironment.php');
37 $page = $this->mybrowser->get(
"$URL?mod=folder_create");
38 $this->assertTrue($this->myassertText($page,
'/Create a new Fossology folder/'));
40 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'parentid');
41 $this->assertTrue($this->mybrowser->setField(
'parentid', $FolderId));
44 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
45 $desc =
'Folder created by EditFolderDesctriptionOnlyTest as subfolder of Testing';
46 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
47 $page = $this->mybrowser->clickSubmit(
'Create!');
48 $this->assertTrue($page);
49 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
50 "FAIL! Folder $this->folder_name Created not found\n");
53 function testEditFolderDescriptionOnly()
57 print
"starting EditFolderDescriptoinOnlytest\n";
58 $loggedIn = $this->mybrowser->get($URL);
59 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
60 "FAIL! Could not find Organize menu\n");
61 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
62 $this->assertTrue($this->myassertText($loggedIn,
'/Edit Properties/'));
66 $page = $this->mybrowser->get(
"$URL?mod=folder_properties");
67 $this->assertTrue($this->myassertText($page,
'/Edit Folder Properties/'));
69 $desc =
"Folder description changed by EditFolderDescriptionOnlyTest-$pid as subfolder of Testing";
70 $this->assertTrue($this->mybrowser->setField(
'newdesc',
"$desc"),
71 "FAIL! Could not set description 'newdesc'\n");
72 $page = $this->mybrowser->clickSubmit(
'Edit!');
73 $this->assertTrue($page);
74 $this->assertTrue($this->myassertText($page,
"/Folder Properties changed/"),
75 "FAIL! Folder Properties changed not found\n");
77 $page = $this->mybrowser->get(
"$URL?mod=browse");
78 $this->assertTrue($this->myassertText($page,
"/$desc/"),
79 "FAIL! Folder $desc not found\n");
85 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
86 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
88 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
89 $page = $this->mybrowser->clickSubmit(
'Delete!');
90 $this->assertTrue($page);
91 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->folder_name/"),
92 "EditFolderDescriptionOnlyTest tearDown FAILED! Deletion of $this->folder_name not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)