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