30 require_once (
'../../../tests/fossologyTestCase.php');
31 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));
54 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
55 $desc =
"Folder $this->folder_name created by EditNameOnlyTest as subfolder of Testing";
56 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
57 $page = $this->mybrowser->clickSubmit(
'Create!');
58 $this->assertTrue($page);
59 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
60 "FAIL! Folder $this->folder_name Created not found\n");
63 function testEditNameOnlyFolder()
67 print
"starting EditFolderNameOnlytest\n";
68 $loggedIn = $this->mybrowser->get($URL);
69 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
70 "FAIL! Could not find Organize menu\n");
71 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
72 $this->assertTrue($this->myassertText($loggedIn,
'/Edit Properties/'));
76 $page = $this->mybrowser->get(
"$URL?mod=folder_properties");
77 $this->assertTrue($this->myassertText($page,
'/Edit Folder Properties/'));
79 $this->assertTrue($FolderId);
80 $this->assertTrue($this->mybrowser->setField(
'oldfolderid', $FolderId));
83 $this->newname =
"FolderNameEditedByTest-$pid";
84 $this->assertTrue($this->mybrowser->setField(
'newname',
"$this->newname"),
85 "FAIL! Folder rename Failed\n");
86 $page = $this->mybrowser->clickSubmit(
'Edit!');
87 $this->assertTrue($page);
88 $this->assertTrue($this->myassertText($page,
"/Folder Properties changed/"),
89 "FAIL! Folder Properties changed not found\n");
91 $page = $this->mybrowser->get(
"$URL?mod=browse");
92 $this->assertTrue($this->myassertText($page,
"/$this->newname/"),
93 "FAIL! Folder $this->newname not found\n");
99 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
100 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
101 $FolderId = $this->
getFolderId($this->newname, $page,
'folder');
102 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
103 $page = $this->mybrowser->clickSubmit(
'Delete!');
104 $this->assertTrue($page);
105 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->newname/"),
106 "EditFolderOnlyTest tearDown FAILED! Deletion of $this->newname not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)