42 require_once (
'../../../tests/fossologyTestCase.php');
43 require_once (
'../../../tests/TestEnvironment.php');
50 $this->assertTrue(file_exists(
'/home/fosstester/.bashrc'),
51 "FAILURE! .bashrc not found\n");
55 function testUploadUSrv() {
59 print
"starting UploadUSrvTest\n";
60 $loggedIn = $this->mybrowser->get($URL);
61 $this->assertTrue($this->myassertText($loggedIn,
'/Upload/'),
62 'Did not find Upload Menu');
63 $this->assertTrue($this->myassertText($loggedIn,
'/From Server/'),
64 'Did not find From Server Menu');
65 $page = $this->mybrowser->get(
"$URL?mod=upload_srv_files");
66 $this->assertTrue($this->myassertText($page,
'/Upload from Server/'),
67 'Did not find Upload from Server Title');
68 $this->assertTrue($this->myassertText($page,
'/on the server to upload:/'),
69 'Did not find the sourcefile Selection Text');
71 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'folder');
72 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
73 $this->assertTrue($this->mybrowser->setField(
'sourcefiles',
'/home/fosstester/archives/simpletest_1.0.1.tar.gz'));
74 $desc =
'File uploaded by test UploadSrvTest to folder Testing';
75 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
77 $page = $this->mybrowser->clickSubmit(
'Upload!');
78 $this->assertTrue($page);
79 $this->assertTrue($this->myassertText($page,
80 '/The upload for \/home\/fosstester\/archives\/simpletest_1\.0\.1\.tar\.gz/'),
81 "FAIL! Did not match Upload message\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)