19 require_once (
'../../../tests/fossologyTestCase.php');
20 require_once (
'../../../tests/TestEnvironment.php');
29 $this->assertTrue(file_exists(
'/home/fosstester/.bashrc'),
30 "FAILURE! .bashrc not found\n");
34 function testOneShotTablegplv21()
38 print
"starting OneShotgplv21Test-Table\n";
40 $loggedIn = $this->mybrowser->get($URL);
41 $this->assertTrue($this->myassertText($loggedIn,
'/Upload/'),
42 "OneShotgplv21Test-Table FAILURE! Did not find Upload Menu\n");
43 $this->assertTrue($this->myassertText($loggedIn,
'/One-Shot Analysis/'),
44 "OneShotgplv21Test-Table FAILURE! Did not find One-Shot Analysis Menu\n");
46 $page = $this->mybrowser->get(
"$URL?mod=agent_license_once");
47 $this->assertTrue($this->myassertText($page,
'/One-Shot License Analysis/'),
48 "OneShotgplv21Test-Table FAILURE! Did not find One-Shot License Analysis Title\n");
49 $this->assertTrue($this->myassertText($page,
'/The analysis is done in real-time/'),
50 "OneShotgplv21Test-Table FAILURE! Did not find real-time Text\n");
51 $this->assertTrue($this->mybrowser->setField(
'licfile',
'/home/fosstester/licenses/gplv2.1'));
53 $this->assertTrue($this->mybrowser->setField(
'highlight', 1),
54 "OneShotgplv21Test-Table FAILURE! Could not click highlight\n");
55 $this->assertTrue($this->mybrowser->clickSubmit(
'Analyze!'),
56 "OneShotgplv21Test-Table FAILURE! Could not click Analyze button\n");
59 $page = $this->mybrowser->getContent();
61 $this->assertTrue($this->myassertText($page,
'/One-Shot License Analysis/'),
62 "OneShotgplv21Test-Table FAILURE! Did not find One-Shot License Analysis Title\n");
63 $this->assertTrue($this->myassertText($page,
'/Match/'),
64 "OneShotgplv21Test-Table FAILURE! Did not find text 'Match' \n");
65 $this->assertTrue($this->myassertText($page,
'/100%/'),
66 "OneShotgplv21Test-Table FAILURE! Did not find '100percent\n");
67 $this->assertTrue($this->myassertText($page,
'/LGPL v2\.1 Preamble/'),
68 "OneShotgplv21Test-Table FAILURE! Did not find 'LGPL v2.1 Preamble' \n");
69 $this->assertFalse($this->myassertText($page,
'/-partial/'),
70 "OneShotgplv21Test-Table FAILURE! Found -partial in a non partial license file\n");
Login($User=NULL, $Password=NULL)