diff --git a/tests/src/Functional/InstallTest.php b/tests/src/Functional/InstallTest.php index d3873fa..fee46a6 100644 --- a/tests/src/Functional/InstallTest.php +++ b/tests/src/Functional/InstallTest.php @@ -8,7 +8,7 @@ /** * Simple test to ensure that main page loads with module enabled. * - * @group TripGeno Genetics + * @group TripalBlast * @group Installation */ class InstallTest extends ChadoTestBrowserBase { diff --git a/tests/src/Functional/UserInterfaceTest.php b/tests/src/Functional/UserInterfaceTest.php new file mode 100644 index 0000000..d38ba19 --- /dev/null +++ b/tests/src/Functional/UserInterfaceTest.php @@ -0,0 +1,45 @@ +getSession(); + + // Ensure we have an admin user. + $user = $this->drupalCreateUser(['access content']); + $this->drupalLogin($user); + + $context = '(modules installed: ' . implode(',', self::$modules) . ')'; + + // Blast UI + $this->drupalGet(Url::fromRoute('tripal_blast.blast_ui')); + $status_code = $session->getStatusCode(); + $this->assertEquals(200, $status_code, "The blast user interface listing the programs available should be able to load."); + + + + } +} diff --git a/tripal_blast.routing.yml b/tripal_blast.routing.yml index 76abca1..5cf0191 100644 --- a/tripal_blast.routing.yml +++ b/tripal_blast.routing.yml @@ -10,7 +10,7 @@ tripal_blast.blast_ui: _title: 'Tripal BLAST' _controller: '\Drupal\tripal_blast\Controller\TripalBlastUIController::ui' requirements: - _permission: 'administer tripal' + _permission: 'access content' # Routes below are for two main query types BLAST shown in the UI. @@ -22,7 +22,7 @@ tripal_blast.blast_program: _title: 'Tripal BLAST' _form: '\Drupal\tripal_blast\Form\TripalBlastForm' requirements: - _permission: 'administer tripal' + _permission: 'access content' query: 'nucleotide|protein' db: 'nucleotide|protein'