Skip to content

Commit

Permalink
8.2.13
Browse files Browse the repository at this point in the history
- Remove the filter caption template in favor of preprocess hook' (#87)
- D8CORE-3425 Patch drupal core for better embeddable handling (#88)
  • Loading branch information
pookmish authored Feb 9, 2021
2 parents 4c1c497 + af001d0 commit 475b4a5
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 25 deletions.
58 changes: 37 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,52 @@ version: 2
defaults: &defaults
docker:
- image: pookmish/drupal8ci:pcov
- image: selenium/standalone-chrome:3.141.59-neon
- image: selenium/standalone-chrome:latest
- image: mariadb:10.3
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
working_directory: /var/www/html


#Jobs
code_coverage: &code_coverage
<<: *defaults
steps:
- restore_cache:
keys:
- dependencies-
- dependencies-v1
- checkout:
path: /var/www/test
- run:
name: Run PHP Unit Coverage Tests
command: |
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
~/.composer/vendor/bin/sws-caravan phpunit /var/www/html --extension-dir=/var/www/test --with-coverage
- save_cache:
key: dependencies-{{ epoch }}
key: dependencies-v1-{{ epoch }}
paths:
- .
- store_test_results:
path: /var/www/html/artifacts/phpunit
- store_artifacts:
path: /var/www/html/artifacts/phpunit/coverage

codeception: &codeception
back_to_dev: &back_to_dev
<<: *defaults
steps:
- checkout
- run:
name: Back to dev
command: |
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
~/.composer/vendor/bin/sws-caravan back-to-dev ${CIRCLE_TAG} ${CIRCLE_WORKING_DIRECTORY}
d8_codeception: &d8_codeception
<<: *defaults
steps:
- checkout:
path: /var/www/test
- run:
name: Run Acceptance Tests
name: Run Codeception Tests
command: |
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=/var/www/test
Expand All @@ -50,24 +59,31 @@ codeception: &codeception
- store_artifacts:
path: /var/www/html/artifacts

back_to_dev: &back_to_dev
d9_codeception: &d9_codeception
<<: *defaults
steps:
- checkout
- checkout:
path: /var/www/test
- run:
name: Back to dev
name: Run Codeception Tests
command: |
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
~/.composer/vendor/bin/sws-caravan back-to-dev ${CIRCLE_TAG} ${CIRCLE_WORKING_DIRECTORY}
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=/var/www/test
- store_test_results:
path: /var/www/html/artifacts/behat
- store_artifacts:
path: /var/www/html/artifacts

# Declare all of the jobs we should run.
jobs:
run-coverage:
<<: *code_coverage
run-codeception:
<<: *codeception
run-back-to-dev:
<<: *back_to_dev
run-d8-codeception:
<<: *d8_codeception
run-d9-codeception:
<<: *d9_codeception

# Declare a workflow that runs all of our jobs in parallel.
workflows:
Expand All @@ -82,19 +98,19 @@ workflows:
branches:
ignore:
- /.*/
weekly:
tests:
jobs:
- run-coverage
- run-d8-codeception
- run-d9-codeception
# Re-test every sunday in case this code becomes stale.
sundays:
jobs:
- run-coverage
# - run-codeception
triggers:
- schedule:
cron: "0 0 * * 0"
filters:
branches:
only:
- 8.x-2.x
tests:
jobs:
- run-coverage
# - run-codeception

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Stanford Media

8.x-2.13
--------------------------------------------------------------------------------
_Release Date: 2021-02-08_

- D8CORE-3425 Patch drupal core for better embeddable handling (#88) (86a2fa2)
- D9 automated Tests (#85) (9661793)
- Remove the filter caption template in favor of preprocess hook' (#87) (7ae18ee)

8.x-2.12
--------------------------------------------------------------------------------
_Release Date: 2020-12-04_
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"patches": {
"drupal/core": {
"https://www.drupal.org/project/drupal/issues/3186415": "https://git.drupalcode.org/project/drupal/-/merge_requests/93.diff",
"https://www.drupal.org/project/drupal/issues/3064751": "https://www.drupal.org/files/issues/2019-07-02/3064751-5.patch",
"https://www.drupal.org/project/drupal/issues/3059955": "https://www.drupal.org/files/issues/2019-12-28/3082690-80.patch"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Media Duplicate Validation'
type: module
description: 'Media Validation plugins to help prevent duplication of media items'
core_version_requirement: ^8.8 || ^9
version: 8.x-2.12
version: 8.x-2.13
package: media
dependencies:
- drupal:media
2 changes: 1 addition & 1 deletion stanford_media.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Provides media module configuration and plugins.
core_version_requirement: ^8.8 || ^9
package: media
type: module
version: 8.x-2.12
version: 8.x-2.13
dependencies:
- dropzonejs:dropzonejs
- drupal:breakpoint
Expand Down
11 changes: 10 additions & 1 deletion stanford_media.module
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ function stanford_media_theme_registry_alter(&$theme_registry) {
// Register the path to the template files.
$path = drupal_get_path('module', 'stanford_media') . '/templates';
$theme_registry['dropzonejs']['path'] = $path;
$theme_registry['filter_caption']['path'] = $path;
}

/**
Expand Down Expand Up @@ -117,3 +116,13 @@ function stanford_media_preprocess_media(&$variables) {
$variables['content'][$source_field][0]['#description'] = $variables['name'];
}
}

/**
* Implements hook_preprocess_HOOK().
*/
function stanford_media_preprocess_filter_caption(&$variables) {
if (!isset($variables['classes'])) {
$variables['classes'] = '';
}
$variables['classes'] = trim($variables['classes'] . ' caption');
}
1 change: 0 additions & 1 deletion templates/filter-caption.html.twig

This file was deleted.

17 changes: 17 additions & 0 deletions tests/codeception/acceptance/StanfordMediaCest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

class StanfordMediaCest {

/**
* ArcGis Embeddables can be saved.
*/
public function testArcGis(AcceptanceTester $I){
$I->logInWithRole('administrator');
$I->amOnPage('/media/add/embeddable');
$I->fillField('Name','ArcGis');
$I->fillField('oEmbed URL', 'https://storymaps.arcgis.com/stories/4586c60dc91744cbae9967442f990468');
$I->click('Save');
$I->canSee('Embeddable ArcGis has been created.');
}

}

0 comments on commit 475b4a5

Please sign in to comment.