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

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into release-1.72.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrenssen committed Jun 18, 2021
2 parents 519d616 + a143042 commit 398fbd9
Show file tree
Hide file tree
Showing 134 changed files with 1,310 additions and 900 deletions.
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"drupal/restui": "^1.18",
"drupal/stage_file_proxy": "^1.1",
"drupaltest/behat-one-time-login": "^1.0",
"ec-europa/toolkit": "^4.4",
"ec-europa/toolkit": "^4.4.6",
"jcalderonzumba/gastonjs": "^1.2@dev",
"lovers-of-behat/table-extension": "^1.2.0",
"mglaman/phpstan-drupal": "~0.12",
Expand Down Expand Up @@ -347,9 +347,6 @@
"drupal/views_autosubmit": {
"The views plugin options are missing schema @see https://www.drupal.org/i/3195213": "https://git.drupalcode.org/project/views_autosubmit/-/merge_requests/2.diff"
},
"ec-europa/toolkit": {
"Download is broken @see DQA-481": "https://patch-diff.githubusercontent.com/raw/ec-europa/toolkit/pull/308.diff"
},
"openeuropa/oe_webtools": {
"Allow to pass an optional referer. @see https://github.com/openeuropa/oe_webtools/pull/96": "https://patch-diff.githubusercontent.com/raw/openeuropa/oe_webtools/pull/96.diff",
"Place the webtools loader on the head. @see https://github.com/openeuropa/oe_webtools/pull/102": "https://patch-diff.githubusercontent.com/raw/openeuropa/oe_webtools/pull/102.diff",
Expand Down
31 changes: 14 additions & 17 deletions composer.lock

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

16 changes: 13 additions & 3 deletions config/sync/block.block.webtools_etrans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ langcode: en
status: true
dependencies:
module:
- eif
- node
- joinup_core
- oe_webtools_etrans
theme:
- joinup_theme
Expand All @@ -25,4 +24,15 @@ settings:
delay: 0
include: ''
exclude: ''
visibility: { }
visibility:
request_route:
id: request_route
routes:
- entity.node.delete_form
- entity.node.edit_form
- entity.rdf_entity.delete_form
- entity.rdf_entity.edit_form
- entity.taxonomy_term.edit_form
- entity.taxonomy_term.delete_form
negate: true
context_mapping: { }
29 changes: 20 additions & 9 deletions phpcs-ruleset.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
<config name="installed_paths" value="../../slevomat/coding-standard"/>

<!-- Exclude unsupported file types. -->
<exclude-pattern>*.gif</exclude-pattern>
<exclude-pattern>*.less</exclude-pattern>
<exclude-pattern>*.png</exclude-pattern>
<exclude-pattern>*.gif$</exclude-pattern>
<exclude-pattern>*.png$</exclude-pattern>

<!-- Minified files don't have to comply with coding standards. -->
<exclude-pattern>*.min.css</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>*.min.css$</exclude-pattern>
<exclude-pattern>*.min.js$</exclude-pattern>

<!-- Exclude frontend third-party libraries from coding standards -->
<exclude-pattern>web/themes/joinup/vendor/*</exclude-pattern>
<exclude-pattern>web/themes/joinup/node_modules/*</exclude-pattern>
<exclude-pattern>/web/themes/joinup/vendor/*</exclude-pattern>
<exclude-pattern>/web/themes/joinup/node_modules/*</exclude-pattern>

<rule ref="./vendor/drupal/coder/coder_sniffer/Drupal">
<exclude name="Drupal.Semantics.FunctionTriggerError.TriggerErrorTextLayoutStrict" />
Expand All @@ -32,9 +31,21 @@
<exclude name="DrupalPractice.Yaml" />
</rule>

<rule ref="./vendor/ec-europa/qa-automation/phpcs/QualityAssurance">
<!-- Exclude sniff which incorrectly forces use of alternative method. See https://citnet.tech.ec.europa.eu/CITnet/jira/browse/DQA-1418 -->
<exclude name="QualityAssurance.Functions.DrupalWrappers.FoundWithAlternative" />
<!-- Ignore non-Drupal code. -->
<exclude-pattern>/src/Composer/</exclude-pattern>
</rule>

<!-- Do not report lines exceeding 80 characters for Markdown files that contain long file paths. -->
<rule ref="Drupal.Files.TxtFileLineLength.TooLong">
<exclude-pattern>web/modules/custom/joinup_subscription/README.md</exclude-pattern>
<exclude-pattern>/web/modules/custom/*/README.md$</exclude-pattern>
</rule>

<!-- Ignore false positives regarding hardcoded paths in README files. -->
<rule ref="QualityAssurance.Generic.HardcodedPath.HardcodedPath">
<exclude-pattern>/README.*</exclude-pattern>
</rule>

<!-- Validate the (post)update identifiers. -->
Expand All @@ -47,7 +58,7 @@
</properties>
</rule>

<!-- Require the strict types declaration in every PHP file. -->
<!-- Require nullable types to be declared as such. -->
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue">
</rule>

Expand Down
12 changes: 10 additions & 2 deletions resources/runner/solr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,19 @@ commands:
- task: exec
command: curl
arguments:
- ${env.SOLR_CORE_PUBLISHED_URL}/${env.SOLR_CORE_PUBLISHED_NAME}/update?stream.body=<delete><query>*:*</query></delete>&commit=true
- ${env.SOLR_CORE_PUBLISHED_URL}/${env.SOLR_CORE_PUBLISHED_NAME}/update?commit=true&wt=json
options:
request: POST
header: 'Content-Type: application/xml'
data: '<delete><query>*:*</query></delete>'
- task: exec
command: curl
arguments:
- ${env.SOLR_CORE_UNPUBLISHED_URL}/${env.SOLR_CORE_UNPUBLISHED_NAME}/update?stream.body=<delete><query>*:*</query></delete>&commit=true
- ${env.SOLR_CORE_UNPUBLISHED_URL}/${env.SOLR_CORE_UNPUBLISHED_NAME}/update?commit=true&wt=json
options:
request: POST
header: 'Content-Type: application/xml'
data: '<delete><query>*:*</query></delete>'

# Restores the Solr index from a snapshot.
solr:restore:
Expand Down
24 changes: 21 additions & 3 deletions scripts/solr/restore_solr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# and UAT environments. For local development better use the runner command:
# $ ./vendor/bin/run toolkit:install-dump

CURRENT_DIR=$(pwd)
SOLR_SERVER_URL="http://localhost:8983/solr"
TIMEOUT=300
TIMEOUT_PATTERN='^[0-9]+$'
Expand Down Expand Up @@ -56,20 +57,37 @@ if ! [[ $TIMEOUT =~ ${TIMEOUT_PATTERN} ]] ; then
error "Timeout needs to be numeric!";
fi

if [ "${CORE}" == '' ] || [ "${SNAPSHOT_DIR}" == '' ] || [ "${SNAPSHOT_NAME}" == '' ]; then
if [ "${CORE}" == '' ] || [ "${SNAPSHOT_NAME}" == '' ]; then
show_help;
exit 1;
fi

CORE_EXISTS=`curl -sS "${SOLR_SERVER_URL}/admin/cores?action=STATUS&core=${CORE}&wt=xml" |grep -o '<long name="uptime">'`
# Assume the current dir if no snapshot dir has been passed.
if [ "${SNAPSHOT_DIR}" == '' ]; then
SNAPSHOT_DIR=${CURRENT_DIR}
fi

if [ ! -d "${SNAPSHOT_DIR}" ]; then
error "The '${SNAPSHOT_DIR}' directory doesn't exist!";
fi

# Normalize the snapshot dir to an absolute path.
cd ${SNAPSHOT_DIR}
SNAPSHOT_DIR=$(pwd)
cd ${CURRENT_DIR}

if [ ! -d "${SNAPSHOT_DIR}/snapshot.${SNAPSHOT_NAME}" ]; then
error "The '${SNAPSHOT_DIR}' directory doesn't contain a '${SNAPSHOT_NAME}' snapshot!";
fi

CORE_EXISTS=`curl -sS "${SOLR_SERVER_URL}/admin/cores?action=STATUS&core=${CORE}&wt=xml" |grep -o '<long name="uptime">'`
if [ "${CORE_EXISTS}" == '' ]; then
error "Solr '${CORE}' core does not exists on this server!";
fi

# Wipe out the existing index.
log "Wiping out the exiting index of Solr '${CORE}' core."
WIPE_INDEX=`/usr/bin/curl -sS "${SOLR_SERVER_URL}/${CORE}/update?stream.body=<delete><query>*:*</query></delete>&commit=true&wt=xml"`
WIPE_INDEX=`/usr/bin/curl -sS --request POST --header "Content-Type: application/xml" --data "<delete><query>*:*</query></delete>" "${SOLR_SERVER_URL}/${CORE}/update?commit=true&wt=xml"`
log "${WIPE_INDEX}"

# Restore the index.
Expand Down
1 change: 1 addition & 0 deletions tests/behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ default:
lastName: Last name
- Drupal\Tests\honeypot\Behat\HoneypotContext
- Drupal\Tests\message_digest\Behat\MessageDigestContext
- Drupal\Tests\oe_webtools\Behat\WebtoolsETransContext
- Drupal\Tests\oe_webtools\Behat\WebtoolsMapsContext
- Drupal\Tests\pipeline\Behat\PipelineContext
- Drupal\Tests\spdx\Behat\SpdxContext
Expand Down
2 changes: 1 addition & 1 deletion tests/features/asset_release/asset_release.delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: Asset release "delete" functionality.
Scenario: "Delete" action should redirect users to the parent solution.
# Navigating through UI should redirect the user to the solution homepage.
When I am logged in as a "moderator"
And I go to the "Yet another release" release edit form
And I go to the edit form of the "Yet another release" release
And I click "Delete"
And I press "Delete"
Then I should be on "/collection/yet-another-collection/solution/yet-another-solution"
2 changes: 1 addition & 1 deletion tests/features/collection/collection.about.feature
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Feature: About page

# When there is no abstract, the description should be shown in the homepage.
When I am logged in as a "moderator"
And I go to the "Fitness at work" collection edit form
And I go to the edit form of the "Fitness at work" collection
And I fill in "Abstract" with ""
And I press "Publish"
Then I should see the heading "Fitness at work"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Feature: Collection membership administration
# Check that Dr House can't edit the collection.
When I am logged in as "Gregory House"
And I go to the "Medical diagnosis" collection
Then I go to the "Medical diagnosis" collection edit form
And I go to the edit form of the "Medical diagnosis" collection
Then I should see the heading "Access denied"

# Dr Cuddy promotes Dr House to facilitator.
Expand All @@ -227,8 +227,7 @@ Feature: Collection membership administration

# Dr House can now edit the collection.
When I am logged in as "Gregory House"
And I go to the "Medical diagnosis" collection
Then I go to the "Medical diagnosis" collection edit form
And I go to the edit form of the "Medical diagnosis" collection
Then I should not see the heading "Access denied"

Scenario: Privileged members should be allowed to add users to a collection.
Expand Down
8 changes: 4 additions & 4 deletions tests/features/collection/last_update_time.feature
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ Feature: Tests the collection last update time.
# The custom page is the newest thus will give the collection updated time.
Then the response should contain "2016-05-06T05:29"

And I go to the document content "Get Rid of Rats" edit screen
When I press "Update"
When I go to the edit form of the "Get Rid of Rats" document
And I press "Update"
# The updated time has changed to the current time but we cannot catch the
# time we ran the update.
Then the response should not contain "2016-05-06T05:29"
Expand All @@ -101,7 +101,7 @@ Feature: Tests the collection last update time.
Then I should see "about a minute ago"

# Editing the solution changes the last updated time.
Given I go to the "Roof Hole Cover" solution edit form
Given I go to the edit form of the "Roof Hole Cover" solution
And I select "Public Policy Cycle" from "Solution type"
And I select "Demography" from "Topic"
And I press "Publish"
Expand All @@ -113,7 +113,7 @@ Feature: Tests the collection last update time.
Then I should see "about a minute ago"

# Deleting the solution changes the last updated time.
Given I go to the "Roof Hole Cover" solution edit form
Given I go to the edit form of the "Roof Hole Cover" solution
And I click "Delete"
When I press "Delete"
And I go to the homepage of the "Household Wizard" collection
Expand Down
4 changes: 2 additions & 2 deletions tests/features/collection/propose.feature
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Feature: Proposing a collection
And the "Just a proposal" collection logo is image #3
And the "Just a proposal" collection banner is image #8

When I go to the "Just a proposal" collection edit form
Given I go to the edit form of the "Just a proposal" collection
And I click "Additional fields" tab
And I remove the file from the "Logo" field
But I wait for AJAX to finish
Expand All @@ -187,7 +187,7 @@ Feature: Proposing a collection
And I wait for AJAX to finish
And I press "Propose"

When I go to the "Just a proposal" collection edit form
When I go to the edit form of the "Just a proposal" collection
And I click "Additional fields" tab
Then I should see the link "logo.png"

Expand Down
2 changes: 1 addition & 1 deletion tests/features/communities/eif/solutions_page.feature
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Feature: As a user, visiting the EIF Toolbox page, I want to be able to filter
And the menu link "Solutions" is in the active trail

Given I am logged in as a moderator
When I go to the "Solution 3" solution edit form
When I go to the edit form of the "Solution 3" solution
And I select "Recommendation 7" from "EIF reference"
And I check the box "Semantic assets"
# Other require fields...
Expand Down
4 changes: 2 additions & 2 deletions tests/features/communities/eif/vocabulary.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Feature:
| collection | EIF Toolbox |

Given I am logged in as a facilitator of the "Some EIF solution" solution
When I go to the "Some EIF solution" solution edit form
When I go to the edit form of the "Some EIF solution" solution
Then the following fields should not be present "EIF reference, EIF category"

Given I am logged in as a moderator
When I go to the "Some EIF solution" solution edit form
When I go to the edit form of the "Some EIF solution" solution
Then the following fields should be present "EIF reference, EIF category"

When I press "Publish"
Expand Down
4 changes: 2 additions & 2 deletions tests/features/communities/tallinn/dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Feature:
Then the page should be cached

# Edit the group entity.
Given I go to the "Tallinn Ministerial Declaration" collection edit form
When I go to the edit form of the "Tallinn Ministerial Declaration" collection
And I fill in "Description" with "Hooli"
When I press "Publish"
And I go to "/api/v1/communities/tallinn/report"
Expand All @@ -85,7 +85,7 @@ Feature:
Then the page should be cached

# Edit any report.
Given I go to the tallinn_report content "Malta" edit screen
When I go to the edit form of the "Malta" "tallinn report"
And I press "Save"
When I go to "/api/v1/communities/tallinn/report"
Then the page should not be cached
Expand Down
Loading

0 comments on commit 398fbd9

Please sign in to comment.