19 require_once (
'../../../tests/fossologyTestCase.php');
20 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));
43 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
44 $desc =
"Folder $this->folder_name created by EditNameOnlyTest as subfolder of Testing";
45 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
46 $page = $this->mybrowser->clickSubmit(
'Create!');
47 $this->assertTrue($page);
48 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
49 "FAIL! Folder $this->folder_name Created not found\n");
52 function testEditNameOnlyFolder()
56 print
"starting EditFolderNameOnlytest\n";
57 $loggedIn = $this->mybrowser->get($URL);
58 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
59 "FAIL! Could not find Organize menu\n");
60 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
61 $this->assertTrue($this->myassertText($loggedIn,
'/Edit Properties/'));
65 $page = $this->mybrowser->get(
"$URL?mod=folder_properties");
66 $this->assertTrue($this->myassertText($page,
'/Edit Folder Properties/'));
68 $this->assertTrue($FolderId);
69 $this->assertTrue($this->mybrowser->setField(
'oldfolderid', $FolderId));
72 $this->newname =
"FolderNameEditedByTest-$pid";
73 $this->assertTrue($this->mybrowser->setField(
'newname',
"$this->newname"),
74 "FAIL! Folder rename Failed\n");
75 $page = $this->mybrowser->clickSubmit(
'Edit!');
76 $this->assertTrue($page);
77 $this->assertTrue($this->myassertText($page,
"/Folder Properties changed/"),
78 "FAIL! Folder Properties changed not found\n");
80 $page = $this->mybrowser->get(
"$URL?mod=browse");
81 $this->assertTrue($this->myassertText($page,
"/$this->newname/"),
82 "FAIL! Folder $this->newname not found\n");
88 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
89 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
90 $FolderId = $this->
getFolderId($this->newname, $page,
'folder');
91 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
92 $page = $this->mybrowser->clickSubmit(
'Delete!');
93 $this->assertTrue($page);
94 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->newname/"),
95 "EditFolderOnlyTest tearDown FAILED! Deletion of $this->newname not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)