FOSSology  4.4.0
Open Source License Compliance by Open Source Software
UploadOne-ShotMenuTest.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2008 Hewlett-Packard Development Company, L.P.
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
15 require_once ('../../../tests/fossologyTestCase.php');
16 require_once ('../../../tests/TestEnvironment.php');
17 
18 global $URL;
19 
21 {
22 
23  function testUploadOneShotMenu()
24  {
25  global $URL;
26  print "starting UploadUrlMenuTest\n";
27  $this->Login();
28  /* we get the home page to get rid of the user logged in page */
29  $loggedIn = $this->mybrowser->get($URL);
30  $this->assertTrue($this->myassertText($loggedIn, '/Upload/'));
31  $this->assertTrue($this->myassertText($loggedIn, '/Instructions/'));
32  $this->assertTrue($this->myassertText($loggedIn, '/From File/'));
33  $this->assertTrue($this->myassertText($loggedIn, '/From Server/'));
34  $this->assertTrue($this->myassertText($loggedIn, '/From URL/'));
35  $this->assertTrue($this->myassertText($loggedIn, '/One-Shot Analysis/'));
36  /* ok, this proves the text is on the page, let's see if we can
37  * get to the delete page.
38  */
39  $page = $this->mybrowser->get("$URL?mod=agent_nomos_once");
40  $this->assertTrue($this->myassertText($page, '/One-Shot License Analysis/'));
41  $this->assertTrue($this->myassertText($page, '/Select the file to upload:/'));
42  }
43 }
Login($User=NULL, $Password=NULL)