Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
ISAICP-5732: Update to Smart Trim 8.x-1.2. Fixes SA-CONTRIB-201… (#1926)
Browse files Browse the repository at this point in the history
ISAICP-5732: Update to Smart Trim 8.x-1.2. Fixes SA-CONTRIB-2019-092
  • Loading branch information
claudiu-cristea authored Dec 17, 2019
2 parents db9cc5c + 9b6b4b3 commit 785936b
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 44 deletions.
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"drupal/search_api": "1.13",
"drupal/search_api_solr": "2.2",
"drupal/simplenews": "^1.0-beta1",
"drupal/smart_trim": "^1.0",
"drupal/smart_trim": "~1.2",
"drupal/social_media_links": "^2.6",
"drupal/spdx": "^1.0.0-alpha5",
"drupal/state_machine": "^1.0-rc1",
Expand Down Expand Up @@ -253,9 +253,6 @@
"Views cached results are not taking into account the access check. @see https://www.drupal.org/node/2824640": "resources/patch/search-api-2824640-103-8.x-1.13.patch",
"item_id column is too short. @see https://www.drupal.org/node/2829696": "https://www.drupal.org/files/issues/item_id_column_is_too_short-2829696-10-D8.patch"
},
"drupal/smart_trim": {
"Additional options checkbox do not appear to save @see https://www.drupal.org/project/smart_trim/issues/2941492": "https://www.drupal.org/files/issues/2018-05-04/2941492-4.patch"
},
"drupal/social_media_links": {
"Missing config schema for field, widget and formatter @see https://www.drupal.org/node/2898680": "https://www.drupal.org/files/issues/2898680-6.patch",
"Plugins with URL prefix should not allow URLs as user input @see https://www.drupal.org/node/2898726": "https://www.drupal.org/files/issues/2898726-3.patch"
Expand Down
29 changes: 13 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/features/collection/collection.about.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Feature: About page
And I press "Publish"
Then I should see the heading "Fitness at work"
And the page should contain the html text "This collection is intended to show ways of being fit while working"
And I should see the text "In consequat sapien risus a…"
And I should see the text "In consequat sapien risus a malesuada…"
But I should not see the text "malesuada eros auctor eget. Curabitur at"
When I click "Read more" in the "Content" region
Then I should see the heading "About Fitness at work"
4 changes: 2 additions & 2 deletions tests/features/collection/collection_content.feature
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Feature: Collection content
# Check the discussion tile.
Then I should see the "Bigger than Egyptian Museum of Cairo?" tile
# Check into the HTML so that we assert that actually the HTML has been stripped.
And the page should contain the html text "Link to the museum web site ."
And the page should contain the html text "Link to the museum website."
And I should not see the link "Link to the museum"
# Check the document tile.
And I should see the "Upper Floor Map" tile
Expand All @@ -142,5 +142,5 @@ Feature: Collection content
And I should see the "Turin Egyptian Museum Reopened" tile
# Check the newsletter tile.
And I should see the "Stay informed about this year events and exhibitions" tile
And the page should contain the html text "Subscribe to the newsletter to stay up-to-date! ."
And the page should contain the html text "Subscribe to the newsletter to stay up-to-date!."
And I should not see the link "Subscribe to the newsletter"
29 changes: 17 additions & 12 deletions tests/features/joinup_rss/collection_feed.feature
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ Feature: Collection RSS feed.
| link | /collection/indigo-monkey/feed.xml |
And the RSS feed should have 7 items
And the RSS feed items should be:
| title | link | description | publication date | author |
| Discussion: Is the indigo coloration caused by their food? | /collection/indigo-monkey/discussion/indigo-coloration-caused-their-food | I was reading the technical paper and it seems their main food is the indigo cherries. | Mon, 21 Jan 2019 13:00:00 +0100 | Aleta Jakeman |
| News: Monkeys favourite indigo amongst colors | /collection/indigo-monkey/news/monkeys-favourite-indigo-amongst-colors | Research results are out. | Mon, 21 Jan 2019 12:36:00 +0100 | Aleta Jakeman |
| Solution: Proton Lonesome | /solution/proton-lonesome | | Sat, 05 Jan 2019 10:00:00 +0100 | Aleta Jakeman |
| Solution: Lantern Global | /solution/lantern-global | | Tue, 18 Dec 2018 08:00:00 +0100 | Aleta Jakeman |
| Event: Banana tasting | /collection/indigo-monkey/event/banana-tasting | Testing more than 20 varities of bananas from all over the world. | Fri, 14 Sep 2018 07:36:00 +0200 | Forest Robinson |
| Custom page: Indigo variations | /collection/indigo-monkey/indigo-variations | The four major tones of indigo are listed here. | Sun, 15 Oct 2017 18:30:00 +0200 | Forest Robinson |
| Document: Indigo technical paper | /collection/indigo-monkey/document/indigo-technical-paper | All technical information about the rare indigo monkeys. | Mon, 30 May 2016 12:21:00 +0200 | Aleta Jakeman |
| title | link | description | publication date | author |
| Discussion: Is the indigo coloration caused by their food? | /collection/indigo-monkey/discussion/indigo-coloration-caused-their-food | <p>I was reading the technical paper and it seems their main food is the indigo cherries.</p> | Mon, 21 Jan 2019 13:00:00 +0100 | Aleta Jakeman |
| News: Monkeys favourite indigo amongst colors | /collection/indigo-monkey/news/monkeys-favourite-indigo-amongst-colors | <p>Research results are out.</p> | Mon, 21 Jan 2019 12:36:00 +0100 | Aleta Jakeman |
| Solution: Proton Lonesome | /solution/proton-lonesome | | Sat, 05 Jan 2019 10:00:00 +0100 | Aleta Jakeman |
| Solution: Lantern Global | /solution/lantern-global | | Tue, 18 Dec 2018 08:00:00 +0100 | Aleta Jakeman |
| Event: Banana tasting | /collection/indigo-monkey/event/banana-tasting | <p>Testing more than 20 varities of bananas from all over the world.</p> | Fri, 14 Sep 2018 07:36:00 +0200 | Forest Robinson |
| Custom page: Indigo variations | /collection/indigo-monkey/indigo-variations | <p>The four major tones of indigo are listed here.</p> | Sun, 15 Oct 2017 18:30:00 +0200 | Forest Robinson |
| Document: Indigo technical paper | /collection/indigo-monkey/document/indigo-technical-paper | <p>All technical information about the rare indigo monkeys.</p> | Mon, 30 May 2016 12:21:00 +0200 | Aleta Jakeman |

When I go to the homepage of the "Dreaded Scissors" collection
Then the page should contain an RSS autodiscovery link with title "Latest updates from the Dreaded Scissors collection" pointing to "/collection/dreaded-scissors/feed.xml"
Expand All @@ -76,10 +76,15 @@ Feature: Collection RSS feed.
| description | This feed contains the latest published content from the Dreaded Scissors collection, including the newest solutions. |
| link | /collection/dreaded-scissors/feed.xml |
And the RSS feed items should be:
| title | link | description | publication date | author |
| Solution: Shiny Ray | /solution/shiny-ray | | Tue, 14 Aug 2018 17:36:00 +0200 | Otto Drake |
| News: New metal alloy improves scissors | /collection/dreaded-scissors/news/new-metal-alloy-improves-scissors | It improves sharpness but they are more subject to rust. | Wed, 11 Apr 2018 09:00:00 +0200 | Otto Drake |
| Event: Scissor sharpening party | /collection/dreaded-scissors/event/scissor-sharpening-party | The place where to be if you want to keep cutting the paper at the best of your scissors possibilities . Lorem ipsum dolor sit amet consectetur adipiscing elit. Etiam sed consectetur turpis. In porta | Sun, 26 Nov 2017 14:18:00 +0100 | Otto Drake |
| title | link | description | publication date | author |
| Solution: Shiny Ray | /solution/shiny-ray | | Tue, 14 Aug 2018 17:36:00 +0200 | Otto Drake |
| News: New metal alloy improves scissors | /collection/dreaded-scissors/news/new-metal-alloy-improves-scissors | <p>It improves sharpness but they are more subject to rust.</p> | Wed, 11 Apr 2018 09:00:00 +0200 | Otto Drake |
# The 'Scissor sharpening party' is using the `content_editor` text format
# which is not configured to wrap the result in <p> tags after stripping
# the HTML from it. This is different from the other tests that use the
# `plain_text` text format. In production all content will be using this
# text format since all text is entered through the content editor.
| Event: Scissor sharpening party | /collection/dreaded-scissors/event/scissor-sharpening-party | The place where to be if you want to keep cutting the paper at the best of your scissors possibilities. Lorem ipsum dolor sit amet consectetur adipiscing elit. Etiam sed consectetur turpis. In porta | Sun, 26 Nov 2017 14:18:00 +0100 | Otto Drake |

When I go to the homepage of the "Lantern Global" solution
Then I should not see the link "RSS feed" in the "Entity actions" region
Expand Down
12 changes: 6 additions & 6 deletions web/modules/custom/joinup_licence/js/licence_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
});

// Check every active filter item
// and hide tiles which don't contain proper data-licence-category
// and hide tiles which don't contain proper data-licence-category.
$('.licence-filter__item a.is-active').each(function () {
var currentlicenceCategory = $(this).attr('data-licence-category');
if (typeof currentlicenceCategory !== 'undefined') {
Expand All @@ -31,7 +31,7 @@
});

// Check licence search field value
// and hide tiles which don't contain proper data-spdx
// and hide tiles which don't contain proper data-spdx.
var licenceTiles = 0;
var currentSpdxId = $('#licence-search').val().toLowerCase();
$licenceTile.each(function () {
Expand All @@ -48,7 +48,7 @@
}
});

// Show calculated number of tiles
// Show calculated number of tiles.
$('.licence-counter__number').text(licenceTiles);
}

Expand Down Expand Up @@ -129,7 +129,7 @@
checkLicenceCategories();
});

// Reset licence listing
// Reset licence listing.
$('#licence-reset').on('click', function (event) {
$('.licence-filter__item a.is-active').removeClass('is-active');
$('.licence-search__input input').val('');
Expand Down Expand Up @@ -165,7 +165,7 @@
else {
if (licencesArray.length > 0) {
licencesArray = JSON.parse(licences);
licencesArray = licencesArray.filter(function(value){
licencesArray = licencesArray.filter(function (value) {
return value !== licenceName;
});
licencesString = JSON.stringify(licencesArray);
Expand Down Expand Up @@ -197,7 +197,7 @@

// Filter on window load
// Needed for licence search filter.
$(window).on('load', function() {
$(window).on('load', function () {
checkLicenceCategories();
checkCompareStatus();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ public function fillFacetsWithResults(array $facets) {
if (!$results) {
/* @var $search_api_index \Drupal\search_api\IndexInterface */
$search_api_index = $this->getIndex();
$current_request = $this->requestStack->getCurrentRequest();

// Create the query.
$options = [
'parse_mode' => 'direct',
// @Todo Fix limit, get it from field settings.
'limit' => 10,
'offset' => isset($_GET['page']) ? $_GET['page'] : 0,
'offset' => $current_request->get('page', 0),
];
$query = $search_api_index->query($options);
$query->setSearchId($plugin_definition_id);
Expand Down
4 changes: 2 additions & 2 deletions web/themes/joinup/js/cookie-extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

(function ($) {
// Add custom class if page has cookie banner.
$(window).bind("load", function() {
$(window).bind("load", function () {
if (window.bannerDisplayed) {
$('body').addClass('has-cookie-consent-banner');
}
});
})(jQuery);
})(jQuery);

0 comments on commit 785936b

Please sign in to comment.