Skip to content
Snippets Groups Projects
Commit 944c1212 authored by Zoltan Horvath's avatar Zoltan Horvath Committed by Ilias Dimopoulos
Browse files

ISAICP-9492: Test coverage

parent ce827674
No related branches found
No related tags found
1 merge request!210Patch release 2.2.1
@api @group-d
Feature:
When script kiddies are fetching the path of some outdated CSS / JS library
group, our system returns empty file responses instead of throwing and logging
errors.
Scenario Outline:
Given there are no preexisting log records on the site
And I go to "/sites/default/files/<asset url>"
Then the response status code should be 200
And there should be 0 log records
Examples:
# The value of the "include" query string is the gz-compressed, base64
# encoded list of the libraries which should be injected into the page.
| asset url |
# CSS - library: system/base.
| css/css_notahash.css?delta=50&language=en&theme=ventuno&include=eJwrriwuSc3VT0osTgUAG5MEcA |
# JS - at delta=0, there is an external library.
| js/js_notahahsh.js?delta=0&language=en&theme=ventuno&include=eJzLT40vT00qyc_PKdZPKSotSMzRg_F1i3MTi0py8hNTUosAOvcPwg&scope=header |
......@@ -190,6 +190,9 @@ function joinup_event_library_info_alter(array &$libraries, string $extension):
// Temporary support for Internet Explorer.
// @see https://citnet.tech.ec.europa.eu/CITnet/jira/browse/ISAICP-5564
// @see https://github.com/openeuropa/oe_webtools/pull/104
// This override also used in the test css_js_asset.feature. Please add a
// replacement library with an external JS asset for the test HTML head when
// this alteration is removed.
if ($extension === 'oe_webtools') {
$libraries['drupal.webtools-smartloader']['header'] = TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment