32 require_once (
'../../../tests/fossologyTestCase.php');
33 require_once (
'../../../tests/TestEnvironment.php');
42 $this->assertTrue(file_exists(
'/home/fosstester/.bashrc'),
43 "FAILURE! .bashrc not found\n");
47 function testOneShotTablegplv21()
51 print
"starting OneShotgplv21Test-Table\n";
53 $loggedIn = $this->mybrowser->get($URL);
54 $this->assertTrue($this->myassertText($loggedIn,
'/Upload/'),
55 "OneShotgplv21Test-Table FAILURE! Did not find Upload Menu\n");
56 $this->assertTrue($this->myassertText($loggedIn,
'/One-Shot Analysis/'),
57 "OneShotgplv21Test-Table FAILURE! Did not find One-Shot Analysis Menu\n");
59 $page = $this->mybrowser->get(
"$URL?mod=agent_license_once");
60 $this->assertTrue($this->myassertText($page,
'/One-Shot License Analysis/'),
61 "OneShotgplv21Test-Table FAILURE! Did not find One-Shot License Analysis Title\n");
62 $this->assertTrue($this->myassertText($page,
'/The analysis is done in real-time/'),
63 "OneShotgplv21Test-Table FAILURE! Did not find real-time Text\n");
64 $this->assertTrue($this->mybrowser->setField(
'licfile',
'/home/fosstester/licenses/gplv2.1'));
66 $this->assertTrue($this->mybrowser->setField(
'highlight', 1),
67 "OneShotgplv21Test-Table FAILURE! Could not click highlight\n");
68 $this->assertTrue($this->mybrowser->clickSubmit(
'Analyze!'),
69 "OneShotgplv21Test-Table FAILURE! Could not click Analyze button\n");
72 $page = $this->mybrowser->getContent();
74 $this->assertTrue($this->myassertText($page,
'/One-Shot License Analysis/'),
75 "OneShotgplv21Test-Table FAILURE! Did not find One-Shot License Analysis Title\n");
76 $this->assertTrue($this->myassertText($page,
'/Match/'),
77 "OneShotgplv21Test-Table FAILURE! Did not find text 'Match' \n");
78 $this->assertTrue($this->myassertText($page,
'/100%/'),
79 "OneShotgplv21Test-Table FAILURE! Did not find '100percent\n");
80 $this->assertTrue($this->myassertText($page,
'/LGPL v2\.1 Preamble/'),
81 "OneShotgplv21Test-Table FAILURE! Did not find 'LGPL v2.1 Preamble' \n");
82 $this->assertFalse($this->myassertText($page,
'/-partial/'),
83 "OneShotgplv21Test-Table FAILURE! Found -partial in a non partial license file\n");
Login($User=NULL, $Password=NULL)