Skip to content

Commit

Permalink
Add submodules to CI testing (#749)
Browse files Browse the repository at this point in the history
* Add submodules to CI testing

* Forgot a quote

* Fixing tests
  • Loading branch information
dannylamb authored and whikloj committed Dec 19, 2019
1 parent b553f2c commit 20477e8
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 32 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ script:
- $SCRIPT_DIR/travis_scripts.sh
- $SCRIPT_DIR/run-tests.sh "islandora"
- $SCRIPT_DIR/run-tests.sh "islandora_breadcrumbs"
- $SCRIPT_DIR/run-tests.sh "islandora_image"
- $SCRIPT_DIR/run-tests.sh "islandora_audio"
- $SCRIPT_DIR/run-tests.sh "islandora_video"
- $SCRIPT_DIR/run-tests.sh "islandora_text_extraction"

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ action.configuration.generate_audio_derivative:
event:
type: text
label: 'Event Type'
destination_media_type:
type: text
label: 'Destination media type'
source_term_uri:
type: text
label: 'Source term uri'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function testGenerateAudioDerivativeFromScratch() {
$this->getSession()->getPage()->fillField('edit-label', "Generate audio test derivative");
$this->getSession()->getPage()->fillField('edit-id', "generate_audio_test_derivative");
$this->getSession()->getPage()->fillField('edit-queue', "generate-audio-test-derivative");
$this->getSession()->getPage()->fillField('edit-destination-media-type', $this->testMediaType->label());
$this->getSession()->getPage()->fillField("edit-source-term", $this->preservationMasterTerm->label());
$this->getSession()->getPage()->fillField("edit-derivative-term", $this->serviceFileTerm->label());
$this->getSession()->getPage()->fillField('edit-mimetype', "audio/mpeg");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ action.configuration.generate_image_derivative:
event:
type: text
label: 'Event Type'
destination_media_type:
type: text
label: 'Destination media type'
source_term_uri:
type: text
label: 'Source term uri'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function testGenerateImageDerivativeFromScratch() {
$this->getSession()->getPage()->fillField('edit-label', "Generate image test derivative");
$this->getSession()->getPage()->fillField('edit-id', "generate_image_test_derivative");
$this->getSession()->getPage()->fillField('edit-queue', "generate-image-test-derivative");
$this->getSession()->getPage()->fillField('edit-destination-media-type', $this->testMediaType->label());
$this->getSession()->getPage()->fillField("edit-source-term", $this->preservationMasterTerm->label());
$this->getSession()->getPage()->fillField("edit-derivative-term", $this->serviceFileTerm->label());
$this->getSession()->getPage()->fillField('edit-mimetype', "image/jpeg");
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace Drupal\Tests\islandora_text_extraction\Functional;

use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\islandora\Functional\IslandoraFunctionalTestBase;

/**
* Simple test to ensure that main page loads with module enabled.
*
* @group islandora_text_extraction
*/
class LoadTest extends BrowserTestBase {
class LoadTest extends IslandoraFunctionalTestBase {

/**
* Modules to enable.
Expand All @@ -29,7 +29,7 @@ class LoadTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
public function setUp() {
parent::setUp();
$this->user = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($this->user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ action.configuration.generate_video_derivative:
event:
type: text
label: 'Event Type'
destination_media_type:
type: text
label: 'Destination media type'
source_term_uri:
type: text
label: 'Source term uri'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ class GenerateVideoDerivativeTest extends GenerateDerivativeTestBase {
/**
* @covers \Drupal\islandora_video\Plugin\Action\GenerateVideoDerivative::defaultConfiguration
* @covers \Drupal\islandora_video\Plugin\Action\GenerateVideoDerivative::buildConfigurationForm
* @covers \Drupal\islandora\Plugin\Action\AbstractGenerateDerivative::defaultConfiguration
* @covers \Drupal\islandora\Plugin\Action\AbstractGenerateDerivative::buildConfigurationForm
* @covers \Drupal\islandora\Plugin\Action\AbstractGenerateDerivative::submitConfigurationForm
* @covers \Drupal\islandora\Plugin\Action\AbstractGenerateDerivative::execute
* @covers \Drupal\islandora_video\Plugin\Action\GenerateVideoDerivative::validateConfigurationForm
*/
public function testGenerateVideoDerivativeFromScratch() {

Expand All @@ -46,6 +43,7 @@ public function testGenerateVideoDerivativeFromScratch() {
$this->getSession()->getPage()->fillField('edit-label', "Generate video test derivative");
$this->getSession()->getPage()->fillField('edit-id', "generate_video_test_derivative");
$this->getSession()->getPage()->fillField('edit-queue', "generate-video-test-derivative");
$this->getSession()->getPage()->fillField('edit-destination-media-type', $this->testMediaType->label());
$this->getSession()->getPage()->fillField("edit-source-term", $this->preservationMasterTerm->label());
$this->getSession()->getPage()->fillField("edit-derivative-term", $this->serviceFileTerm->label());
$this->getSession()->getPage()->fillField('edit-mimetype', "video/mp4");
Expand Down
4 changes: 2 additions & 2 deletions src/Form/IslandoraSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form[self::FEDORA_URL] = [
'#type' => 'textfield',
'#title' => $this->t('Fedora URL'),
'#attributes' => array('readonly' => 'readonly'),
'#default_value' => t($fedora_url),
'#attributes' => ['readonly' => 'readonly'],
'#default_value' => $fedora_url,
];

$selected_bundles = $config->get(self::GEMINI_PSEUDO);
Expand Down

0 comments on commit 20477e8

Please sign in to comment.