" in the "Description" wysiwyg editor
@@ -109,8 +107,6 @@ Feature: Add distribution through the UI
And I click "Add distribution" in the plus button menu
Then I should see the heading "Add Distribution"
And the following fields should be present "Title, Description, Access URL, Licence, Format, Representation technique"
- # @todo: The link has to be changed to the legal contact form.
- # @see: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/ISAICP-2789
And I should see the link "contacting us"
When I fill in "Title" with "Source tarball"
And I enter "
The full source code.
" in the "Description" wysiwyg editor
diff --git a/tests/features/asset_distribution/asset_distribution.delete.feature b/tests/features/asset_distribution/asset_distribution.delete.feature
index 9cd65d6db8..76c2d46661 100644
--- a/tests/features/asset_distribution/asset_distribution.delete.feature
+++ b/tests/features/asset_distribution/asset_distribution.delete.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-a
Feature: Asset distribution deleting.
In order to manage asset distributions
As a solution owner or solution facilitator
diff --git a/tests/features/asset_distribution/asset_distribution.edit.feature b/tests/features/asset_distribution/asset_distribution.edit.feature
index 944f6f02b5..d64fc35181 100644
--- a/tests/features/asset_distribution/asset_distribution.edit.feature
+++ b/tests/features/asset_distribution/asset_distribution.edit.feature
@@ -53,9 +53,7 @@ Feature: Asset distribution editing.
And I go to the homepage of the "Asset distribution example" asset distribution
Then I should not see the link "Edit" in the "Entity actions" region
- @email
Scenario: Edit a distribution as a solution facilitator.
- When all e-mails have been sent
When I am logged in as a facilitator of the "Solution A" solution
And I go to the homepage of the "Asset distribution example" asset distribution
And I click "Edit"
diff --git a/tests/features/asset_release/add_asset_release.feature b/tests/features/asset_release/add_asset_release.feature
index fdfebe281c..58381f887e 100644
--- a/tests/features/asset_release/add_asset_release.feature
+++ b/tests/features/asset_release/add_asset_release.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: "Add release" visibility options.
In order to manage releases
As a solution facilitator
diff --git a/tests/features/asset_release/asset_release.moderation.feature b/tests/features/asset_release/asset_release.moderation.feature
index c185408d19..5d2078b56e 100644
--- a/tests/features/asset_release/asset_release.moderation.feature
+++ b/tests/features/asset_release/asset_release.moderation.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-a
Feature: Asset release moderation
In order to manage releases
As a user of the website
@@ -52,7 +52,7 @@ Feature: Asset release moderation
And I should not see the following warning messages:
| warning messages |
| You are viewing the published version. To view the latest draft version, click here. |
- Given all e-mails have been sent
+
When I click "Edit" in the "Entity actions" region
And I should see the workflow buttons "Update, Save as draft"
When I fill in "Release notes" with "We go live soon."
@@ -75,7 +75,6 @@ Feature: Asset release moderation
And I click "Add release" in the plus button menu
Then I should see the text "Authored on"
- When all e-mails have been sent
And I go to the "Release of the dark ship" release
And I click "Edit" in the "Entity actions" region
Then the current workflow state should be "Validated"
@@ -130,7 +129,6 @@ Feature: Asset release moderation
# Approve changes as a moderator.
When I am logged in as a moderator
- And all e-mails have been sent
And I go to the "Release of the dark ship" release
And I click "Edit" in the "Entity actions" region
And I should see the workflow buttons "Update, Publish"
@@ -146,8 +144,7 @@ Feature: Asset release moderation
| body | Your proposed Release fix, v1 for the solution "Dark Ship" has been validated as per your request. |
# Delete a release as a moderator.
- When all e-mails have been sent
- And I click "Edit" in the "Entity actions" region
+ When I click "Edit" in the "Entity actions" region
And I click "Delete"
And I press "Delete"
And the following email should have been sent:
diff --git a/tests/features/asset_release/asset_release.overview.feature b/tests/features/asset_release/asset_release.overview.feature
index f15fb78a0c..9fa05f095d 100644
--- a/tests/features/asset_release/asset_release.overview.feature
+++ b/tests/features/asset_release/asset_release.overview.feature
@@ -102,8 +102,6 @@ Feature: Asset distribution overview on solution.
And I should see the text "Latest release"
# Publish the release as a solution facilitator.
- # @todo Unpublished releases are no longer visible for facilitators.
- # @see https://citnet.tech.ec.europa.eu/CITnet/jira/browse/ISAICP-5736
When I am logged in as a facilitator of the "Lovely Butterfly" solution
And I go to the homepage of the "The Deep Doors" release
When I click "Edit" in the "Entity actions" region
diff --git a/tests/features/collection/collection.archived.feature b/tests/features/collection/collection.archived.feature
index fcda31cee7..12b0c0bfdb 100644
--- a/tests/features/collection/collection.archived.feature
+++ b/tests/features/collection/collection.archived.feature
@@ -1,4 +1,4 @@
-@api @terms @group-a
+@api @terms @group-e
Feature: Creating content and commenting on archived collection
In order to not waste time on maintaining legacy collections
As a collection owner
diff --git a/tests/features/collection/collection.edit.feature b/tests/features/collection/collection.edit.feature
index fcf6149567..ef399cd0ee 100644
--- a/tests/features/collection/collection.edit.feature
+++ b/tests/features/collection/collection.edit.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature: Editing collections
In order to manage collections
As a collection owner or collection facilitator
diff --git a/tests/features/collection/collection.event.feature b/tests/features/collection/collection.event.feature
index 1725b62e34..28bd59d480 100644
--- a/tests/features/collection/collection.event.feature
+++ b/tests/features/collection/collection.event.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: As a user of the website
In order to find my way around events
I need to be able to view collection events grouped properly.
diff --git a/tests/features/collection/collection.member_administration.feature b/tests/features/collection/collection.member_administration.feature
index 7b08ccf4b7..874646aaf7 100644
--- a/tests/features/collection/collection.member_administration.feature
+++ b/tests/features/collection/collection.member_administration.feature
@@ -1,4 +1,4 @@
-@api @group-a @terms
+@api @terms @group-a
Feature: Collection membership administration
In order to build a community
As a collection facilitator
@@ -36,10 +36,8 @@ Feature: Collection membership administration
Then I should see the button "Apply to selected items" in the "Members admin form header" region
But I should not see the button "Apply to selected items" in the "Members admin form actions" region
- @email
Scenario: Request a membership
When I am logged in as "Donald Duck"
- And all e-mails have been sent
And I go to the "Medical diagnosis" collection
And I press the "Join this collection" button
Then I should see the success message "Your membership to the Medical diagnosis collection is under approval."
@@ -54,7 +52,6 @@ Feature: Collection membership administration
| subject | Joinup: A user has requested to join your collection |
| body | Donald Duck has requested to join your collection "Medical diagnosis" as a member. |
- @email
Scenario: Approve a membership
# Check that a member with pending state does not have access to add new content.
Given I am logged in as "Kathie Cumbershot"
@@ -69,7 +66,6 @@ Feature: Collection membership administration
# Approve a membership.
Given I am logged in as "Lisa Cuddy"
- And all e-mails have been sent
And I am on the members page of "Medical diagnosis"
Then the "Action" select should contain the following options:
| Approve the pending membership(s) |
@@ -105,10 +101,9 @@ Feature: Collection membership administration
Then I should see the plus button menu
Then I should see the link "Add news"
- @javascript @email
+ @javascript
Scenario: Request a membership with subscription and approve it
When I am logged in as "Cam Bridge"
- And all e-mails have been sent
And I go to the "Medical diagnosis" collection
And I press the "Join this collection" button
Then a modal should open
@@ -120,7 +115,6 @@ Feature: Collection membership administration
# Approve a membership.
Given I am logged in as "Lisa Cuddy"
- When all e-mails have been sent
And I go to the "Medical diagnosis" collection
And I open the group sidebar menu
@@ -142,10 +136,8 @@ Feature: Collection membership administration
When I click the "My subscriptions" link from the email sent to "Cam Bridge"
Then I should see the heading "My subscriptions"
- @email
Scenario: Reject a membership
Given I am logged in as "Lisa Cuddy"
- And all e-mails have been sent
And I am on the members page of "Medical diagnosis"
# Assert that the user does not see the default OG tab.
Then I should not see the link "Group"
@@ -199,7 +191,6 @@ Feature: Collection membership administration
Then I should not see the plus button menu
And I should see the button "Join this collection"
- @email
Scenario: Assign a new role to a member
# Check that Dr House can't edit the collection.
When I am logged in as "Gregory House"
@@ -209,7 +200,6 @@ Feature: Collection membership administration
# Dr Cuddy promotes Dr House to facilitator.
When I am logged in as "Lisa Cuddy"
- And all e-mails have been sent
And I go to the "Medical diagnosis" collection
Then I click "Members" in the "Left sidebar"
# Assert that the user does not see the default OG tab.
@@ -360,7 +350,6 @@ Feature: Collection membership administration
| Eric Foreman |
| Eric Drexler |
- @email
Scenario: Privileged members should be allowed to invite users to a collection.
Given users:
| Username | E-mail | First name | Family name |
@@ -398,7 +387,6 @@ Feature: Collection membership administration
| Christian Dwight |
| Jeannette Belanger |
When I select "Facilitator" from "Role"
- And the mail collector cache is empty
And I press "Invite members"
Then I should see the success message "2 users have been invited to this group."
And the following email should have been sent:
diff --git a/tests/features/collection/collection.member_count.feature b/tests/features/collection/collection.member_count.feature
index 4100d0a9d0..3ca24bc25a 100644
--- a/tests/features/collection/collection.member_count.feature
+++ b/tests/features/collection/collection.member_count.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-e
Feature: Collection homepage
In order to have the users properly informed
As an owner of the website
diff --git a/tests/features/collection/collection.member_overview.feature b/tests/features/collection/collection.member_overview.feature
index a62d09794f..277eaab523 100644
--- a/tests/features/collection/collection.member_overview.feature
+++ b/tests/features/collection/collection.member_overview.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-e
Feature: Collection membership overview
In order to foster my community and create a sense of belonging
As a collection member
diff --git a/tests/features/collection/collection.member_overview_filtering.feature b/tests/features/collection/collection.member_overview_filtering.feature
index a8331ad960..a115b40515 100644
--- a/tests/features/collection/collection.member_overview_filtering.feature
+++ b/tests/features/collection/collection.member_overview_filtering.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-e
Feature: Type something to filter the listing the member list
In order to quickly find a particular member
As a moderator
diff --git a/tests/features/collection/collection.moderation.feature b/tests/features/collection/collection.moderation.feature
index 93a9c97342..feaeabeb4f 100644
--- a/tests/features/collection/collection.moderation.feature
+++ b/tests/features/collection/collection.moderation.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-a
Feature: Collection moderation
In order to manage collections programmatically
As a user of the website
diff --git a/tests/features/collection/collection.moderation.integration.feature b/tests/features/collection/collection.moderation.integration.feature
index 1fc1c667f0..d5148b170c 100644
--- a/tests/features/collection/collection.moderation.integration.feature
+++ b/tests/features/collection/collection.moderation.integration.feature
@@ -1,4 +1,4 @@
-@api @terms @group-a
+@api @terms @group-d
Feature: As a user of the website
I want to be able to perform available transitions
according to the state of the entity and the graph they are stored in.
diff --git a/tests/features/collection/collection_content.feature b/tests/features/collection/collection_content.feature
index 96533539b8..20d04e2674 100644
--- a/tests/features/collection/collection_content.feature
+++ b/tests/features/collection/collection_content.feature
@@ -1,4 +1,4 @@
-@api @terms @group-a
+@api @terms @group-d
Feature: Collection content
As a user of the website
I want to access the content of a collection
diff --git a/tests/features/collection/collection_overview.feature b/tests/features/collection/collection_overview.feature
index 37f3af8baa..eb79baec21 100644
--- a/tests/features/collection/collection_overview.feature
+++ b/tests/features/collection/collection_overview.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature: Collections Overview
Scenario: Check visibility of "Collections" menu link.
diff --git a/tests/features/collection/content_negotiation.feature b/tests/features/collection/content_negotiation.feature
index 23aec2ebe2..cc2667853f 100644
--- a/tests/features/collection/content_negotiation.feature
+++ b/tests/features/collection/content_negotiation.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature: Export collection metadata
As a user of Joinup I am able to retrieve the content of entities in a machine readable format.
diff --git a/tests/features/collection/export_metadata.feature b/tests/features/collection/export_metadata.feature
index da1f3a3b3e..0c7eaa7601 100644
--- a/tests/features/collection/export_metadata.feature
+++ b/tests/features/collection/export_metadata.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature: Export collection metadata
As a user of Joinup I should be able to download the ADMS properties of the collections.
diff --git a/tests/features/collection/homepage.feature b/tests/features/collection/homepage.feature
index bb949ff879..a25b961e21 100644
--- a/tests/features/collection/homepage.feature
+++ b/tests/features/collection/homepage.feature
@@ -1,4 +1,4 @@
-@api @terms @group-a
+@api @terms @group-c
Feature: Collection homepage
In order find content around a topic
As a user of the website
diff --git a/tests/features/collection/join-as-anonymous.feature b/tests/features/collection/join-as-anonymous.feature
index 395d853344..64a837596d 100644
--- a/tests/features/collection/join-as-anonymous.feature
+++ b/tests/features/collection/join-as-anonymous.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: Joining a collection as an anonymous user
In order to participate in the activities of a collection
As an anonymous user
diff --git a/tests/features/collection/join-leave.feature b/tests/features/collection/join-leave.feature
index 19a69edb32..972ec6a469 100644
--- a/tests/features/collection/join-leave.feature
+++ b/tests/features/collection/join-leave.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: Joining and leaving collections through the web interface
In order to participate in the activities of a collection
As an authenticated user
diff --git a/tests/features/collection/last_update_time.feature b/tests/features/collection/last_update_time.feature
index 15dd4fe49b..c51b871a0e 100644
--- a/tests/features/collection/last_update_time.feature
+++ b/tests/features/collection/last_update_time.feature
@@ -1,4 +1,4 @@
-@api @javascript @terms @clearStaticCache @group-a
+@api @javascript @terms @clearStaticCache @group-c
Feature: Tests the collection last update time.
Scenario: As a user visiting a collection, I want to see the collection last
diff --git a/tests/features/collection/newsletter_subscription.feature b/tests/features/collection/newsletter_subscription.feature
index 19627104d9..25c2179684 100644
--- a/tests/features/collection/newsletter_subscription.feature
+++ b/tests/features/collection/newsletter_subscription.feature
@@ -1,4 +1,4 @@
-@api @terms @group-a
+@api @terms @group-c
Feature: Subscribing to collection newsletters
In order to promote my collection
As a collection owner
diff --git a/tests/features/collection/notification.collection.feature b/tests/features/collection/notification.collection.feature
index 1e12adc5ad..6e9e1a7e01 100644
--- a/tests/features/collection/notification.collection.feature
+++ b/tests/features/collection/notification.collection.feature
@@ -1,4 +1,4 @@
-@api @terms @email @group-a
+@api @terms @group-c
Feature: Notification test for the collection transitions.
In order to manage my collections
As an user that is related to the collection
@@ -63,7 +63,6 @@ Feature: Notification test for the collection transitions.
| NC to delete by mod | NC member2 | |
# Test 'create' operation.
- When all e-mails have been sent
And I am logged in as "NC user"
When I go to the propose collection form
When I fill in the following:
@@ -88,7 +87,6 @@ Feature: Notification test for the collection transitions.
And I delete the "Super Sayan Academy" contact information
# Test 'propose' operation (on an existing collection)
- When all e-mails have been sent
And I am logged in as "NC owner"
And I go to the homepage of the "NC to propose" collection
And I click "Edit" in the "Entity actions" region
@@ -100,7 +98,6 @@ Feature: Notification test for the collection transitions.
| If you think this action is not clear or not due, please contact Joinup Support at |
# Test 'request archival' operation.
- When all e-mails have been sent
And I go to the homepage of the "NC to request archival" collection
And I click "Edit" in the "Entity actions" region
And I press "Request archival"
@@ -111,7 +108,7 @@ Feature: Notification test for the collection transitions.
| If you think this action is not clear or not due, please contact Joinup Support at |
# Test deletion of a collection by the owner.
- When all e-mails have been sent
+ When I mark all emails as read
And I go to the homepage of the "NC to delete" collection
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -127,7 +124,6 @@ Feature: Notification test for the collection transitions.
| body | The collection "NC to delete", of which you are a member, has been deleted. |
# Test 'propose edit' operation.
- When all e-mails have been sent
And I am logged in as "NC facilitator"
And I go to the homepage of the "NC to propose edit" collection
And I click "Edit" in the "Entity actions" region
@@ -143,7 +139,6 @@ Feature: Notification test for the collection transitions.
| To modify your collection, please go to |
# Test the 'approve new' operation.
- When all e-mails have been sent
And I am logged in as "NC moderator"
And I go to the homepage of the "NC to validate" collection
And I click "Edit" in the "Entity actions" region
@@ -154,7 +149,6 @@ Feature: Notification test for the collection transitions.
| body | Your proposed collection "NC to validate" has been validated as per your request. |
# Test the 'approve proposed' that was proposed through the 'propose edit' operation.
- When all e-mails have been sent
And I go to the homepage of the "NC to propose edit proposed" collection
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -164,7 +158,6 @@ Feature: Notification test for the collection transitions.
| You can verify the edited version of the collection at |
# Test the 'reject archival' operation.
- When all e-mails have been sent
And I go to the homepage of the "NC to reject archival" collection
And I click "Edit" in the "Entity actions" region
# @todo: This should change into a separate transition.
@@ -178,7 +171,6 @@ Feature: Notification test for the collection transitions.
| The reason for rejection is: It will not be archived. |
# Test the 'archive' operation.
- When all e-mails have been sent
And I go to the homepage of the "NC to archive" collection
And I click "Edit" in the "Entity actions" region
And I press "Archive"
@@ -208,7 +200,7 @@ Feature: Notification test for the collection transitions.
# Test the deletion of a collection by a moderator. This should also inform
# the collection owner.
- When all e-mails have been sent
+ When I mark all emails as read
And I go to the homepage of the "NC to delete by mod" collection
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/collection/propose.feature b/tests/features/collection/propose.feature
index e1dad66491..9065f21b67 100644
--- a/tests/features/collection/propose.feature
+++ b/tests/features/collection/propose.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-e
Feature: Proposing a collection
In order to create a new collection on Joinup
As the product owner of a collection of software solutions
diff --git a/tests/features/collection/tca.feature b/tests/features/collection/tca.feature
index cdc77c048c..f70a4140bd 100644
--- a/tests/features/collection/tca.feature
+++ b/tests/features/collection/tca.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-e
Feature: Collection TCA agreement
In order to ensure activity by facilitators
As a site owner
diff --git a/tests/features/comments/add_comment.feature b/tests/features/comments/add_comment.feature
index ffa4193684..31eb2bd458 100644
--- a/tests/features/comments/add_comment.feature
+++ b/tests/features/comments/add_comment.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-e
Feature: Add comments
As a visitor of the website I can leave a comment on community content.
@@ -37,7 +37,6 @@ Feature: Add comments
| title | body | | state | author |
| | How could this ever happen? Moral panic on its way! | | | Salma Coster |
Given I am logged in as "Miss tell tales"
- And all e-mails have been sent
When I go to the content page of the type "" with the title ""
# The honeypot field that needs to be empty on submission.
Then the following fields should be present "user_homepage"
@@ -84,7 +83,6 @@ Feature: Add comments
When I am logged in as "Salma Coster"
And I click the comment link from the last email sent to "Salma Coster"
- And all e-mails have been sent
And I click "Reply"
And I should see the "Create comment" wysiwyg editor
When I enter "I am replying in user's comment." in the "Create comment" wysiwyg editor
@@ -116,7 +114,6 @@ Feature: Add comments
| title | body | collection | state |
| | How could this ever happen? Moral panic on its way! | Gossip collection | |
Given I am logged in as "Miss tell tales"
- And all e-mails have been sent
When I go to the content page of the type "" with the title ""
# Authenticated users can insert
and tags in the comment body.
And I fill in "Create comment" with "
Mr scandal was doing something weird the other day.
"
diff --git a/tests/features/comments/api.feature b/tests/features/comments/api.feature
index d9a7d7eabe..465918d97f 100644
--- a/tests/features/comments/api.feature
+++ b/tests/features/comments/api.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-e
Feature: Creating comments through the API
In order to efficiently write tests for the Joinup platform
As a backend developer
diff --git a/tests/features/comments/delete_comment.feature b/tests/features/comments/delete_comment.feature
index e36e883a5d..97080a4485 100644
--- a/tests/features/comments/delete_comment.feature
+++ b/tests/features/comments/delete_comment.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-e
Feature: Delete comments
As a visitor of the website I can leave a comment on community content.
diff --git a/tests/features/comments/edit_comment.feature b/tests/features/comments/edit_comment.feature
index 3b78a75172..adeb06b4e6 100644
--- a/tests/features/comments/edit_comment.feature
+++ b/tests/features/comments/edit_comment.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-e
Feature: Edit a comment
As a moderator of the site,
I should receive notifications when someone edits a comment.
@@ -19,7 +19,6 @@ Feature: Edit a comment
| This comment should be edited | Let's all use it | Sons of anarchy | Paying with cash |
Given I am logged in as "Sons of anarchy"
- And all e-mails have been sent
When I go to the "Paying with cash" news
# Sons' comment is the only comment available.
And I click "Edit" in comment #1
diff --git a/tests/features/communities/eif/solutions_page.feature b/tests/features/communities/eif/solutions_page.feature
index eee24219dc..765db8246d 100644
--- a/tests/features/communities/eif/solutions_page.feature
+++ b/tests/features/communities/eif/solutions_page.feature
@@ -153,6 +153,7 @@ Feature: As a user, visiting the EIF Toolbox page, I want to be able to filter
And I should see the link "Previous page"
And I should see the link "Page 1"
And I should see the link "Current page 2"
+ And I delete the "TikTok" contact information
@javascript
Scenario: Test the recommendation selector.
diff --git a/tests/features/communities/eif/vocabulary.feature b/tests/features/communities/eif/vocabulary.feature
index 8685d69985..d704eef14e 100644
--- a/tests/features/communities/eif/vocabulary.feature
+++ b/tests/features/communities/eif/vocabulary.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature:
In order to be able to have the solutions categorized properly through the EIF Toolbox
As the collection owner
diff --git a/tests/features/community_content/content_sharing.feature b/tests/features/community_content/content_sharing.feature
index 9ee77c7fb8..fb5d5bfee9 100644
--- a/tests/features/community_content/content_sharing.feature
+++ b/tests/features/community_content/content_sharing.feature
@@ -1,4 +1,4 @@
-@api @email @group-b
+@api @group-b
Feature: Sharing content between collections
As a privileged user
I want to share content between collections
diff --git a/tests/features/community_content/moderation.feature b/tests/features/community_content/moderation.feature
index cdaa812f85..982fb126dc 100644
--- a/tests/features/community_content/moderation.feature
+++ b/tests/features/community_content/moderation.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-g
Feature: Moderate community content
In order to accept or reject content that is proposed for publication or deletion
As a facilitator
diff --git a/tests/features/community_content/notification.post_moderated.discussion.feature b/tests/features/community_content/notification.post_moderated.discussion.feature
index 0c7172fca5..de0798847b 100644
--- a/tests/features/community_content/notification.post_moderated.discussion.feature
+++ b/tests/features/community_content/notification.post_moderated.discussion.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-b
Feature: Notification test for the discussion transitions on a post moderated parent.
In order to manage my collections
As an owner of the collection
@@ -29,7 +29,6 @@ Feature: Notification test for the discussion transitions on a post moderated pa
| CC notify post delete | CC member | body | CC post collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
And I am logged in as "CC member"
And I go to the "CC post collection" collection
And I click "Add discussion" in the plus button menu
@@ -43,8 +42,7 @@ Feature: Notification test for the discussion transitions on a post moderated pa
| body | CC Member has published the new discussion - "CC notify create publish" in the collection: "CC post collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC notify post publish" discussion
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -53,8 +51,7 @@ Feature: Notification test for the discussion transitions on a post moderated pa
| subject | Joinup: Content has been published |
| body | CC Member has published the new discussion - "CC notify post publish" in the collection: "CC post collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post request changes" discussion
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -66,8 +63,7 @@ Feature: Notification test for the discussion transitions on a post moderated pa
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the discussion - "CC notify post request changes" in the collection: "CC post collection", with the following motivation: "Can you do some changes?". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post report" discussion
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -79,7 +75,7 @@ Feature: Notification test for the discussion transitions on a post moderated pa
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the discussion - "CC notify post report" in the collection: "CC post collection", with the following motivation: "Your content is reported". |
- When all e-mails have been sent
+ When I mark all emails as read
And I am logged in as "CC facilitator"
And I go to the "CC notify post approve proposed" discussion
And I click "Edit" in the "Entity actions" region
@@ -91,7 +87,7 @@ Feature: Notification test for the discussion transitions on a post moderated pa
| body | the Facilitator, CC Facilitator has approved your request of publication of the discussion - "CC notify post approve proposed" in the collection: "CC post collection". |
# Test 'delete' operation.
- When all e-mails have been sent
+ When I mark all emails as read
And I am logged in as "CC facilitator"
And I go to the "CC notify post delete" discussion
And I click "Edit" in the "Entity actions" region
@@ -134,7 +130,7 @@ Feature: Notification test for the discussion transitions on a post moderated pa
| message | author | parent |
| Huge magnetic fields | Monroe Fearchar | How do the jets fire into space? |
- When all e-mails have been sent
+ When I mark all emails as read
And I am logged in as a moderator
And I go to the homepage of the "Event Horizon Telescope" collection
And I click "Edit" in the "Entity actions" region
diff --git a/tests/features/community_content/notification.post_moderated.document.feature b/tests/features/community_content/notification.post_moderated.document.feature
index 084dd200ef..71ec978ea1 100644
--- a/tests/features/community_content/notification.post_moderated.document.feature
+++ b/tests/features/community_content/notification.post_moderated.document.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-b
Feature: Notification test for the document transitions on a post moderated parent.
In order to manage my collections
As an owner of the collection
@@ -29,8 +29,7 @@ Feature: Notification test for the document transitions on a post moderated pare
| CC notify post delete | CC member | body | Document | CC collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC collection" collection
And I click "Add document" in the plus button menu
And I fill in "Title" with "CC notify create publish"
@@ -44,8 +43,7 @@ Feature: Notification test for the document transitions on a post moderated pare
| body | CC Member has published the new document - "CC notify create publish" in the collection: "CC collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC notify post publish" document
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -54,8 +52,7 @@ Feature: Notification test for the document transitions on a post moderated pare
| subject | Joinup: Content has been published |
| body | CC Member has published the new document - "CC notify post publish" in the collection: "CC collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post request changes" document
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -67,8 +64,7 @@ Feature: Notification test for the document transitions on a post moderated pare
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the document - "CC notify post request changes" in the collection: "CC collection", with the following motivation: "Can you do some changes?". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post report" document
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -80,8 +76,7 @@ Feature: Notification test for the document transitions on a post moderated pare
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the document - "CC notify post report" in the collection: "CC collection", with the following motivation: "Your content is reported". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post approve proposed" document
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -91,8 +86,7 @@ Feature: Notification test for the document transitions on a post moderated pare
| body | the Facilitator, CC Facilitator has approved your request of publication of the document - "CC notify post approve proposed" in the collection: "CC collection". |
# Test 'delete' operation.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post delete" document
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/community_content/notification.post_moderated.event.feature b/tests/features/community_content/notification.post_moderated.event.feature
index 5872569d0b..dd1ed7a45e 100644
--- a/tests/features/community_content/notification.post_moderated.event.feature
+++ b/tests/features/community_content/notification.post_moderated.event.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-b
Feature: Notification test for the event transitions on a post moderated parent.
In order to manage my collections
As an owner of the collection
@@ -29,8 +29,7 @@ Feature: Notification test for the event transitions on a post moderated parent.
| CC notify post delete | CC member | body | Lychener Strasse, Berlin | CC post collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC post collection" collection
And I click "Add event" in the plus button menu
And I fill in "Title" with "CC notify create publish"
@@ -44,8 +43,7 @@ Feature: Notification test for the event transitions on a post moderated parent.
| body | CC Member has published the new event - "CC notify create publish" in the collection: "CC post collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC notify post publish" event
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -54,8 +52,7 @@ Feature: Notification test for the event transitions on a post moderated parent.
| subject | Joinup: Content has been published |
| body | CC Member has published the new event - "CC notify post publish" in the collection: "CC post collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post request changes" event
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -67,8 +64,7 @@ Feature: Notification test for the event transitions on a post moderated parent.
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the event - "CC notify post request changes" in the collection: "CC post collection", with the following motivation: "Can you do some changes?". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post report" event
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -80,8 +76,7 @@ Feature: Notification test for the event transitions on a post moderated parent.
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the event - "CC notify post report" in the collection: "CC post collection", with the following motivation: "Your content is reported". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post approve proposed" event
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -91,8 +86,7 @@ Feature: Notification test for the event transitions on a post moderated parent.
| body | the Facilitator, CC Facilitator has approved your request of publication of the event - "CC notify post approve proposed" in the collection: "CC post collection". |
# Test 'delete' operation.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify post delete" event
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/community_content/notification.post_moderated.news.feature b/tests/features/community_content/notification.post_moderated.news.feature
index a6c2d09614..c47a3c898e 100644
--- a/tests/features/community_content/notification.post_moderated.news.feature
+++ b/tests/features/community_content/notification.post_moderated.news.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-b
Feature: Notification test for the news transitions on a post moderated parent.
In order to manage my collections
As an owner of the collection
@@ -29,8 +29,7 @@ Feature: Notification test for the news transitions on a post moderated parent.
| CCN post delete | CC member | body | CCN post delete | CC post collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC post collection" collection
And I click "Add news" in the plus button menu
And I fill in "Short title" with "CCN create publish"
@@ -44,8 +43,7 @@ Feature: Notification test for the news transitions on a post moderated parent.
| body | CC Member has published the new news - "CCN create publish" in the collection: "CC post collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CCN post publish" news
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -54,8 +52,7 @@ Feature: Notification test for the news transitions on a post moderated parent.
| subject | Joinup: Content has been published |
| body | CC Member has published the new news - "CCN post publish" in the collection: "CC post collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN post request changes" news
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -67,8 +64,7 @@ Feature: Notification test for the news transitions on a post moderated parent.
| the Facilitator, CC Facilitator has requested you to modify the news - "CCN post request changes" in the collection: "CC post collection", with the following motivation: "Can you do some changes?". |
| If you think this action is not clear or not due, please contact Joinup Support at |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN post report" news
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -80,8 +76,7 @@ Feature: Notification test for the news transitions on a post moderated parent.
| the Facilitator, CC Facilitator has requested you to modify the news - "CCN post report" in the collection: "CC post collection", with the following motivation: "Your content is reported". |
| If you think this action is not clear or not due, please contact Joinup Support at |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN post approve proposed" news
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -91,8 +86,7 @@ Feature: Notification test for the news transitions on a post moderated parent.
| body | the Facilitator, CC Facilitator has approved your request of publication of the news - "CCN post approve proposed" in the collection: "CC post collection". |
# Test 'delete' operation.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN post delete" news
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/community_content/notification.pre_moderated.discussion.feature b/tests/features/community_content/notification.pre_moderated.discussion.feature
index 8aeca04fc5..6ee3de3cdb 100644
--- a/tests/features/community_content/notification.pre_moderated.discussion.feature
+++ b/tests/features/community_content/notification.pre_moderated.discussion.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-b
Feature: Notification test for the discussion transitions on a pre moderated parent.
In order to manage my collections
As an owner of the collection
@@ -36,8 +36,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| CC notify validated to revise | CC member | body | CC pre collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC pre collection" collection
And I click "Add discussion" in the plus button menu
And I fill in "Title" with "CC notify create propose"
@@ -49,8 +48,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted a new discussion - "CC notify create propose" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC pre collection" collection
And I click "Add discussion" in the plus button menu
And I fill in "Title" with "CC notify create publish"
@@ -63,8 +61,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| body | CC Facilitator has published the new discussion - "CC notify create publish" in the collection: "CC pre collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC notify pre propose" discussion
And I click "Edit" in the "Entity actions" region
And I press "Propose"
@@ -73,8 +70,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted a new discussion - "CC notify pre propose" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I go to the "CC notify pre propose from reported" discussion
+ When I go to the "CC notify pre propose from reported" discussion
And I click "Edit" in the "Entity actions" region
And I press "Propose"
Then the following email should have been sent:
@@ -82,8 +78,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been updated |
| body | CC Member has updated the content of the discussion - "CC notify pre propose from reported" as advised and requests again its publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I go to the "CC notify pre request deletion" discussion
+ When I go to the "CC notify pre request deletion" discussion
And I click "Edit" in the "Entity actions" region
And I press "Request deletion"
Then I should see the error message "This action requires you to fill in the motivation field"
@@ -94,8 +89,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been updated |
| body | CC Member has requested to delete the discussion - "CC notify pre request deletion" in the collection: "CC pre collection", with the following motivation: "I just want to delete it.". |
- When all e-mails have been sent
- And I go to the "CC notify validated to revise" discussion
+ When I go to the "CC notify validated to revise" discussion
And I click "Edit" in the "Entity actions" region
And I press "Propose changes"
Then the following email should have been sent:
@@ -103,8 +97,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted an update of the discussion - "CC notify validated to revise" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre publish" discussion
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -113,8 +106,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been published |
| body | CC Facilitator has published the new discussion - "CC notify pre publish" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre request changes" discussion
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -130,8 +122,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been proposed |
| body | CC Facilitator has submitted an update of the discussion - "CC notify pre request changes" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre report" discussion
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -143,8 +134,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the discussion - "CC notify pre report" in the collection: "CC pre collection", with the following motivation: "Your content is reported". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre approve proposed" discussion
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -153,8 +143,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has approved your request of publication of the discussion - "CC notify pre approve proposed" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre reject deletion" discussion
And I click "Edit" in the "Entity actions" region
And I press "Reject deletion"
@@ -167,8 +156,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| body | the Facilitator, CC Facilitator has not approved your request to delete the discussion - "CC notify pre reject deletion" in the collection: "CC pre collection", with the following motivation: "I still like it". |
# Test 'delete' operation on an entity in 'deletion_request' state.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre delete" discussion
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -178,8 +166,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| subject | Joinup: The discussion "CC notify pre delete" was deleted in the space of "CC pre collection" |
| body | for your information, the discussion "CC notify pre delete" was deleted from the "CC pre collection" collection. |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre request deletion" discussion
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -190,8 +177,7 @@ Feature: Notification test for the discussion transitions on a pre moderated par
| body | for your information, the discussion "CC notify pre request deletion" was deleted from the "CC pre collection" collection. |
# Test 'delete' operation on an entity in 'validated' state.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify validated to delete" discussion
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/community_content/notification.pre_moderated.document.feature b/tests/features/community_content/notification.pre_moderated.document.feature
index ca519bf20b..f16b06a47f 100644
--- a/tests/features/community_content/notification.pre_moderated.document.feature
+++ b/tests/features/community_content/notification.pre_moderated.document.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-b
Feature: Notification test for the document transitions on a pre moderated parent.
In order to manage my collections
As an owner of the collection
@@ -36,8 +36,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| CC notify validated to revise | CC member | body | Document | CC pre collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC pre collection" collection
And I click "Add document" in the plus button menu
And I fill in "Title" with "CC notify create propose"
@@ -50,8 +49,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted a new document - "CC notify create propose" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC pre collection" collection
And I click "Add document" in the plus button menu
And I fill in "Title" with "CC notify create publish"
@@ -65,8 +63,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| body | CC Facilitator has published the new document - "CC notify create publish" in the collection: "CC pre collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC notify pre propose" document
And I click "Edit" in the "Entity actions" region
And I press "Propose"
@@ -75,8 +72,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted a new document - "CC notify pre propose" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I go to the "CC notify pre propose from reported" document
+ When I go to the "CC notify pre propose from reported" document
And I click "Edit" in the "Entity actions" region
And I press "Propose"
Then the following email should have been sent:
@@ -84,8 +80,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been updated |
| body | CC Member has updated the content of the document - "CC notify pre propose from reported" as advised and requests again its publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I go to the "CC notify pre request deletion" document
+ When I go to the "CC notify pre request deletion" document
And I click "Edit" in the "Entity actions" region
And I press "Request deletion"
Then I should see the error message "This action requires you to fill in the motivation field"
@@ -96,8 +91,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been updated |
| body | CC Member has requested to delete the document - "CC notify pre request deletion" in the collection: "CC pre collection", with the following motivation: "I just want to delete it.". |
- When all e-mails have been sent
- And I go to the "CC notify validated to revise" document
+ When I go to the "CC notify validated to revise" document
And I click "Edit" in the "Entity actions" region
And I press "Propose changes"
Then the following email should have been sent:
@@ -105,8 +99,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted an update of the document - "CC notify validated to revise" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre publish" document
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -115,8 +108,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been published |
| body | CC Facilitator has published the new document - "CC notify pre publish" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre request changes" document
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -132,8 +124,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been proposed |
| body | CC Facilitator has submitted an update of the document - "CC notify pre request changes" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre report" document
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -145,8 +136,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the document - "CC notify pre report" in the collection: "CC pre collection", with the following motivation: "Your content is reported". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre approve proposed" document
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -155,8 +145,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has approved your request of publication of the document - "CC notify pre approve proposed" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre reject deletion" document
And I click "Edit" in the "Entity actions" region
And I press "Reject deletion"
@@ -169,8 +158,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| body | the Facilitator, CC Facilitator has not approved your request to delete the document - "CC notify pre reject deletion" in the collection: "CC pre collection", with the following motivation: "I still like it". |
# Test 'delete' operation on an entity in 'deletion_request' state.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre delete" document
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -180,8 +168,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| subject | Joinup: Content has been deleted |
| body | Facilitator CC Facilitator has approved your request of deletion for the document - "CC notify pre delete" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre request deletion" document
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -192,8 +179,7 @@ Feature: Notification test for the document transitions on a pre moderated paren
| body | Facilitator CC Facilitator has approved your request of deletion for the document - "CC notify pre request deletion" in the collection: "CC pre collection". |
# Test 'delete' operation on an entity in 'validated' state.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify validated to delete" document
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/community_content/notification.pre_moderated.event.feature b/tests/features/community_content/notification.pre_moderated.event.feature
index a6732780d4..03d1c0619f 100644
--- a/tests/features/community_content/notification.pre_moderated.event.feature
+++ b/tests/features/community_content/notification.pre_moderated.event.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-b
Feature: Notification test for the event transitions on a pre moderated parent.
In order to manage my collections
As an owner of the collection
@@ -36,8 +36,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| CC notify validated to revise | CC member | body | Malcolm X Boulevard, New York | CC pre collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC pre collection" collection
And I click "Add event" in the plus button menu
And I fill in "Title" with "CC notify create propose"
@@ -50,8 +49,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted a new event - "CC notify create propose" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC pre collection" collection
And I click "Add event" in the plus button menu
And I fill in "Title" with "CC notify create publish"
@@ -65,8 +63,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| body | CC Facilitator has published the new event - "CC notify create publish" in the collection: "CC pre collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC notify pre propose" event
And I click "Edit" in the "Entity actions" region
And I press "Propose"
@@ -75,8 +72,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted a new event - "CC notify pre propose" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I go to the "CC notify pre propose from reported" event
+ When I go to the "CC notify pre propose from reported" event
And I click "Edit" in the "Entity actions" region
And I press "Propose"
Then the following email should have been sent:
@@ -84,8 +80,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been updated |
| body | CC Member has updated the content of the event - "CC notify pre propose from reported" as advised and requests again its publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I go to the "CC notify pre request deletion" event
+ When I go to the "CC notify pre request deletion" event
And I click "Edit" in the "Entity actions" region
And I press "Request deletion"
Then I should see the error message "This action requires you to fill in the motivation field"
@@ -96,8 +91,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been updated |
| body | CC Member has requested to delete the event - "CC notify pre request deletion" in the collection: "CC pre collection", with the following motivation: "I just want to delete it.". |
- When all e-mails have been sent
- And I go to the "CC notify validated to revise" event
+ When I go to the "CC notify validated to revise" event
And I click "Edit" in the "Entity actions" region
And I press "Propose changes"
Then the following email should have been sent:
@@ -105,8 +99,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted an update of the event - "CC notify validated to revise" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre publish" event
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -115,8 +108,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been published |
| body | CC Facilitator has published the new event - "CC notify pre publish" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre request changes" event
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -132,8 +124,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been proposed |
| body | CC Facilitator has submitted an update of the event - "CC notify pre request changes" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre report" event
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -145,8 +136,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has requested you to modify the event - "CC notify pre report" in the collection: "CC pre collection", with the following motivation: "Your content is reported". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre approve proposed" event
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -155,8 +145,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has approved your request of publication of the event - "CC notify pre approve proposed" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre reject deletion" event
And I click "Edit" in the "Entity actions" region
And I press "Reject deletion"
@@ -169,8 +158,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| body | the Facilitator, CC Facilitator has not approved your request to delete the event - "CC notify pre reject deletion" in the collection: "CC pre collection", with the following motivation: "I still like it". |
# Test 'delete' operation on an entity in 'deletion_request' state.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre delete" event
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -180,8 +168,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| subject | Joinup: Content has been deleted |
| body | Facilitator CC Facilitator has approved your request of deletion for the event - "CC notify pre delete" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify pre request deletion" event
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -192,8 +179,7 @@ Feature: Notification test for the event transitions on a pre moderated parent.
| body | Facilitator CC Facilitator has approved your request of deletion for the event - "CC notify pre request deletion" in the collection: "CC pre collection". |
# Test 'delete' operation on an entity in 'validated' state.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC notify validated to delete" event
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/community_content/notification.pre_moderated.news.feature b/tests/features/community_content/notification.pre_moderated.news.feature
index d9b956819d..4a164da11a 100644
--- a/tests/features/community_content/notification.pre_moderated.news.feature
+++ b/tests/features/community_content/notification.pre_moderated.news.feature
@@ -1,4 +1,4 @@
-@api @email @terms @group-b
+@api @terms @group-g
Feature: Notification test for the news transitions on a pre moderated parent.
In order to manage my collections
As an owner of the collection
@@ -36,8 +36,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| CCN validated to revise | CC member | body | CCN pre revise | CC pre collection | validated |
# Test 'create' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CC pre collection" collection
And I click "Add news" in the plus button menu
And I fill in "Short title" with "CCN create propose"
@@ -59,7 +58,6 @@ Feature: Notification test for the news transitions on a pre moderated parent.
And I go to the "CCN create propose" news
And I click "Edit" in the "Entity actions" region
And I press "Save new draft"
- When all e-mails have been sent
And I click "Edit" in the "Entity actions" region
And I press "Propose"
Then the following email should have been sent:
@@ -71,8 +69,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| CC Member has submitted an update of the news - "CCN create propose" for publication in the collection: "CC pre collection". |
| If you think this action is not clear or not due, please contact Joinup Support at |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CC pre collection" collection
And I click "Add news" in the plus button menu
And I fill in "Short title" with "CCN create publish"
@@ -86,8 +83,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| body | CC Facilitator has published the new news - "CCN create publish" in the collection: "CC pre collection".You can access the new content at the following link: http |
# Test 'update' operation.
- When all e-mails have been sent
- And I am logged in as "CC member"
+ When I am logged in as "CC member"
And I go to the "CCN pre propose" news
And I click "Edit" in the "Entity actions" region
And I press "Propose"
@@ -96,8 +92,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| CC Member has submitted a new news - "CCN pre propose" for publication in the collection: "CC pre collection". |
| If you think this action is not clear or not due, please contact Joinup Support at |
- When all e-mails have been sent
- And I go to the "CCN pre propose from reported" news
+ When I go to the "CCN pre propose from reported" news
And I click "Edit" in the "Entity actions" region
And I press "Propose"
Then the email sent to "CC owner" with subject "Joinup: Content has been updated" contains the following lines of text:
@@ -105,8 +100,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| CC Member has updated the content of the news - "CCN pre propose from reported" as advised and requests again its publication in the collection: "CC pre collection". |
| If you think this action is not clear or not due, please contact Joinup Support at |
- When all e-mails have been sent
- And I go to the "CCN pre request deletion" news
+ When I go to the "CCN pre request deletion" news
And I click "Edit" in the "Entity actions" region
And I press "Request deletion"
Then I should see the error message "This action requires you to fill in the motivation field"
@@ -117,8 +111,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| CC Member has requested to delete the news - "CCN pre request deletion" in the collection: "CC pre collection", with the following motivation: "I just want to delete it.". |
| If you think this action is not clear or not due, please contact Joinup Support at |
- When all e-mails have been sent
- And I go to the "CCN validated to revise" news
+ When I go to the "CCN validated to revise" news
And I click "Edit" in the "Entity actions" region
And I press "Propose changes"
Then the following email should have been sent:
@@ -126,8 +119,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| subject | Joinup: Content has been proposed |
| body | CC Member has submitted an update of the news - "CCN validated to revise" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN pre publish" news
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -136,8 +128,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| subject | Joinup: Content has been published |
| body | CC Facilitator has published the new news - "CCN pre publish" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN pre request changes" news
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
@@ -153,8 +144,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| subject | Joinup: Content has been proposed |
| body | CC Facilitator has submitted an update of the news - "CCN pre request changes" for publication in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN pre report" news
And I click "Edit" in the "Entity actions" region
And I press "Report"
@@ -166,8 +156,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| the Facilitator, CC Facilitator has requested you to modify the news - "CCN pre report" in the collection: "CC pre collection", with the following motivation: "Your content is reported". |
| If you think this action is not clear or not due, please contact Joinup Support at |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN pre approve proposed" news
And I click "Edit" in the "Entity actions" region
And I press "Publish"
@@ -176,8 +165,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| subject | Joinup: Content has been updated |
| body | the Facilitator, CC Facilitator has approved your request of publication of the news - "CCN pre approve proposed" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN pre reject deletion" news
And I click "Edit" in the "Entity actions" region
And I press "Reject deletion"
@@ -190,8 +178,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| body | the Facilitator, CC Facilitator has not approved your request to delete the news - "CCN pre reject deletion" in the collection: "CC pre collection", with the following motivation: "I still like it". |
# Test 'delete' operation.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN pre delete" news
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -201,8 +188,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| subject | Joinup: Content has been deleted |
| body | Facilitator CC Facilitator has approved your request of deletion for the news - "CCN pre delete" in the collection: "CC pre collection". |
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN pre request deletion" news
And I click "Edit" in the "Entity actions" region
And I click "Delete"
@@ -213,8 +199,7 @@ Feature: Notification test for the news transitions on a pre moderated parent.
| body | Facilitator CC Facilitator has approved your request of deletion for the news - "CCN pre request deletion" in the collection: "CC pre collection". |
# Test 'delete' operation for a validated entity.
- When all e-mails have been sent
- And I am logged in as "CC facilitator"
+ When I am logged in as "CC facilitator"
And I go to the "CCN validated to delete" news
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/community_content/revisions.feature b/tests/features/community_content/revisions.feature
index d7c7298623..9aba815d98 100644
--- a/tests/features/community_content/revisions.feature
+++ b/tests/features/community_content/revisions.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature:
In order to see how content evolved over time
As a content author or facilitator
diff --git a/tests/features/contact_form/prefill.feature b/tests/features/contact_form/prefill.feature
index 608d7bb614..e0218ba3d1 100644
--- a/tests/features/contact_form/prefill.feature
+++ b/tests/features/contact_form/prefill.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-g
Feature: Prefill contact form fields
In order to simplify the gathering of feedback from the users
As a moderator
@@ -17,8 +17,8 @@ Feature: Prefill contact form fields
# Create a page with a link that points to the contact form with the "subject" parameter containing some text.
When I fill in the following:
- | Title | Change management |
- | Body |
|
And I press "Save"
Then I should see the heading "Change management"
diff --git a/tests/features/contact_form/report.feature b/tests/features/contact_form/report.feature
index 429ce42d71..e949ea1fab 100644
--- a/tests/features/contact_form/report.feature
+++ b/tests/features/contact_form/report.feature
@@ -4,7 +4,6 @@ Feature: Submit the contact form
As a moderator, group administrator or content owner
I need to receive email when the content is reported
- @email
Scenario: Receive email when content is reported
Given users:
| Username | Roles | E-mail | First name | Family name |
diff --git a/tests/features/contact_form/submit_contact_form.feature b/tests/features/contact_form/submit_contact_form.feature
index 26bcfad700..224771f697 100644
--- a/tests/features/contact_form/submit_contact_form.feature
+++ b/tests/features/contact_form/submit_contact_form.feature
@@ -1,10 +1,10 @@
-@api @group-b
+@api @group-f
Feature: Submit the contact form
In order to gather feedback from the users
As a moderator
I want to collect wishes and grievances through a contact form
- @email @uploadFiles:logo.png
+ @uploadFiles:logo.png
Scenario: Submit a message as an anonymous user
Given users:
| Username | Roles |
diff --git a/tests/features/contact_information/access.feature b/tests/features/contact_information/access.feature
index 744113009f..1f9bacbc4c 100644
--- a/tests/features/contact_information/access.feature
+++ b/tests/features/contact_information/access.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature: Contact information access
In order to see contextualized information
As a visitor
diff --git a/tests/features/contact_information/add_contact_information.feature b/tests/features/contact_information/add_contact_information.feature
index 0561b13355..9b343c7b7e 100644
--- a/tests/features/contact_information/add_contact_information.feature
+++ b/tests/features/contact_information/add_contact_information.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-g
Feature: Creation of contact information
In order to add contact information
As a facilitator
diff --git a/tests/features/contact_information/api.feature b/tests/features/contact_information/api.feature
index f6eff11399..ebc752566b 100644
--- a/tests/features/contact_information/api.feature
+++ b/tests/features/contact_information/api.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-g
Feature: Contact information API
In order to manage contact information programmatically
As a backend developer
diff --git a/tests/features/contact_information/contact_information.moderation.feature b/tests/features/contact_information/contact_information.moderation.feature
index dd96070430..8bd7d26c87 100644
--- a/tests/features/contact_information/contact_information.moderation.feature
+++ b/tests/features/contact_information/contact_information.moderation.feature
@@ -1,4 +1,4 @@
-@api @terms @group-b
+@api @terms @group-f
Feature: Contact Information moderation
In order to manage contact information
As a facilitator or moderator
diff --git a/tests/features/content_overview.feature b/tests/features/content_overview.feature
index 8aba9e2bf1..594b2c57f3 100644
--- a/tests/features/content_overview.feature
+++ b/tests/features/content_overview.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-d
Feature: Content Overview
@terms
diff --git a/tests/features/custom_page/add_custom_page.feature b/tests/features/custom_page/add_custom_page.feature
index 5448ea5a55..1ada318df9 100644
--- a/tests/features/custom_page/add_custom_page.feature
+++ b/tests/features/custom_page/add_custom_page.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature: "Add custom page" visibility options.
In order to manage custom pages
As a group facilitator
diff --git a/tests/features/custom_page/api.feature b/tests/features/custom_page/api.feature
index 1f413d1bf8..14e073caea 100644
--- a/tests/features/custom_page/api.feature
+++ b/tests/features/custom_page/api.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature: Custom page API
In order to manage custom pages programmatically
As a backend developer
diff --git a/tests/features/custom_page/community_content.view_mode.feature b/tests/features/custom_page/community_content.view_mode.feature
index 170ec58e55..f49ddf37b4 100644
--- a/tests/features/custom_page/community_content.view_mode.feature
+++ b/tests/features/custom_page/community_content.view_mode.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-g
Feature:
In order to have better presentation of my content
as a user of the website
diff --git a/tests/features/custom_page/community_content_listing.feature b/tests/features/custom_page/community_content_listing.feature
index 52646171cb..72088e3ab0 100644
--- a/tests/features/custom_page/community_content_listing.feature
+++ b/tests/features/custom_page/community_content_listing.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature:
In order to make it easy to browse to specific content
As a moderator
diff --git a/tests/features/custom_page/custom_page.delete.feature b/tests/features/custom_page/custom_page.delete.feature
index 31cda93ece..77bc16a49f 100644
--- a/tests/features/custom_page/custom_page.delete.feature
+++ b/tests/features/custom_page/custom_page.delete.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature: "Custom page" deleteing.
In order to manage custom pages
As a moderator or group facilitator
diff --git a/tests/features/custom_page/custom_page.edit.feature b/tests/features/custom_page/custom_page.edit.feature
index 3e6669c9d2..6fabe0fa30 100644
--- a/tests/features/custom_page/custom_page.edit.feature
+++ b/tests/features/custom_page/custom_page.edit.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature: "Custom page" editing.
In order to manage custom pages
As a moderator or group facilitator
diff --git a/tests/features/custom_page/custom_page.view.feature b/tests/features/custom_page/custom_page.view.feature
index f77517954f..1f83ca3db2 100644
--- a/tests/features/custom_page/custom_page.view.feature
+++ b/tests/features/custom_page/custom_page.view.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature:
As a privileged user
I want to create custom pages inside unpublished collections or solutions
diff --git a/tests/features/custom_page/navigation_menu.feature b/tests/features/custom_page/navigation_menu.feature
index a2a7158d20..310ff04670 100644
--- a/tests/features/custom_page/navigation_menu.feature
+++ b/tests/features/custom_page/navigation_menu.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-a
Feature: Navigation menu for custom pages
In order to determine the order and visibility of custom pages in the navigation menu
As a facilitator
diff --git a/tests/features/custom_page/search.feature b/tests/features/custom_page/search.feature
index b913a7a7e9..d648342b28 100644
--- a/tests/features/custom_page/search.feature
+++ b/tests/features/custom_page/search.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature: Custom pages enhance search results for their collections/solutions
In order to increase the chances of my group to be found
As a facilitator
diff --git a/tests/features/dashboard.feature b/tests/features/dashboard.feature
index ba878987a8..c2eb7c6ec7 100644
--- a/tests/features/dashboard.feature
+++ b/tests/features/dashboard.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-d
Feature: Dashboard
In order to see an overview of my related information at a glance
As an authenticated user
diff --git a/tests/features/error.feature b/tests/features/error.feature
index 646981c54e..a32902ca14 100644
--- a/tests/features/error.feature
+++ b/tests/features/error.feature
@@ -1,4 +1,4 @@
-@api @errorPage @group-a
+@wip @api @errorPage @group-c
Feature: On errors I want to see a friendly page and be able to report an
incident number/code.
diff --git a/tests/features/eulogin/eulogin.feature b/tests/features/eulogin/eulogin.feature
index 6928f69f88..0fe97159f4 100644
--- a/tests/features/eulogin/eulogin.feature
+++ b/tests/features/eulogin/eulogin.feature
@@ -1,4 +1,4 @@
-@api @casMockServer @group-b
+@api @casMockServer @group-a
Feature: Log in through EU Login
In order to access all website of the European Commission with the same credentials
As a user with an existing EU Login account
@@ -207,7 +207,6 @@ Feature: Log in through EU Login
When I go to "/user/password"
Then I should get an access denied error
- @email
Scenario: An existing local user wants to link their EU Login account but forgot their Drupal password.
Given CAS users:
| Username | E-mail | Password | First name | Last name |
diff --git a/tests/features/featured_entities.feature b/tests/features/featured_entities.feature
index fa5001388d..6ab044d843 100644
--- a/tests/features/featured_entities.feature
+++ b/tests/features/featured_entities.feature
@@ -1,4 +1,4 @@
-@api @email @javascript @group-a
+@api @javascript @group-c
Feature: Featuring content site-wide
As a moderator of Joinup
I want to feature content in the website
diff --git a/tests/features/file_url/widget-ui.feature b/tests/features/file_url/widget-ui.feature
index 85ebaf389d..ec51d8cca4 100644
--- a/tests/features/file_url/widget-ui.feature
+++ b/tests/features/file_url/widget-ui.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature: User interface for the File URL field
In order to be able to upload files or refer to external files
As an authenticated user
diff --git a/tests/features/glossary/glossary.feature b/tests/features/glossary/glossary.feature
index 25d90855e9..15f8d92dc7 100644
--- a/tests/features/glossary/glossary.feature
+++ b/tests/features/glossary/glossary.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-g
Feature: As a moderator or group facilitator I want to be able to add, edit and
delete glossary terms. As a user I want to be able to see glossary terms as
links to their definition page.
@@ -149,10 +149,10 @@ Feature: As a moderator or group facilitator I want to be able to add, edit and
Scenario: Glossary terms should be shown as links in collection content
Given collection:
- | title | Collection With Glossary |
- | state | validated |
- | description | Colors of Paradise. Abbreviated as CLR. Colors of Dream |
- | abstract | The Alphabet is back and it's s/ashy. |
+ | title | Collection With Glossary |
+ | state | validated |
+ | description | Colors of Paradise. Abbreviated as CLR. Colors of Dream |
+ | abstract | The Alphabet is back and it's s/ashy. |
And solution:
| title | Under The Bridge |
| description | No Colors |
@@ -306,8 +306,8 @@ Feature: As a moderator or group facilitator I want to be able to add, edit and
And I should see the link "Battle"
And I should see the link "Evermore"
And I should see the link "battle again"
- And the response should contain "Battle"
- And the response should contain "battle again"
+ And the response should contain "/collection/collection-glossary/glossary/term/battle\" class=\"glossary-term\" title=\"def\">Battle"
+ And the response should contain "/collection/collection-glossary/glossary/term/battle-again\" class=\"glossary-term\" title=\"Not to be confused with a battle of sheep\">battle again"
But I should not see the link "batTle"
And I should not see the link "BATTLE"
And I should not see the link "everMore"
diff --git a/tests/features/homepage.feature b/tests/features/homepage.feature
index 89866e4575..b3589eb593 100644
--- a/tests/features/homepage.feature
+++ b/tests/features/homepage.feature
@@ -160,13 +160,12 @@ Feature: Homepage
Given the Joinup version is set to ""
When I am on the homepage
Then I should see the link "" in the Footer region
- When I click ""
- Then the url should match ""
+ And the "" link should point to ""
Examples:
- | version | url |
- | v1.57.0 | /ec-europa/joinup-dev/releases/tag/v1.57.0 |
- | v1.57.0-177-g0123456abcdef | /ec-europa/joinup-dev/commit/0123456abcdef |
+ | version | url |
+ | v1.57.0 | https://git.fpfis.eu/digit/digit-joinup-reference/-/tags/v1.57.0 |
+ | v1.57.0-177-g0123456abcdef | https://git.fpfis.eu/digit/digit-joinup-dev/-/commit/0123456abcdef |
Scenario: Search box is shown in the main content
Given collection:
diff --git a/tests/features/isa2_analytics/site_search.feature b/tests/features/isa2_analytics/site_search.feature
index 1b6cdde69e..b0a838ebd9 100644
--- a/tests/features/isa2_analytics/site_search.feature
+++ b/tests/features/isa2_analytics/site_search.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature: Site search
As an analytics engineer
I want search statistics grouped by the keyword
diff --git a/tests/features/isa2_analytics/site_sections.feature b/tests/features/isa2_analytics/site_sections.feature
index d81652905c..575e2abeea 100644
--- a/tests/features/isa2_analytics/site_sections.feature
+++ b/tests/features/isa2_analytics/site_sections.feature
@@ -1,4 +1,4 @@
-@api @terms @group-b
+@api @terms
Feature: Site sections
As an analytics engineer
I want visitor statistics to be grouped in sections
diff --git a/tests/features/joinup_collection/membership.feature b/tests/features/joinup_collection/membership.feature
index 0c1f851899..e24ab5129c 100644
--- a/tests/features/joinup_collection/membership.feature
+++ b/tests/features/joinup_collection/membership.feature
@@ -1,4 +1,4 @@
-@api @joinup_collection @group-b
+@api @joinup_collection
Feature: Tests membership to Joinup collection.
Background:
diff --git a/tests/features/joinup_core/contextual_links.feature b/tests/features/joinup_core/contextual_links.feature
index 03d99d3fae..6e37141a49 100644
--- a/tests/features/joinup_core/contextual_links.feature
+++ b/tests/features/joinup_core/contextual_links.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-e
Feature:
As a moderator of the website
in order to better manage all content
diff --git a/tests/features/joinup_core/input_filter.feature b/tests/features/joinup_core/input_filter.feature
index 5b90ed595e..f8f3d3217f 100644
--- a/tests/features/joinup_core/input_filter.feature
+++ b/tests/features/joinup_core/input_filter.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-e
Feature: Input filter
In order to maintain security
As a user
diff --git a/tests/features/joinup_core/manage_content.feature b/tests/features/joinup_core/manage_content.feature
index fa08679ed3..1dec69abfa 100644
--- a/tests/features/joinup_core/manage_content.feature
+++ b/tests/features/joinup_core/manage_content.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-e
Feature:
As a moderator
In order to better organize the content
diff --git a/tests/features/joinup_core/owner_deletion.feature b/tests/features/joinup_core/owner_deletion.feature
index efbc36c9af..c0d294f7b6 100644
--- a/tests/features/joinup_core/owner_deletion.feature
+++ b/tests/features/joinup_core/owner_deletion.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Deletion of collection and solution owners
As a site owner
In order to avoid my groups becoming orphaned
diff --git a/tests/features/joinup_core/page_access.feature b/tests/features/joinup_core/page_access.feature
index 42e94ab23f..b892a06ba8 100644
--- a/tests/features/joinup_core/page_access.feature
+++ b/tests/features/joinup_core/page_access.feature
@@ -1,4 +1,4 @@
-@group-b
+@group-d
Feature:
As an owner of a website
When I visit non existing pages
diff --git a/tests/features/joinup_core/page_destination.feature b/tests/features/joinup_core/page_destination.feature
index 68fdbe3149..e0a79c27e6 100644
--- a/tests/features/joinup_core/page_destination.feature
+++ b/tests/features/joinup_core/page_destination.feature
@@ -1,4 +1,4 @@
-@api @javascript @casMockServer @group-b
+@api @casMockServer @group-c
Feature:
As a user of the website
When I try to login
@@ -32,7 +32,7 @@ Feature:
And the relative url should be "/search?keys=how%20to%20redirect"
Scenario: Only the destination parameter should be carried over if one exists outside the user pages.
- When I am on "/search?keys=how+to+redirect&destination=/contact"
+ When I am on "/search?keys=how+to+redirect&destination=contact"
And I click "Sign in" in the "Navigation bar"
And I fill in "E-mail address" with "mr.redirect@example.com"
And I fill in "Password" with "Mr Redirect"
diff --git a/tests/features/joinup_core/pathauto.feature b/tests/features/joinup_core/pathauto.feature
index bd67935489..9faaadac62 100644
--- a/tests/features/joinup_core/pathauto.feature
+++ b/tests/features/joinup_core/pathauto.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-c
Feature:
As an owner of a website
In order to provide the visitors with user friendly urls
diff --git a/tests/features/joinup_core/persistent_uris.feature b/tests/features/joinup_core/persistent_uris.feature
index 8384eca5c4..b1d94c594f 100644
--- a/tests/features/joinup_core/persistent_uris.feature
+++ b/tests/features/joinup_core/persistent_uris.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-c
Feature:
As an owner of a website
In order to guarantee data persistence
diff --git a/tests/features/joinup_core/plusbutton.feature b/tests/features/joinup_core/plusbutton.feature
index bd210e45b1..162ad06eaf 100644
--- a/tests/features/joinup_core/plusbutton.feature
+++ b/tests/features/joinup_core/plusbutton.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-e
Feature: Plus button
In order be able to create content
As a user of the website
diff --git a/tests/features/joinup_core/reporting.feature b/tests/features/joinup_core/reporting.feature
index 30a2366278..8ffde7a62e 100644
--- a/tests/features/joinup_core/reporting.feature
+++ b/tests/features/joinup_core/reporting.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-e
Feature:
As a site moderator/administrator
When I'm logged in
diff --git a/tests/features/joinup_core/social_share.feature b/tests/features/joinup_core/social_share.feature
index d55f3f4e24..a3f588de13 100644
--- a/tests/features/joinup_core/social_share.feature
+++ b/tests/features/joinup_core/social_share.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-e
Feature: Sharing content on social networks
As a user of the platform
I want to share content in my social networks
@@ -39,8 +39,7 @@ Feature: Sharing content on social networks
| Important solution | Social networks | validated |
When I am logged in as a user with the "authenticated" role
- And I am on the homepage
- And I click "More solutions"
+ And I go to "/solutions"
And I click the contextual link "Share" in the "Important solution" tile
And I should see the link "Facebook"
diff --git a/tests/features/joinup_core/transfer_group_ownership.feature b/tests/features/joinup_core/transfer_group_ownership.feature
index eb6e92d211..f8f1dd3b23 100644
--- a/tests/features/joinup_core/transfer_group_ownership.feature
+++ b/tests/features/joinup_core/transfer_group_ownership.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-e
Feature: As a group (collection or solution) owner or site moderator
In order to manage my group
I should be able to transfer the group ownership.
@@ -31,7 +31,6 @@ Feature: As a group (collection or solution) owner or site moderator
| Learn German in 1 Month | shy | facilitator |
| Learn German in 1 Month | frozen | owner |
- @email
Scenario Outline: Administrators, moderators and owners can transfer the group ownership.
Given I am logged in as ""
And I am on the members page of ""
diff --git a/tests/features/joinup_core/unpublished_entities.feature b/tests/features/joinup_core/unpublished_entities.feature
index de1b2db82d..adb124845c 100644
--- a/tests/features/joinup_core/unpublished_entities.feature
+++ b/tests/features/joinup_core/unpublished_entities.feature
@@ -1,4 +1,4 @@
-@api @terms @group-b
+@api @terms @group-d
Feature: Unpublished content of the website
In order to manage unpublished entities
As a user of the website
diff --git a/tests/features/joinup_discussion/add_discussion.collection.feature b/tests/features/joinup_discussion/add_discussion.collection.feature
index 185541465b..ae20ad63d6 100644
--- a/tests/features/joinup_discussion/add_discussion.collection.feature
+++ b/tests/features/joinup_discussion/add_discussion.collection.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Discussions added to collections
In order to manage discussions
As a collection member
diff --git a/tests/features/joinup_discussion/add_discussion.solution.feature b/tests/features/joinup_discussion/add_discussion.solution.feature
index 05c6bd032b..95b20a265f 100644
--- a/tests/features/joinup_discussion/add_discussion.solution.feature
+++ b/tests/features/joinup_discussion/add_discussion.solution.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Add discussion" visibility options.
In order to manage discussions
As a solution member
diff --git a/tests/features/joinup_discussion/api.feature b/tests/features/joinup_discussion/api.feature
index 6a6cc4b758..bd5a64b290 100644
--- a/tests/features/joinup_discussion/api.feature
+++ b/tests/features/joinup_discussion/api.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Discussion API
In order to manage discussion entities programmatically
As a backend developer
diff --git a/tests/features/joinup_discussion/discussion.edit.feature b/tests/features/joinup_discussion/discussion.edit.feature
index a6943bb182..dbd5fe5247 100644
--- a/tests/features/joinup_discussion/discussion.edit.feature
+++ b/tests/features/joinup_discussion/discussion.edit.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-c
Feature: "Discussion page" editing.
In order to manage discussions
As an owner of the discussion
diff --git a/tests/features/joinup_discussion/discussion.invite.feature b/tests/features/joinup_discussion/discussion.invite.feature
index 03130173b2..0855ce9df5 100644
--- a/tests/features/joinup_discussion/discussion.invite.feature
+++ b/tests/features/joinup_discussion/discussion.invite.feature
@@ -1,10 +1,10 @@
-@api @group-b
+@api @group-c
Feature: Invite members to subscribe to discussions
In order to promote discussion of topics
As a discussion author or moderator
I need to be able to invite users to discussions
- @email @javascript
+ @javascript
Scenario: Invite members to a discussion
Given users:
| Username | E-mail | First name | Family name |
@@ -163,7 +163,7 @@ Feature: Invite members to subscribe to discussions
| Glory Ruskin |
# Invite some users.
- Given the mail collector cache is empty
+ Given I mark all emails as read
And I press "Invite to discussion"
Then I should see the success message "2 user(s) have been invited to this discussion."
And the following email should have been sent:
@@ -177,7 +177,6 @@ Feature: Invite members to subscribe to discussions
And 2 e-mails should have been sent
# Try if it is possible to resend an invitation.
- Given the mail collector cache is empty
When I fill in "E-mail" with "gloruskin.hr@example.com"
And I hit "enter" in the keyboard on the field "E-mail"
And I wait for AJAX to finish
@@ -208,7 +207,7 @@ Feature: Invite members to subscribe to discussions
# Try to invite the user again. This should not send an invitation since the
# user is already subscribed.
- Given the mail collector cache is empty
+ Given I mark all emails as read
And I am logged in as "Lynwood Crawford"
When I go to the "Concerned about dissolved gases?" discussion
And I click "Invite"
diff --git a/tests/features/joinup_discussion/discussion.moderation.feature b/tests/features/joinup_discussion/discussion.moderation.feature
index 7c3c107487..a7d21f945a 100644
--- a/tests/features/joinup_discussion/discussion.moderation.feature
+++ b/tests/features/joinup_discussion/discussion.moderation.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-c
Feature: Discussion moderation
In order to manage discussions
As a user of the website
diff --git a/tests/features/joinup_discussion/discussion.subscribe.feature b/tests/features/joinup_discussion/discussion.subscribe.feature
index 5e3d6d9b6a..ede4ccdf27 100644
--- a/tests/features/joinup_discussion/discussion.subscribe.feature
+++ b/tests/features/joinup_discussion/discussion.subscribe.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-g
Feature: Following discussions
As a member of Joinup
I want to follow interesting discussions
@@ -55,7 +55,6 @@ Feature: Following discussions
And I should see the link "Follow"
And the "Rare butter" discussion should have 0 subscribers
- @email
Scenario: Receive E-mail notifications when actions are taken in discussions.
Given users:
| Username | E-mail | First name | Family name | Notification frequency |
@@ -97,7 +96,7 @@ Feature: Following discussions
# No E-mail notification is sent when the discussion is updated but no
# relevant fields are changed.
- And the mail collector cache is empty
+ And I mark all emails as read
And I am logged in as "Dr. Hans Zarkov"
And I go to the edit form of the "Rare Butter" discussion
And I press "Update"
@@ -126,24 +125,12 @@ Feature: Following discussions
# If the discussion is moved from 'validated' to any other state, no
# notification will be sent, regardless if a relevant field is changed.
- Given the mail collector cache is empty
+ Given I mark all emails as read
And I am logged in as a moderator
When I go to the edit form of the "Rare Butter" discussion
And I fill in "Content" with "Is this change triggering notifications?"
And I fill in "Motivation" with "Reporting this content..."
And I press "Report"
- Then the following email should not have been sent:
- | recipient_mail | dale@example.com |
- | subject | Joinup: The discussion "Rare Butter" was updated in the space of "Dairy products" |
- | body | The discussion "Rare Butter" was updated in the "Dairy products" collection. |
- And the following email should not have been sent:
- | recipient_mail | flash@example.com |
- | mail_subject | Joinup: The discussion "Rare Butter" was updated in the space of "Dairy products" |
- | mail_body | The discussion "Rare Butter" was updated in the "Dairy products" collection. |
- And the following email should not have been sent:
- | recipient_mail | ming@example.com |
- | mail_subject | Joinup: The discussion "Rare Butter" was updated in the space of "Dairy products" |
- | mail_body | The discussion "Rare Butter" was updated in the "Dairy products" collection. |
# The notification that a moderator requests a modification should still be
# sent to the content author.
But the following email should have been sent:
@@ -152,7 +139,6 @@ Feature: Following discussions
| body | the Moderator, has requested you to modify the discussion - "Rare Butter" |
And 1 e-mail should have been sent
- Given the mail collector cache is empty
When I go to the "Rare Butter" discussion
And I click "Delete" in the "Entity actions" region
And I press "Delete"
diff --git a/tests/features/joinup_discussion/homepage.feature b/tests/features/joinup_discussion/homepage.feature
index a93e00aa70..3b0e422b70 100644
--- a/tests/features/joinup_discussion/homepage.feature
+++ b/tests/features/joinup_discussion/homepage.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Discussion homepage
As a user of the website
I want to be able to view the discussion information
diff --git a/tests/features/joinup_document/add_document.collection.feature b/tests/features/joinup_document/add_document.collection.feature
index c15e8ca4cc..f3f1b02bbe 100644
--- a/tests/features/joinup_document/add_document.collection.feature
+++ b/tests/features/joinup_document/add_document.collection.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Add document" visibility options.
In order to manage documents
As a collection member
diff --git a/tests/features/joinup_document/add_document.solution.feature b/tests/features/joinup_document/add_document.solution.feature
index d8a4d16e14..8333ed97f7 100644
--- a/tests/features/joinup_document/add_document.solution.feature
+++ b/tests/features/joinup_document/add_document.solution.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Add document" visibility options.
In order to manage documents
As a solution member
diff --git a/tests/features/joinup_document/api.feature b/tests/features/joinup_document/api.feature
index d398ce4141..8a310311c1 100644
--- a/tests/features/joinup_document/api.feature
+++ b/tests/features/joinup_document/api.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Document API
In order to manage document entities programmatically
As a backend developer
diff --git a/tests/features/joinup_document/document.edit.feature b/tests/features/joinup_document/document.edit.feature
index db3c868d94..cea66bbba1 100644
--- a/tests/features/joinup_document/document.edit.feature
+++ b/tests/features/joinup_document/document.edit.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Document page" editing.
In order to manage documents
As an owner of the document
diff --git a/tests/features/joinup_document/document.moderation.feature b/tests/features/joinup_document/document.moderation.feature
index e7e00d2cb4..c0fad7bca1 100644
--- a/tests/features/joinup_document/document.moderation.feature
+++ b/tests/features/joinup_document/document.moderation.feature
@@ -1,4 +1,4 @@
-@api @terms @group-b
+@api @terms @group-d
Feature: Document moderation
In order to manage documents
As a user of the website
diff --git a/tests/features/joinup_document/document.overview.feature b/tests/features/joinup_document/document.overview.feature
index 58c1d07e7d..eed4be2605 100644
--- a/tests/features/joinup_document/document.overview.feature
+++ b/tests/features/joinup_document/document.overview.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Document" overview.
In order to use documents
As a user of the website
diff --git a/tests/features/joinup_event/add_event.collection.feature b/tests/features/joinup_event/add_event.collection.feature
index 336ba95f4f..d571ddf547 100644
--- a/tests/features/joinup_event/add_event.collection.feature
+++ b/tests/features/joinup_event/add_event.collection.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Add event" visibility options.
In order to manage events
As a collection member
diff --git a/tests/features/joinup_event/add_event.solution.feature b/tests/features/joinup_event/add_event.solution.feature
index 8c16c775f5..a34ec14c80 100644
--- a/tests/features/joinup_event/add_event.solution.feature
+++ b/tests/features/joinup_event/add_event.solution.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Add event" visibility options.
In order to manage events
As a solution member
diff --git a/tests/features/joinup_event/api.feature b/tests/features/joinup_event/api.feature
index 425f3770a2..5defa87e5b 100644
--- a/tests/features/joinup_event/api.feature
+++ b/tests/features/joinup_event/api.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Event API
In order to manage custom pages programmatically
As a backend developer
diff --git a/tests/features/joinup_event/event.edit.feature b/tests/features/joinup_event/event.edit.feature
index 20ea4c3821..50b19b0844 100644
--- a/tests/features/joinup_event/event.edit.feature
+++ b/tests/features/joinup_event/event.edit.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: "Event page" editing.
In order to manage events
As an owner of the event
diff --git a/tests/features/joinup_event/event.moderation.feature b/tests/features/joinup_event/event.moderation.feature
index 32f132514e..b8859973d0 100644
--- a/tests/features/joinup_event/event.moderation.feature
+++ b/tests/features/joinup_event/event.moderation.feature
@@ -1,4 +1,4 @@
-@api @terms @group-b
+@api @terms @group-d
Feature: Event moderation
In order to manage events
As a user of the website
diff --git a/tests/features/joinup_federation/import.feature b/tests/features/joinup_federation/import.feature
index 8c0d99a4dd..2de48c36cf 100644
--- a/tests/features/joinup_federation/import.feature
+++ b/tests/features/joinup_federation/import.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: As a site moderator I am able to import RDF files.
Background:
diff --git a/tests/features/joinup_group/group_reports.feature b/tests/features/joinup_group/group_reports.feature
index a47530128e..ef2e2cc472 100644
--- a/tests/features/joinup_group/group_reports.feature
+++ b/tests/features/joinup_group/group_reports.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature:
In order to understand how my group is being used
As a facilitator
diff --git a/tests/features/joinup_group/member_permissions_table.feature b/tests/features/joinup_group/member_permissions_table.feature
index ffedc2dc6a..81197e1cfb 100644
--- a/tests/features/joinup_group/member_permissions_table.feature
+++ b/tests/features/joinup_group/member_permissions_table.feature
@@ -1,4 +1,4 @@
-@api @terms @group-b
+@api @terms @group-d
Feature: Group member permissions table
In order to get an overview of which actions I can take in a group
As a member of a collection or solution
diff --git a/tests/features/joinup_group/revoke_privileges.feature b/tests/features/joinup_group/revoke_privileges.feature
index b53d567346..2eae31e2e5 100644
--- a/tests/features/joinup_group/revoke_privileges.feature
+++ b/tests/features/joinup_group/revoke_privileges.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: Revoke privileges from former and blocked members
In order to ensure content in my group is not vandalized by former members
As a facilitator
diff --git a/tests/features/joinup_group/short_id.feature b/tests/features/joinup_group/short_id.feature
index 9f6bbafb24..bedce12a43 100644
--- a/tests/features/joinup_group/short_id.feature
+++ b/tests/features/joinup_group/short_id.feature
@@ -1,4 +1,4 @@
-@api @terms @group-a
+@api @terms @group-c
Feature:
As an owner of a group
In order to make the URL of my group easier to read
diff --git a/tests/features/joinup_news/news_moderation.feature b/tests/features/joinup_news/news_moderation.feature
index af71a41b72..ba8261c548 100644
--- a/tests/features/joinup_news/news_moderation.feature
+++ b/tests/features/joinup_news/news_moderation.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-g
# This features tests the workflow transitions.
#
# The steps @Then I go to the "news" content :title edit screen
diff --git a/tests/features/joinup_notification/asset_release.notification.feature b/tests/features/joinup_notification/asset_release.notification.feature
index 0b9b2457a9..cb6500adb6 100644
--- a/tests/features/joinup_notification/asset_release.notification.feature
+++ b/tests/features/joinup_notification/asset_release.notification.feature
@@ -1,4 +1,4 @@
-@api @email @wip
+@api @wip
Feature: Asset release notification system
In order to manage releases
As a user of the website
@@ -27,8 +27,7 @@ Feature: Asset release notification system
| My awesome solution abc | Copernicus | owner |
Scenario: Publish a release as a facilitator.
- When all e-mails have been sent
- And I am logged in as "Copernicus"
+ When I am logged in as "Copernicus"
And I go to the homepage of the "My awesome solution abc" solution
And I click "Add release"
And I fill in the following:
@@ -44,7 +43,7 @@ Feature: Asset release notification system
| body | Dear Copernicus, Your release "1" for the "My awesome solution abc" solution was uploaded succesfully. Kind regards, The Joinup Support Team. |
# Update an existing release.
- When all e-mails have been sent
+ When I mark all emails as read
And I go to the homepage of the "My awesome release abc" release
And I click "Edit" in the "Entity actions" region
And I fill in "Release number" with "v2"
diff --git a/tests/features/joinup_notification/content.notification.feature b/tests/features/joinup_notification/content.notification.feature
index 95bca0fa1a..84b98ae340 100644
--- a/tests/features/joinup_notification/content.notification.feature
+++ b/tests/features/joinup_notification/content.notification.feature
@@ -1,4 +1,4 @@
-@api @email @wip
+@api @wip
Feature: Content notification system
As a user of the website
In order to be up to date with the changes on my content
@@ -30,7 +30,6 @@ Feature: Content notification system
And event content:
| title | short title | body | state | solution | start date | end date |
| Smoke signals pre-conference party | Smoke signals party | A party thrown before the conference. | proposed | Smoke signals code standard | 2017-03-31T16:43:13 | 2017-03-31T16:43:13 |
- And all e-mails have been sent
Scenario: Send emails on content update.
When I am logged in as "Jerrard Verity"
@@ -45,7 +44,7 @@ Feature: Content notification system
| subject | Joinup: user Jerrard Verity updated a News of your collection |
| body | Devyn Queshire, Jerrard Verity updated the News "Communication tools" in your Communication tools collection. |
- Given all the e-mails have been sent
+ Given I mark all emails as read
When I go to the "Smoke signals pre-conference party" event
And I click "Edit"
And I fill in "Location" with "Somewhere with a clean sky"
@@ -70,7 +69,7 @@ Feature: Content notification system
| body | Dear Devyn Queshire, your news "Infrared long-range communications" was successfully deleted. Kinds regards, The Joinup Support Team. |
When I am logged in as "Jerrard Verity"
- And all the e-mails have been sent
+ And I mark all emails as read
When I go to the "Smoke signals pre-conference party" event
And I click "Delete"
And I press "Delete"
diff --git a/tests/features/joinup_notification/solution.notification.feature b/tests/features/joinup_notification/solution.notification.feature
index 3c280d45b2..1592b7f53f 100644
--- a/tests/features/joinup_notification/solution.notification.feature
+++ b/tests/features/joinup_notification/solution.notification.feature
@@ -1,4 +1,4 @@
-@api @email @wip
+@api @wip
Feature: Solution notification system
In order to manage solutions
As a user of the website
diff --git a/tests/features/joinup_search/group_search.feature b/tests/features/joinup_search/group_search.feature
index 3e15d81704..0bd2e9275d 100644
--- a/tests/features/joinup_search/group_search.feature
+++ b/tests/features/joinup_search/group_search.feature
@@ -221,6 +221,10 @@ Feature: Search inside groups
Then the option with text "Chalet construction (2)" from select facet form "collection/solution" is selected
And the page should show the tiles "Ground plan, Natural materials"
And I should see the following facet summary "Chalet construction"
+ # Workaround to scroll an element towards the center of the screen to avoid a false out of bounds move exception.
+ # @todo: Remove this as part of ISAICP-6800.
+ # @see: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/ISAICP-6800
+ When I scroll the "Chalet construction" chip into view
When I should remove the following facet summary "Chalet construction"
Then the page should not contain any facet summary
And the page should show the tiles "Ground plan, Pre-alpha, Natural materials, Presenting DrillMaster X88"
@@ -233,8 +237,8 @@ Feature: Search inside groups
When I open the search bar by clicking on the search icon
Then the page should not contain any chips
- When I select "Inclined foundations" from the "collection/solution" select facet form
- And I click Search in facets form
+ When I select "Inclined foundations" from "Collection/Solution"
+ And I press "Search"
Then the option with text "Inclined foundations (6)" from select facet form "collection/solution" is selected
And I should see 6 tiles
@@ -243,8 +247,8 @@ Feature: Search inside groups
# The filter facets summary shouldn't remain active when doing another search.
When I enter "ground" in the search bar and press enter
- Then I select "Inclined foundations" from the "collection/solution" select facet form
- And I click Search in facets form
+ Then I select "Inclined foundations" from "Collection/Solution"
+ And I press "Search"
And I should see 2 tiles
When I open the search bar by clicking on the search icon
And I should see the following facet summary "Inclined foundations"
diff --git a/tests/features/joinup_search/search.feature b/tests/features/joinup_search/search.feature
index 036dfd04c3..5b9243b45c 100644
--- a/tests/features/joinup_search/search.feature
+++ b/tests/features/joinup_search/search.feature
@@ -1,4 +1,4 @@
-@api @terms @group-b
+@api @terms @group-d
Feature: Global search
As a user of the site I can find content through the global search.
@@ -53,7 +53,7 @@ Feature: Global search
# Since the topics are indented by a whitespace, and the whitespaces are trimmed in the step above, we are testing
# the full response in order to ensure that the results are indented properly. The character below is the
# printable space character.
- # @todo and WARNING. The following character is supported by the old 3.4 selenium server. Change this in the
+ # @todo and WARNING. The following character is supported by the old 3.4 selenium server. Change this in the
# new infrastructure with the encoded character.
And the response should contain ""
And the response should contain ""
@@ -69,8 +69,9 @@ Feature: Global search
# Joinup there were two search fields, but this was confusing users.
And there should be exactly 1 "search field" on the page
- When I select "Social and Political" from the "topic" select facet form
- And I click Search in facets form
+ When I select "Social and Political" from "Topics"
+ Then I scroll button "Search" into view
+ And I press "Search"
Then the option with text "Social and Political" from select facet form "topic" is selected
And the "topic" select facet form should contain the following options:
| Any topic |
@@ -86,8 +87,9 @@ Feature: Global search
And I should see the "Dummy news 4" tile
# Test the topic facet. The space prefixing "Demography" is due to the hierarchy.
- When I select " Demography" from the "topic" select facet form
- And I click Search in facets form
+ When I select "- Demography" from "Topics"
+ Then I scroll button "Search" into view
+ And I press "Search"
Then the option with text "- Demography" from select facet form "topic" is selected
# The selected option moves to the last position by default.
And the "topic" select facet form should contain the following options:
@@ -109,8 +111,9 @@ Feature: Global search
And I should not see the "Foam" tile
# Test the spatial coverage facet.
- When I select "Belgium" from the "spatial coverage" select facet form
- And I click Search in facets form
+ When I select "Belgium" from "Geographic coverage"
+ Then I scroll button "Search" into view
+ And I press "Search"
Then the option with text "Belgium (1)" from select facet form "spatial coverage" is selected
And the "spatial coverage" select facet form should contain the following options:
| Any location |
@@ -128,16 +131,18 @@ Feature: Global search
# Select link in the 'type' facet.
Given I am on the search page
- When I select "News (5)" from the "Content types" select facet form
- And I click Search in facets form
+ When I select "News (5)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
Then the option with text "News (5)" from select facet form "Content types" is selected
And the "Content types" select facet form should contain the following options:
| Collection (1) |
| News (5) |
| Solutions (2) |
- When I select "Solutions (2)" option in the "Content types" select facet form
- And I click Search in facets form
+ When I additionally select "Solutions (2)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
And I should see the following facet summary "News, Solutions"
And the "Content types" select facet form should contain the following options:
| Collection (1) |
@@ -192,8 +197,10 @@ Feature: Global search
| Any location |
| Greece (1) |
| Luxembourg (2) |
- When I select "Luxembourg" from the "spatial coverage" select facet form
- And I click Search in facets form
+
+ When I select "Luxembourg" from "Geographic coverage"
+ Then I scroll button "Search" into view
+ And I press "Search"
Then the option with text "Luxembourg (2)" from select facet form "spatial coverage" is selected
And I should see the text "Search Results (2)"
# The countries are still sorted alphabetically even though the Luxembourg value is selected and has more results.
@@ -315,15 +322,14 @@ Feature: Global search
Then the page should show the tiles "Solution alpha, Release Alpha"
# Users should be found by first name, family name and organisation.
- # @todo Enable when this ticket is implemented ISAICP-6575.
- # When I enter "Jenessa" in the search bar and press enter
- # Then the page should show the tiles "Jenessa Carlyle"
- # When I enter "freeman" in the search bar and press enter
- # Then the page should show the tiles "Ulysses Freeman"
- # When I enter "clyffco" in the search bar and press enter
- # Then the page should show the tiles "Jenessa Carlyle"
- # When I enter "Omero+snc" in the search bar and press enter
- # Then the page should show the tiles "Ulysses Freeman"
+ When I enter "Jenessa" in the search bar and press enter
+ Then the page should show the tiles "Jenessa Carlyle"
+ When I enter "freeman" in the search bar and press enter
+ Then the page should show the tiles "Ulysses Freeman"
+ When I enter "clyffco" in the search bar and press enter
+ Then the page should show the tiles "Jenessa Carlyle"
+ When I enter "Omero+snc" in the search bar and press enter
+ Then the page should show the tiles "Ulysses Freeman"
Scenario: Advanced search
# An advanced search link is shown in the header, except on the search page.
@@ -372,8 +378,7 @@ Feature: Global search
| Chickens are small birds |
| Bird spotting |
| Best place to find an exotic bird |
- # @todo Enable when this ticket is implemented ISAICP-6575.
- # | Bird Birdman |
+ | Bird Birdman |
@clearStaticCache
Scenario: Solutions and/or releases are found by their distribution keyword.
@@ -595,20 +600,19 @@ Feature: Global search
| Absolutely nonesense |
And I should be on "/search?keys=Relativity&sort_by=relevance"
- # @todo Enable when this ticket is implemented ISAICP-6575.
- # When I select "Creation Date" from "Sort by"
- # And I should see the following tiles in the correct order:
- # | Absolutely nonesense |
- # | Relativity news: Relativity theory |
- # | Relativity is the word |
- # And I should be on "/search?keys=Relativity&sort_by=creation-date"
- #
- # When I select "Last Updated Date" from "Sort by"
- # And I should see the following tiles in the correct order:
- # | Relativity is the word |
- # | Relativity news: Relativity theory |
- # | Absolutely nonesense |
- # And I should be on "/search?keys=Relativity&sort_by=last-updated-date"
+ When I select "Creation Date" from "Sort by"
+ And I should see the following tiles in the correct order:
+ | Absolutely nonesense |
+ | Relativity news: Relativity theory |
+ | Relativity is the word |
+ And I should be on "/search?keys=Relativity&sort_by=creation-date"
+
+ When I select "Last Updated Date" from "Sort by"
+ And I should see the following tiles in the correct order:
+ | Relativity is the word |
+ | Relativity news: Relativity theory |
+ | Absolutely nonesense |
+ And I should be on "/search?keys=Relativity&sort_by=last-updated-date"
@javascript
Scenario: Anonymous user can find facets summary
@@ -633,21 +637,123 @@ Feature: Global search
Given I am logged in as a user with the "authenticated" role
When I visit the search page
- And I select "Solutions (2)" from the "Content types" select facet form
- And I select "News (5)" option in the "Content types" select facet form
- And I click Search in facets form
+ And I enter "funn" in the search bar
+ And I wait for AJAX to finish
+ Then I should see the following search suggestions:
+ | funni |
+ | funny |
+
+ When I enter "bott" in the search bar
+ And I wait for AJAX to finish
+ Then I should see the following search suggestions:
+ | body |
+
+ And I select "Solutions (2)" from "Content types"
+ And I additionally select "News (5)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
And I should see the following facet summary "News, Solutions"
+ # Workaround to scroll an element towards the center of the screen to avoid a false out of bounds move exception.
+ # @todo: Remove this as part of ISAICP-6800.
+ # @see: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/ISAICP-6800
+ Then I scroll link "Clear filters" into view
Then I click "Clear filters"
- And I select "News (5)" from the "Content types" select facet form
- And I click Search in facets form
+ And I select "News (5)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
And I should see the following facet summary "News"
# Check if facet summary was remove correctly.
- Then I click "Clear filters"
- And I select "News (5)" from the "Content types" select facet form
- And I select "Collection (1)" option in the "Content types" select facet form
- And I click Search in facets form
+ # Workaround to scroll an element towards the center of the screen to avoid a false out of bounds move exception.
+ # @todo: Remove this as part of ISAICP-6800.
+ # @see: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/ISAICP-6800
+ Then I scroll link "Clear filters" into view
+ And I click "Clear filters"
+ And I select "News (5)" from "Content types"
+ And I additionally select "Collection (1)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
+ And I should see the following facet summary "Collection, News"
+ When I scroll the "News" chip into view
+ And I should remove the following facet summary "News"
+ Then the page should show only the tiles "Radio cooking collection"
+
+ @javascript
+ Scenario: Anonymous user can find facets summary
+ Given the following collection:
+ | title | Radio cooking collection |
+ | logo | logo.png |
+ | moderation | no |
+ | topic | Demography |
+ | spatial coverage | Belgium |
+ | state | validated |
+ And the following solutions:
+ | title | collection | description | topic | spatial coverage | state |
+ | Spheres | Radio cooking collection | Spherification is the culinary process of shaping a liquid into spheres | Demography | European Union | validated |
+ | Movistar | Radio cooking collection | "The use of foam in cuisine has been used in many forms in the history of cooking:whipped cream, meringue, and mousse are all foams" | | | validated |
+ And news content:
+ | title | body | collection | topic | spatial coverage | state |
+ | El Cabo da Roca | The best in town | Radio cooking collection | Statistics and Analysis | Luxembourg | validated |
+ | Funny news 1 | Dummy body | Radio cooking collection | E-inclusion | Luxembourg | validated |
+ | Funny news 2 | Dummy body | Radio cooking collection | E-inclusion | Luxembourg | validated |
+ | Funny news 3 | Dummy body | Radio cooking collection | E-inclusion | Luxembourg | validated |
+ | Funny news 4 | Dummy body | Radio cooking collection | E-inclusion | Luxembourg | validated |
+
+ Given I am logged in as a user with the "authenticated" role
+ When I visit the search page
+ Then I select "Solutions (2)" from "Content types"
+ And I additionally select "News (5)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
+ And I should see the following facet summary "News, Solutions"
+
+ Then I scroll link "Clear filters" into view
+ And I click "Clear filters"
+ And I select "News (5)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
+ And I should see the following facet summary "News"
+
+ # Check if facet summary was remove correctly.
+ Then I scroll link "Clear filters" into view
+ And I click "Clear filters"
+ Then I select "News (5)" from "Content types"
+ And I additionally select "Collection (1)" from "Content types"
+ Then I scroll button "Search" into view
+ And I press "Search"
And I should see the following facet summary "Collection, News"
- Then I should remove the following facet summary "News"
+ Then I scroll the "News" chip into view
+ And I should remove the following facet summary "News"
And the page should show only the tiles "Radio cooking collection"
+
+ @terms @javascript
+ Scenario: Show first three search results as featured
+ Given collection:
+ | title | Mice in space |
+ | state | validated |
+ And document content:
+ | title | collection | topic | state | logo | body |
+ | Microgravity | Mice in space | HR, Statistics and Analysis, E-justice | validated | alan.jpg | Conventional studies investigating the effects of reduced gravity on muscle mass and function have used a ground control group that is not directly comparable to the space experimental group. |
+ And event content:
+ | title | collection | topic | state | logo | body |
+ | Stay at the ISS | Mice in space | EU and European Policies | validated | charles.jpg | Two groups of mice (six per group) were housed aboard the International Space Station for 35 days. One group was subjected to artificial gravity (1 g) and the other to microgravity. |
+ And news content:
+ | title | body | collection | topic | spatial coverage | state | logo |
+ | Muscle atrophy | Researchers from the University of Tsukuba | Mice in space | Finance in EU | Luxembourg | validated | blaise.jpg |
+ | El Cabo da Roca | The best in town | Mice in space | Statistics and Analysis | Luxembourg | validated | charles.jpg |
+ | Funny news 1 | Dummy body | Mice in space | HR | Luxembourg | validated | ada.png |
+ | Funny news 2 | Dummy body | Mice in space | E-inclusion | Luxembourg | validated | alan.jpg |
+ | Funny news 3 | Dummy body | Mice in space | E-inclusion | Luxembourg | validated | charles.jpg |
+ | Funny news 4 | Dummy body | Mice in space | HR | Luxembourg | validated | ada.png |
+ | Funny news 5 | Dummy body | Mice in space | HR | Luxembourg | validated | ada.png |
+ | Dummy news 1 | Dummy body | Mice in space | Statistics and Analysis | Luxembourg | validated | charles.jpg |
+ | Dummy news 2 | Dummy body | Mice in space | E-inclusion | Luxembourg | validated | alan.jpg |
+ | Dummy news 3 | Dummy body | Mice in space | Statistics and Analysis | Luxembourg | validated | ada.png |
+ | Dummy news 4 | Dummy body | Mice in space | E-inclusion | Luxembourg | validated | charles.jpg |
+
+ When I visit the search page
+ Then I should see the 3 tiles with image
+
+ Then I go to "/search?sort_by=relevance&page=1"
+ And I should see the 0 tiles with image
diff --git a/tests/features/joinup_seo/discussion.feature b/tests/features/joinup_seo/discussion.feature
index 5c3f6319db..6a05cda1d0 100644
--- a/tests/features/joinup_seo/discussion.feature
+++ b/tests/features/joinup_seo/discussion.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: SEO for discussion forum posts.
As an owner of the website
in order for my discussions to be better visible on the web
diff --git a/tests/features/joinup_seo/document.feature b/tests/features/joinup_seo/document.feature
index 0e2b6ffb89..5e74c2f5b1 100644
--- a/tests/features/joinup_seo/document.feature
+++ b/tests/features/joinup_seo/document.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: SEO for document content.
As an owner of the website
in order for my documents to be better visible on the web
diff --git a/tests/features/joinup_seo/event.feature b/tests/features/joinup_seo/event.feature
index 5c02200c83..2e2927e43e 100644
--- a/tests/features/joinup_seo/event.feature
+++ b/tests/features/joinup_seo/event.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: SEO for news articles.
As an owner of the website
in order for my news to be better visible on the web
diff --git a/tests/features/joinup_subscription/collection.content.subscription.feature b/tests/features/joinup_subscription/collection.content.subscription.feature
index 046233e34f..bc653249d2 100644
--- a/tests/features/joinup_subscription/collection.content.subscription.feature
+++ b/tests/features/joinup_subscription/collection.content.subscription.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: Subscribing to community content in collections
As a member of a collection
I want to receive a periodic digest listing newly published content
@@ -31,9 +31,7 @@ Feature: Subscribing to community content in collections
| Cities of Bulgaria | bisera | discussion, event, news |
| Cities of Bulgaria | kalin | discussion, document, news, solution |
And all message digests have been delivered
- And the mail collector cache is empty
- @email
Scenario: Receive a digest of content that is published in my collections
Given discussion content:
| title | body | collection | state | author |
@@ -147,7 +145,7 @@ Feature: Subscribing to community content in collections
And the content subscription digest sent to kalin should have the subject "Joinup: Monthly digest message"
# Clean out the message queue for the next test.
- And the mail collector cache is empty
+ And I mark all emails as read
# Check that if community content is published a second time it is not
# included in the next digest.
diff --git a/tests/features/joinup_subscription/community.content.subscriptions.feature b/tests/features/joinup_subscription/community.content.subscriptions.feature
index 55e350d8b0..c691ab4b36 100644
--- a/tests/features/joinup_subscription/community.content.subscriptions.feature
+++ b/tests/features/joinup_subscription/community.content.subscriptions.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Subscribing to community content in collections and solutions
As an avid fan of Joinup
I want to receive a periodic digest listing newly published content
@@ -32,9 +32,7 @@ Feature: Subscribing to community content in collections and solutions
| Bolometric appearance | jpluminet | discussion, document, event, news |
And all message digests have been delivered
- And the mail collector cache is empty
- @email
Scenario: Receive a digest of community content that is published
Given discussion content:
| title | body | collection | solution | state | author |
diff --git a/tests/features/joinup_subscription/my_subscriptions.feature b/tests/features/joinup_subscription/my_subscriptions.feature
index 583acdf156..c71fdeef37 100644
--- a/tests/features/joinup_subscription/my_subscriptions.feature
+++ b/tests/features/joinup_subscription/my_subscriptions.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: My subscriptions
As a user I must be able to manage my subscriptions and related settings.
diff --git a/tests/features/joinup_subscription/solution.content.subscription.feature b/tests/features/joinup_subscription/solution.content.subscription.feature
index 44cc66e579..17828b29b0 100644
--- a/tests/features/joinup_subscription/solution.content.subscription.feature
+++ b/tests/features/joinup_subscription/solution.content.subscription.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-c
Feature: Subscribing to community content in solutions
As a member of a solution
I want to receive a periodic digest listing newly published content
@@ -34,9 +34,7 @@ Feature: Subscribing to community content in solutions
| Cities of Bulgaria | bisera | discussion, event, news |
| Cities of Bulgaria | kalin | discussion, document, news |
And all message digests have been delivered
- And the mail collector cache is empty
- @email
Scenario: Receive a digest of content that is published in my solutions
Given discussion content:
| title | body | solution | state | author |
@@ -160,7 +158,7 @@ Feature: Subscribing to community content in solutions
And the content subscription digest sent to kalin should have the subject "Joinup: Monthly digest message"
# Clean out the message queue for the next test.
- And the mail collector cache is empty
+ And I mark all emails as read
# Check that if community content is published a second time it is not
# included in the next digest.
diff --git a/tests/features/joinup_subscription/solution.subscriptions.feature b/tests/features/joinup_subscription/solution.subscriptions.feature
index 768184d4f1..9b346dc4bf 100644
--- a/tests/features/joinup_subscription/solution.subscriptions.feature
+++ b/tests/features/joinup_subscription/solution.subscriptions.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Subscribing to a solution
In order to promote my solution
As a solution owner
diff --git a/tests/features/joinup_subscription/subscribers_report.feature b/tests/features/joinup_subscription/subscribers_report.feature
index 64f4635964..02f771a203 100644
--- a/tests/features/joinup_subscription/subscribers_report.feature
+++ b/tests/features/joinup_subscription/subscribers_report.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-g
Feature: Subscribers report
In order to get a view on how many members are subscribed to our content
As a facilitator
diff --git a/tests/features/local_actions.feature b/tests/features/local_actions.feature
index f7edfb6ddb..3f91dedcbd 100644
--- a/tests/features/local_actions.feature
+++ b/tests/features/local_actions.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature:
As an owner of the website
In order for users to easier navigate in the website
diff --git a/tests/features/machine_translation.feature b/tests/features/machine_translation.feature
index 5158483bc9..1e69b11f9f 100644
--- a/tests/features/machine_translation.feature
+++ b/tests/features/machine_translation.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-g
Feature: Machine translation
As a citizen of the European Union
I am likely not to have English as my native language
diff --git a/tests/features/moderator/image_library_widget.feature b/tests/features/moderator/image_library_widget.feature
index baf8f55b6e..f454103416 100644
--- a/tests/features/moderator/image_library_widget.feature
+++ b/tests/features/moderator/image_library_widget.feature
@@ -1,4 +1,4 @@
-@api @group-a @uploadFiles:logo.png
+@api @group-g @uploadFiles:logo.png
Feature: As a moderator I want to be able to maintain sets of images to be
reused as logo or banner images for collections, solutions, events and news.
diff --git a/tests/features/moderator/message_overview.feature b/tests/features/moderator/message_overview.feature
index de00928fe0..92fb2c5956 100644
--- a/tests/features/moderator/message_overview.feature
+++ b/tests/features/moderator/message_overview.feature
@@ -1,12 +1,9 @@
-# The test is marked as @wip as there is a failure in our current CI that needs to be debugged.
-# @see: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/ISAICP-5665
-@api @wip
+@api
Feature: Solutions message overview
As a moderator of the site
In order to be able to manage incoming requests
I need to be able to list messages that are sent throughout the website.
- @messageCleanup
Scenario: Only privileged users can access the report.
When I am logged in as a user with the "authenticated" role
And I go to "/admin/content/messages"
@@ -18,7 +15,6 @@ Feature: Solutions message overview
And I click "Messages overview"
Then the response status code should be 200
- @messageCleanup
Scenario: Contact form messages are available in the message overview.
And I am not logged in
When I am on the homepage
@@ -50,7 +46,7 @@ Feature: Solutions message overview
| Ran out of gas |
| Do you have 1 euro to buy a cheese pie? |
- @messageCleanup @terms
+ @terms
Scenario: Workflow messages are available in the message overview.
Given owner:
| name | type |
@@ -64,6 +60,10 @@ Feature: Solutions message overview
When I select "HR" from "Topic"
And I press "Add existing" at the "Owner" field
And I fill in "Owner" with "Organisation example"
+ And I fill in the following:
+ | E-mail | invisible.man@example.com |
+ | Name | Invisible Man |
+ And I press "Create contact information"
And I press "Propose"
And I should see the heading "Message overview proposal"
diff --git a/tests/features/moderator/site_alerts.feature b/tests/features/moderator/site_alerts.feature
index 2db80318a0..0a6e2a87b2 100644
--- a/tests/features/moderator/site_alerts.feature
+++ b/tests/features/moderator/site_alerts.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Site alerts
In order to announce scheduled downtime
As a moderator
diff --git a/tests/features/outdated_content.feature b/tests/features/outdated_content.feature
index 5f35fb7cb4..6aba4091a1 100644
--- a/tests/features/outdated_content.feature
+++ b/tests/features/outdated_content.feature
@@ -21,10 +21,10 @@ Feature:
| title | collection | document publication date | state |
| Very old document | Outdated content | 1985-03-04 | validated |
And event content:
- | title | collection | publication date | created | state |
- | Recent published event | Outdated content | -3 months | -3 months | validated |
- | Outdated published event | Outdated content | -1 year -1 hour -1 second | -1 year -1 hour -1 second | validated |
- | Not published event | Outdated content | | -31 years | draft |
+ | title | collection | publication date | created | state |
+ | Recent published event | Outdated content | -3 months | -3 months | validated |
+ | Outdated published event | Outdated content | -1 year -1 second | -1 year -1 second | validated |
+ | Not published event | Outdated content | | -31 years | draft |
And news content:
| title | collection | publication date | created | state |
| Recent published news | Outdated content | -7 months | -7 months | validated |
diff --git a/tests/features/owner/api.feature b/tests/features/owner/api.feature
index a063a5d400..6c425f06f5 100644
--- a/tests/features/owner/api.feature
+++ b/tests/features/owner/api.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature: Owner API
In order to manage owners programmatically
As a backend developer
diff --git a/tests/features/owner/collection_with_owner.feature b/tests/features/owner/collection_with_owner.feature
index 4e222e3281..3405e6b340 100644
--- a/tests/features/owner/collection_with_owner.feature
+++ b/tests/features/owner/collection_with_owner.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature: Creation of owners through UI
In order to manage owners
As a user
diff --git a/tests/features/owner/owner.moderation.feature b/tests/features/owner/owner.moderation.feature
index 90066ddf1a..fa2bb1bd3e 100644
--- a/tests/features/owner/owner.moderation.feature
+++ b/tests/features/owner/owner.moderation.feature
@@ -1,4 +1,4 @@
-@api @terms
+@api @terms @group-f
Feature: Owner moderation
In order to manage owners
As a user of the website
diff --git a/tests/features/owner/validation.feature b/tests/features/owner/validation.feature
index a027831158..74393164de 100644
--- a/tests/features/owner/validation.feature
+++ b/tests/features/owner/validation.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature: Validation of owners created through UI
In order to ensure that my data is complete
As a collection owner
diff --git a/tests/features/paragraphs/custom_page.paragraphs.feature b/tests/features/paragraphs/custom_page.paragraphs.feature
index f150f6dbf6..858064a49f 100644
--- a/tests/features/paragraphs/custom_page.paragraphs.feature
+++ b/tests/features/paragraphs/custom_page.paragraphs.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature:
As a site builder of the site
In order to be able to better control the structure of my content
diff --git a/tests/features/pin_in_collection.feature b/tests/features/pin_in_collection.feature
index c9cfe85d22..c53747b764 100644
--- a/tests/features/pin_in_collection.feature
+++ b/tests/features/pin_in_collection.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-f
Feature: Pinning entities inside collections
As a facilitator of a collection
I want to pin entities at the top of the collection homepage
diff --git a/tests/features/pin_in_solution.feature b/tests/features/pin_in_solution.feature
index 808dd40762..80f846bd11 100644
--- a/tests/features/pin_in_solution.feature
+++ b/tests/features/pin_in_solution.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-f
Feature: Pinning content entities inside solutions
As a facilitator of a solution
I want to pin content at the top of the solution homepage
diff --git a/tests/features/pipeline_log/report.feature b/tests/features/pipeline_log/report.feature
index a6e382033e..af49d1aeb0 100644
--- a/tests/features/pipeline_log/report.feature
+++ b/tests/features/pipeline_log/report.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-g
Feature: In order to help moderators manage effectively imported content
As the owner of the website
I need to show status messages if a pipeline has not run for too long.
diff --git a/tests/features/rdf_entity_provenance/federated_entities.feature b/tests/features/rdf_entity_provenance/federated_entities.feature
index 7da3488416..2f77797f51 100644
--- a/tests/features/rdf_entity_provenance/federated_entities.feature
+++ b/tests/features/rdf_entity_provenance/federated_entities.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: In order to avoid users changing federated values
As a site owner
I want federated entities to have the schema values disabled.
diff --git a/tests/features/rdf_graph/rdf_graph.feature b/tests/features/rdf_graph/rdf_graph.feature
index 8e16038988..4cf666ee29 100644
--- a/tests/features/rdf_graph/rdf_graph.feature
+++ b/tests/features/rdf_graph/rdf_graph.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-g
Feature: As a user with 'RDF graph manager' role I want to be able to upload RDF
files in custom graphs and make them available as triples on Joinup RDF endpoint.
diff --git a/tests/features/report.feature b/tests/features/report.feature
index 858f3309da..138cc36bbd 100644
--- a/tests/features/report.feature
+++ b/tests/features/report.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-g
Feature: Report inappropriate content
In order to outsource the discovery of inappropriate content on the site
As a moderator
@@ -18,6 +18,19 @@ Feature: Report inappropriate content
And the "Category" field should contain "report"
And the "Page URL" field should contain the link to the "" page
+ # Submit the form to check if 'destination' has been correctly set.
+ And I fill in the following:
+ | First name | John |
+ | Last name | Doe |
+ | Organisation | |
+ | E-mail address | doe@example.rg |
+ | Subject | Invalid content |
+ | Message | Spam |
+ # We need to wait 5 seconds for the spam protection time limit to pass.
+ And I wait for the spam protection time limit to pass
+ When I press "Submit"
+ Then I should see the heading ""
+
Examples:
| type | title | body |
| discussion | Git is not a deployment tool | Use tarballs to deploy. |
diff --git a/tests/features/security/antibot.feature b/tests/features/security/antibot.feature
index d2a4f8937f..7e00e73df3 100644
--- a/tests/features/security/antibot.feature
+++ b/tests/features/security/antibot.feature
@@ -1,4 +1,4 @@
-@api @javascript @antibot
+@api @javascript @antibot @group-f
Feature: As a visitor or logged-in user, when I want to post content, the form
should be protected by Antibot.
diff --git a/tests/features/site_menus.feature b/tests/features/site_menus.feature
index 9117cc366b..60a8fff11f 100644
--- a/tests/features/site_menus.feature
+++ b/tests/features/site_menus.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-f
Feature: Site menus
In order to navigate through the sections of the site
As a user
diff --git a/tests/features/solution/about.feature b/tests/features/solution/about.feature
index 07dd95d7ab..a9a3770cee 100644
--- a/tests/features/solution/about.feature
+++ b/tests/features/solution/about.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: About this solution
In order to expose basic information about my solutions
As a solution owner or solution facilitator
diff --git a/tests/features/solution/add_solution.feature b/tests/features/solution/add_solution.feature
index 9ceea19be0..1ceda91410 100644
--- a/tests/features/solution/add_solution.feature
+++ b/tests/features/solution/add_solution.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: "Add solution" visibility options.
In order to manage solutions
As a moderator
@@ -52,7 +52,7 @@ Feature: "Add solution" visibility options.
And I go to the homepage of the "Collection solution test" collection
Then I should not see the link "Add solution"
- @terms @email @uploadFiles:logo.png,banner.jpg
+ @terms @uploadFiles:logo.png,banner.jpg
Scenario: Add solution as a collection facilitator.
Given the following collection:
| title | Belgian barista's |
@@ -69,8 +69,7 @@ Feature: "Add solution" visibility options.
| collection | user | roles |
| Belgian barista's | Wendell Silva | owner, facilitator |
- When all e-mails have been sent
- And I am logged in as "Wendell Silva"
+ When I am logged in as "Wendell Silva"
And I go to the homepage of the "Belgian barista's" collection
And I click "Add solution"
And I check "I have read and accept the legal notice and I commit to manage my solution on a regular basis."
@@ -122,9 +121,8 @@ Feature: "Add solution" visibility options.
But I should see a logo on the header
And I should see a banner on the header
And I should see the heading "Espresso is the solution"
- When all e-mails have been sent
- And I am logged in as "Ruth Lee"
- When I go to the edit form of the "Espresso is the solution" solution
+ When I am logged in as "Ruth Lee"
+ And I go to the edit form of the "Espresso is the solution" solution
And I press "Publish"
# The name of the solution should exist in the block of the relative content in a collection.
Then I should see the heading "Espresso is the solution"
diff --git a/tests/features/solution/api.feature b/tests/features/solution/api.feature
index 7085eec68b..1b5d8944c7 100644
--- a/tests/features/solution/api.feature
+++ b/tests/features/solution/api.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: Solution API
In order to manage solutions programmatically
As a backend developer
diff --git a/tests/features/solution/author_role.feature b/tests/features/solution/author_role.feature
index a9ff3fe225..38a7d59ca1 100644
--- a/tests/features/solution/author_role.feature
+++ b/tests/features/solution/author_role.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-d
Feature:
In order to better manage my group members
As a group owner
diff --git a/tests/features/solution/downloads_counter.feature b/tests/features/solution/downloads_counter.feature
index a71c48ccd1..237bae065c 100644
--- a/tests/features/solution/downloads_counter.feature
+++ b/tests/features/solution/downloads_counter.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature:
Check downloads counter's value at different places.
diff --git a/tests/features/solution/homepage.feature b/tests/features/solution/homepage.feature
index 0f36fb957d..da6d465b88 100644
--- a/tests/features/solution/homepage.feature
+++ b/tests/features/solution/homepage.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-g
Feature: Solution homepage
In order get an idea of what a solution is about
As a user of the website
diff --git a/tests/features/solution/homepage_related_content.feature b/tests/features/solution/homepage_related_content.feature
index 5d09c281ed..ef3f2d3eb3 100644
--- a/tests/features/solution/homepage_related_content.feature
+++ b/tests/features/solution/homepage_related_content.feature
@@ -1,4 +1,4 @@
-@api @terms
+@api @terms @group-g
Feature: Solution homepage
In order find content around a topic
As a user of the website
diff --git a/tests/features/solution/id_with_spaces.feature b/tests/features/solution/id_with_spaces.feature
index af0fdecd7a..c6f8eb063b 100644
--- a/tests/features/solution/id_with_spaces.feature
+++ b/tests/features/solution/id_with_spaces.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-d
Feature: Solution API
In order to be able to use solutions with spaces in their uris
As a backend developer
diff --git a/tests/features/solution/manage_solutions.feature b/tests/features/solution/manage_solutions.feature
index 720c6c3320..cf4a5cc603 100644
--- a/tests/features/solution/manage_solutions.feature
+++ b/tests/features/solution/manage_solutions.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-f
Feature: As a moderator I want to be able to move solutions to other collection.
Scenario: Moderators can move a solution to a different collection.
diff --git a/tests/features/solution/related_solution.feature b/tests/features/solution/related_solution.feature
index 243a4721b8..36260824c7 100644
--- a/tests/features/solution/related_solution.feature
+++ b/tests/features/solution/related_solution.feature
@@ -1,4 +1,4 @@
-@api @terms
+@api @terms @group-g
Feature: Related solution
As a solution facilitator, I need to be able to relate my solution to other
solutions and present the related solutions to the users.
diff --git a/tests/features/solution/solution.edit.feature b/tests/features/solution/solution.edit.feature
index 80c3cca49b..8f2b29e22c 100644
--- a/tests/features/solution/solution.edit.feature
+++ b/tests/features/solution/solution.edit.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-g
Feature: Solution editing.
In order to manage solutions
As a solution owner or solution facilitator
diff --git a/tests/features/solution/solution.member_administration.feature b/tests/features/solution/solution.member_administration.feature
index 2a8a587b9e..34276a7acc 100644
--- a/tests/features/solution/solution.member_administration.feature
+++ b/tests/features/solution/solution.member_administration.feature
@@ -1,4 +1,4 @@
-@api @terms
+@api @terms @group-g
Feature: Solution membership administration
In order to manage a solution
As a solution facilitator
@@ -60,7 +60,6 @@ Feature: Solution membership administration
When I click "Add members"
Then I should see the heading "Add members"
- @email
Scenario: Assign and remove new role to a member
When I am logged in as "Guadalupe Norman"
And I go to the members page of "The Missing Sons"
@@ -86,7 +85,6 @@ Feature: Solution membership administration
| subject | Your role has been changed to member |
| body | Guadalupe Norman has changed your role in solution "The Missing Sons" to member. |
- @email
Scenario: Privileged members should be allowed to invite users to a solution.
Given users:
| Username | E-mail | First name | Family name |
@@ -117,7 +115,6 @@ Feature: Solution membership administration
Then the page should show the following chips in the Content region:
| Christian Dwight |
When I select "Facilitator" from "Role"
- And the mail collector cache is empty
And I press "Invite members"
Then I should see the success message "1 user has been invited to this group."
And the following email should have been sent:
diff --git a/tests/features/solution/solution.member_overview_filtering.feature b/tests/features/solution/solution.member_overview_filtering.feature
index 945db5a111..f8de332f96 100644
--- a/tests/features/solution/solution.member_overview_filtering.feature
+++ b/tests/features/solution/solution.member_overview_filtering.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature: Type something to filter the listing the member list
In order to quickly find a particular member
As a moderator
diff --git a/tests/features/solution/solution.notifications.feature b/tests/features/solution/solution.notifications.feature
index d3a9481f6a..7c92279e59 100644
--- a/tests/features/solution/solution.notifications.feature
+++ b/tests/features/solution/solution.notifications.feature
@@ -1,6 +1,6 @@
# Tests notifications for solutions. This file does not include template 1.
# Template 1 is tested in the add_solution.feature already.
-@api @terms @email
+@api @terms @group-f
Feature: Solution notifications
In order to manage solutions
As a user of the website
@@ -35,7 +35,6 @@ Feature: Solution notifications
When I am logged in as "Pat Harper"
# Template 7. The moderation team proposes changes.
- And all e-mails have been sent
And I go to the homepage of the "Solution notification to propose changes" solution
And I click "Edit" in the "Entity actions" region
And I press "Propose"
@@ -49,8 +48,7 @@ Feature: Solution notifications
| If you think this action is not clear or not due, please contact Joinup Support at |
# Template 13. The moderation team blacklists a solution.
- When all e-mails have been sent
- And I go to the homepage of the "Solution notification to blacklist" solution
+ When I go to the homepage of the "Solution notification to blacklist" solution
And I click "Edit" in the "Entity actions" region
And I press "Blacklist"
Then the following email should have been sent:
@@ -59,8 +57,7 @@ Feature: Solution notifications
| body | the moderator has blacklisted your interoperability solution - Solution notification to blacklist, you can contact the moderation team to resolve the issue. |
# Template 14. The moderation team restores a solution from blacklisted.
- When all e-mails have been sent
- And I go to the homepage of the "Solution notification to publish from blacklisted" solution
+ When I go to the homepage of the "Solution notification to publish from blacklisted" solution
And I click "Edit" in the "Entity actions" region
And I press "Publish"
Then the following email should have been sent:
@@ -69,8 +66,7 @@ Feature: Solution notifications
| body | the moderator has published back your interoperability solution - Solution notification to publish from blacklisted that was blacklisted. |
# Template 15. The moderation team requests changes.
- When all e-mails have been sent
- And I go to the homepage of the "Solution notification to request changes" solution
+ When I go to the homepage of the "Solution notification to request changes" solution
And I click "Edit" in the "Entity actions" region
And I press "Request changes"
# Motivation required.
@@ -88,8 +84,7 @@ Feature: Solution notifications
| If you think this action is not clear or not due, please contact Joinup Support at |
# Template 18. The moderation team deletes a solution without prior request.
- When all e-mails have been sent
- And I go to the homepage of the "Solution notification to delete by moderator team" solution
+ When I go to the homepage of the "Solution notification to delete by moderator team" solution
And I click "Edit" in the "Entity actions" region
And I click "Delete"
And I press "Delete"
@@ -101,8 +96,7 @@ Feature: Solution notifications
When I am logged in as "Ramiro Myers"
# Template 18. The owner proposes changes.
- When all e-mails have been sent
- And I go to the homepage of the "Solution notification to propose from request changes" solution
+ When I go to the homepage of the "Solution notification to propose from request changes" solution
And I click "Edit" in the "Entity actions" region
And I press "Propose"
Then the email sent to "Pat Harper" with subject "Joinup: An update of a solution has been proposed" contains the following lines of text:
@@ -112,7 +106,7 @@ Feature: Solution notifications
# The owner deletes their own solution. No email should be sent to the owner
# since we do not send notifications to the actor.
- When all e-mails have been sent
+ When I mark all emails as read
And I go to the homepage of the "Solution notification to delete by owner" solution
And I click "Edit" in the "Entity actions" region
And I click "Delete"
diff --git a/tests/features/solution/solution_moderation.feature b/tests/features/solution/solution_moderation.feature
index 0f35457f4a..3b1b15341f 100644
--- a/tests/features/solution/solution_moderation.feature
+++ b/tests/features/solution/solution_moderation.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature: Solution moderation
In order to manage solutions programmatically
As a user of the website
diff --git a/tests/features/solution/solution_moderation_integration.feature b/tests/features/solution/solution_moderation_integration.feature
index e8480af976..dc9de71569 100644
--- a/tests/features/solution/solution_moderation_integration.feature
+++ b/tests/features/solution/solution_moderation_integration.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature: As a user of the website
I want to be able to perform available transitions
according to the state of the entity and the graph they are stored in.
diff --git a/tests/features/solution/solution_overview.feature b/tests/features/solution/solution_overview.feature
index 4a81394787..948de142dc 100644
--- a/tests/features/solution/solution_overview.feature
+++ b/tests/features/solution/solution_overview.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature: Solutions Overview
As a new visitor of the Joinup website
To get an idea of the various solutions that are available
diff --git a/tests/features/solution/solution_pager_regression.feature b/tests/features/solution/solution_pager_regression.feature
index c8de29e025..762c9ec403 100644
--- a/tests/features/solution/solution_pager_regression.feature
+++ b/tests/features/solution/solution_pager_regression.feature
@@ -1,4 +1,4 @@
-@api @terms
+@api @terms @group-f
Feature: Test for a 'facets' regression on the solution overview page.
# @see ISAICP-4188
Scenario: Test that no pager is shown on the solution page when not needed.
diff --git a/tests/features/solution/solution_sharing.feature b/tests/features/solution/solution_sharing.feature
index 4ec0995ced..55b2ef17f6 100644
--- a/tests/features/solution/solution_sharing.feature
+++ b/tests/features/solution/solution_sharing.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature: As a privileged user
I want to share solutions to my collections
So that useful information has more visibility
diff --git a/tests/features/solution/tca.feature b/tests/features/solution/tca.feature
index 0b97b699ba..dceb74ddd7 100644
--- a/tests/features/solution/tca.feature
+++ b/tests/features/solution/tca.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-f
Feature: Solution TCA agreement
In order to ensure activity by facilitators
As a site owner and/or a collection owner
diff --git a/tests/features/solution/trr.feature b/tests/features/solution/trr.feature
index eaca658263..d3fdcd9ec5 100644
--- a/tests/features/solution/trr.feature
+++ b/tests/features/solution/trr.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-g
Feature: Creating a test (solution) in the TRR collection.
In order to create tests
As a collection facilitator
diff --git a/tests/features/support/support_menu.feature b/tests/features/support/support_menu.feature
index 8e0c29004e..01245813eb 100644
--- a/tests/features/support/support_menu.feature
+++ b/tests/features/support/support_menu.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-f
Feature:
- As a moderator, in order to maintain the support dropdown, I am able to
administer the 'support' menu.
diff --git a/tests/features/support/whats_new.feature b/tests/features/support/whats_new.feature
index f4f8016b5d..62a2c69762 100644
--- a/tests/features/support/whats_new.feature
+++ b/tests/features/support/whats_new.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-g
Feature:
As a moderator of the website
In order to draw the attention of the users for the changes in Joinup
diff --git a/tests/features/taxonomy/eira.deprecated.feature b/tests/features/taxonomy/eira.deprecated.feature
index 404a80ee34..864413c9df 100644
--- a/tests/features/taxonomy/eira.deprecated.feature
+++ b/tests/features/taxonomy/eira.deprecated.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature:
As a user of the website
When I go to the overview page of an EIRA term
diff --git a/tests/features/taxonomy/eira.description_format.feature b/tests/features/taxonomy/eira.description_format.feature
index f1e4db8a2d..a4a67b9b28 100644
--- a/tests/features/taxonomy/eira.description_format.feature
+++ b/tests/features/taxonomy/eira.description_format.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature:
In order to better read the eira descriptions
As a user of the website
diff --git a/tests/features/taxonomy/eira.related_terms.feature b/tests/features/taxonomy/eira.related_terms.feature
index 408aa6d13c..fab4a41879 100644
--- a/tests/features/taxonomy/eira.related_terms.feature
+++ b/tests/features/taxonomy/eira.related_terms.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature:
As a user of the website
When I go to the overview page of an EIRA term
diff --git a/tests/features/tours.feature b/tests/features/tours.feature
index a00ee89599..15d17984d5 100644
--- a/tests/features/tours.feature
+++ b/tests/features/tours.feature
@@ -1,4 +1,4 @@
-@api @group-a
+@api @group-f
Feature: Tours
In order to understand complex concepts and user interfaces
As a new user of the website
diff --git a/tests/features/user/api.feature b/tests/features/user/api.feature
index e18ab0978f..19174d0c0e 100644
--- a/tests/features/user/api.feature
+++ b/tests/features/user/api.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: User API
In order to manage users programmatic
As a backend developer
diff --git a/tests/features/user/block.feature b/tests/features/user/block.feature
index fbfd80ccb4..23f625333d 100644
--- a/tests/features/user/block.feature
+++ b/tests/features/user/block.feature
@@ -1,4 +1,4 @@
-@api @email
+@api @group-e
Feature: Block users
As a moderator I must be able to block users.
@@ -15,7 +15,6 @@ Feature: Block users
And I press the "Filter" button
# Block the user
- And all e-mails have been sent
Then I check "Liam Lego"
And I select "Block the selected user(s)" from "Action"
And I press the "Apply to selected items" button
@@ -26,8 +25,7 @@ Feature: Block users
| body | Your Joinup account was recently blocked by our moderators. For more information about blocked accounts, please visit our |
# Unblock the user
- When all e-mails have been sent
- Then I check "Liam Lego"
+ When I check "Liam Lego"
Then I select "Unblock the selected user(s)" from "Action"
And I press the "Apply to selected items" button
Then I should see the success message "Unblock the selected user(s) was applied to 1 item."
diff --git a/tests/features/user/cancel.feature b/tests/features/user/cancel.feature
index b8af3b7a44..1fd1a1528a 100644
--- a/tests/features/user/cancel.feature
+++ b/tests/features/user/cancel.feature
@@ -1,4 +1,4 @@
-@api @email @group-a
+@api @group-f
Feature:
In order to efficiently manage users
As a moderator of the website
@@ -9,7 +9,6 @@ Feature:
Given users:
| Username | Roles | E-mail | First name | Family name |
| alicia__1997 | | AliciaPotter@example.com | Alicia | Potter |
- And all e-mails have been sent
Scenario: A moderator cancels a user account.
Given I am logged in as a moderator
diff --git a/tests/features/user/cancel_group_owner.feature b/tests/features/user/cancel_group_owner.feature
index 58453cbac1..a97b67a738 100644
--- a/tests/features/user/cancel_group_owner.feature
+++ b/tests/features/user/cancel_group_owner.feature
@@ -1,4 +1,4 @@
-@api @group-b
+@api @group-f
Feature:
Accounts of group owners cannot be cancelled.
diff --git a/tests/features/user/cookie_consent.feature b/tests/features/user/cookie_consent.feature
index ede8e0c98a..72e8c6ef85 100644
--- a/tests/features/user/cookie_consent.feature
+++ b/tests/features/user/cookie_consent.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: Cookie consent
In order to be compliant with the ePrivacy directive
As a product owner
@@ -7,11 +7,13 @@ Feature: Cookie consent
@javascript
Scenario: Accept or refuse cookies
Given I am an anonymous user
+ And I am on homepage
Then I should see the text "This site uses cookies to offer you a better browsing experience. Find out more on how we use cookies and how you can change your settings." in the "Cookie consent banner"
And I should see the link "I accept cookies" in the "Cookie consent banner"
And I should see the link "I refuse cookies" in the "Cookie consent banner"
Given I am logged in as a user with the "authenticated" role
+ And I am on homepage
Then I should see the text "This site uses cookies to offer you a better browsing experience. Find out more on how we use cookies and how you can change your settings." in the "Cookie consent banner"
And I should see the link "I accept cookies" in the "Cookie consent banner"
And I should see the link "I refuse cookies" in the "Cookie consent banner"
diff --git a/tests/features/user/password.feature b/tests/features/user/password.feature
index c774745e2b..d654c2c9cb 100644
--- a/tests/features/user/password.feature
+++ b/tests/features/user/password.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: Password management
As a registered user of the website
I want to be able to manage and restore my password
diff --git a/tests/features/user/profile.feature b/tests/features/user/profile.feature
index cb5a2a505b..be8deb15ed 100644
--- a/tests/features/user/profile.feature
+++ b/tests/features/user/profile.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-e
Feature: User profile
A user must be able to change his own profile.
A moderator must be able to edit any user account.
@@ -66,7 +66,7 @@ Feature: User profile
When I go to the public profile of "Leonardo Da Vinci"
Then I should see the text "Country of origin: Italy" in the "Header" region
- @terms @email
+ @terms
Scenario: A moderator can navigate to any user's profile and edit it.
Given users:
| Username | E-mail | Roles |
@@ -260,7 +260,6 @@ Feature: User profile
Then I should not see the link "Subscription settings"
And I should not see the link "Persistent Logins"
- @email
Scenario: A user, changing its E-mail should receive a notification on his old
E-mail address and a verification link on its new address.
diff --git a/tests/features/user/register.feature b/tests/features/user/register.feature
index ee49824522..2f99f156dc 100644
--- a/tests/features/user/register.feature
+++ b/tests/features/user/register.feature
@@ -1,14 +1,12 @@
-@api
+@api @group-e
Feature: User registration
As a user I must be able to register to the site and complete my user profile
and receive appropriate notifications.
- @email
Scenario: A moderator can register a user
Given users:
| Username | Roles |
| Mr. Moderator | Moderator |
- And all e-mails have been sent
And I am logged in as "Mr. Moderator"
When I am on the homepage
Then I click "People"
diff --git a/tests/features/user/roles.feature b/tests/features/user/roles.feature
index 99cd7a84ff..29f0e392f6 100644
--- a/tests/features/user/roles.feature
+++ b/tests/features/user/roles.feature
@@ -1,4 +1,4 @@
-@api @email
+@api @group-e
Feature: User role management
As a moderator I must be able to assign roles to users.
@@ -8,7 +8,6 @@ Feature: User role management
| Rick Rolls | Moderator | rick.roles@example.com |
| Nibby Noob | | nicky.noob@example.com |
| Ursus | | |
- And all e-mails have been sent
Scenario: Verify options available to the moderator.
Given I am logged in as "Rick Rolls"
@@ -37,7 +36,7 @@ Feature: User role management
| body | A moderator has edited your user profile on Joinup. Please check your profile to verify the changes done. |
Given I am on the homepage
- When all e-mails have been sent
+ When I mark all emails as read
And I click "People"
When I click "Edit" in the "Ursus" row
diff --git a/tests/features/user/search.feature b/tests/features/user/search.feature
index 827c728b6e..96e020cb14 100644
--- a/tests/features/user/search.feature
+++ b/tests/features/user/search.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-g
Feature: User management
As a moderator I must be able to search users.
diff --git a/tests/features/video/api.feature b/tests/features/video/api.feature
index 1f4e6a8bf2..daf039c2d6 100644
--- a/tests/features/video/api.feature
+++ b/tests/features/video/api.feature
@@ -1,4 +1,4 @@
-@api
+@api @group-g
Feature: Video API
In order to manage videos programmatically
As a backend developer
diff --git a/tests/features/video/embed.feature b/tests/features/video/embed.feature
index 7099dad3f4..497823bf89 100644
--- a/tests/features/video/embed.feature
+++ b/tests/features/video/embed.feature
@@ -1,4 +1,4 @@
-@api @terms
+@api @terms @group-g
Feature: Embed of videos into the page.
In order to show videos regarding my content
As a user of the website
diff --git a/tests/src/Context/DigitQaPipelineContext.php b/tests/src/Context/DigitQaPipelineContext.php
new file mode 100644
index 0000000000..1c25e8b4d3
--- /dev/null
+++ b/tests/src/Context/DigitQaPipelineContext.php
@@ -0,0 +1,69 @@
+getSuite()->getName());
+ if (!$fileSystem->exists($artifactsPath)) {
+ $fileSystem->mkdir($artifactsPath);
+ }
+ $fileSystem->chgrp($artifactsPath, getenv('DAEMON_GROUP'), TRUE);
+ $fileSystem->chmod($artifactsPath, 0775);
+ }
+ }
+
+ /**
+ * Saves the relevant logs as artifacts in case of failure.
+ *
+ * @param \Behat\Testwork\Hook\Scope\AfterSuiteScope $event
+ * The after suite scope event.
+ *
+ * @AfterSuite
+ */
+ public static function saveLogsAsArtifacts(AfterSuiteScope $event): void {
+ if (static::isDigitQaPipeline() && !$event->getTestResult()->isPassed()) {
+ $projectPath = rtrim(getenv('CI_PROJECT_DIR'), DIRECTORY_SEPARATOR);
+ $artifactsPath = static::getArtifactsPath($event->getSuite()->getName());
+ exec("{$projectPath}/vendor/bin/drush sql:dump --tables-list=watchdog --gzip --result-file={$artifactsPath}/watchdog.sql --root={$projectPath}");
+ }
+ }
+
+ /**
+ * Returns the suite artifacts path.
+ *
+ * @param string $suiteName
+ * The suite name.
+ *
+ * @return string
+ * The suite artifacts path.
+ */
+ protected static function getArtifactsPath(string $suiteName): string {
+ return rtrim(getenv('ARTIFACTS_DIR'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $suiteName;
+ }
+
+}
diff --git a/tests/features/bootstrap/FeatureContext.php b/tests/src/Context/FeatureContext.php
similarity index 98%
rename from tests/features/bootstrap/FeatureContext.php
rename to tests/src/Context/FeatureContext.php
index 318e8be58c..900254e307 100644
--- a/tests/features/bootstrap/FeatureContext.php
+++ b/tests/src/Context/FeatureContext.php
@@ -1,12 +1,9 @@
getSession()->getPage();
}
@@ -518,7 +529,10 @@ protected function assertFieldOptionSelectedInRegion(string $option, string $sel
*/
public function assertFieldRadioSelected(string $radio, string $field): void {
// Find the grouping fieldset that contains the radios field.
- $fieldset = $this->getSession()->getPage()->find('named', ['fieldset', $field]);
+ $fieldset = $this->getSession()->getPage()->find('named', [
+ 'fieldset',
+ $field,
+ ]);
if (!$field) {
throw new \Exception("The field '$field' was not found in the page.");
@@ -724,7 +738,7 @@ public function assertContextualLinkInPagePresent(string $text): void {
$links = $this->findContextualLinkPaths($region);
if (!isset($links[$text])) {
- throw new \Exception(sprintf('Contextual link %s expected but not found in the region %s', $text, $region));
+ throw new \Exception(sprintf('Contextual link %s expected but not found in page.', $text));
}
}
@@ -1393,7 +1407,6 @@ public function checkMaterialCheckbox(string $text): void {
$this->checkMaterialCheckboxHelper($this->getSession()->getPage(), $text);
}
-
/**
* Unchecks a material checkbox in a row that contains a certain text.
*
@@ -1420,8 +1433,10 @@ public function checkMaterialCheckboxInTableRow(string $text): void {
* @param string|null $text
* (optional) The checkbox label, if any. Defaults to false.
*
- * @throws \Behat\Mink\Exception\ElementNotFoundException When the checkbox cannot be found in $context.
- * @throws \Exception When the checkbox is already checked.
+ * @throws \Behat\Mink\Exception\ElementNotFoundException
+ * When the checkbox cannot be found in $context.
+ * @throws \Exception
+ * When the checkbox is already checked.
*/
protected function checkMaterialCheckboxHelper(TraversableElement $element, ?string $text = NULL): void {
$checkbox = $text ? $element->findField($text) : $element->find('css', 'input[type="checkbox"]');
@@ -1465,7 +1480,7 @@ public function uncheckMaterialCheckboxInTableRow(string $text): void {
* @throws \Exception
* When the checkbox is already unchecked.
*/
- protected function uncheckMaterialCheckboxHelper(TraversableElement $element, ?string $text = NULL): void {
+ protected function uncheckMaterialCheckboxHelper(TraversableElement $element, ?string $text = NULL): void {
$checkbox = $text ? $element->findField($text) : $element->find('css', 'input[type="checkbox"]');
if (!$checkbox) {
throw new ElementNotFoundException($this->getSession(), 'checkbox', NULL, $text);
@@ -1602,12 +1617,12 @@ public function waitForBatchProcess(): void {
* trouble with the static caching being preserved across step requests,
* because clearing the static cache too often might affect performance.
*
- * @see \Drupal\Core\Cache\DatabaseCacheTagsChecksum
- * @see https://github.com/jhedstrom/drupalextension/issues/133
- *
* @param \Behat\Behat\Hook\Scope\AfterStepScope $event
* The after step scope event.
*
+ * @see \Drupal\Core\Cache\DatabaseCacheTagsChecksum
+ * @see https://github.com/jhedstrom/drupalextension/issues/133
+ *
* @AfterStep
*/
public function clearCacheTagsStaticCache(AfterStepScope $event): void {
@@ -1688,7 +1703,10 @@ public function fillAutoCompleteField(string $field, string $value): void {
throw new \RuntimeException("Only Selenium is currently supported for typing in autocomplete fields.");
}
- $xpath = $this->getSession()->getSelectorsHandler()->selectorToXpath('named', ['field', $field]);
+ $xpath = $this->getSession()->getSelectorsHandler()->selectorToXpath('named', [
+ 'field',
+ $field,
+ ]);
try {
$element = $driver->getWebDriverSession()->element('xpath', $xpath);
}
@@ -1766,7 +1784,7 @@ public function afterErrorPageTesting(): void {
*
* @Given the site error reporting verbosity is( set to) :error_level
*/
- public function setSiteErrorLevel(string $error_level = NULL): void {
+ public function setSiteErrorLevel(?string $error_level = NULL): void {
static $original_error_level;
$config = \Drupal::configFactory()->getEditable('system.logging');
@@ -1912,17 +1930,6 @@ public function assertFormIsProtectedByAntibot(): void {
}
}
- /**
- * Cleans up the existing list of entities before the scenario starts.
- *
- * @BeforeScenario @messageCleanup&&@api
- */
- public function cleanupMessageEntities(): void {
- $message_storage = \Drupal::entityTypeManager()->getStorage('message');
- $mids = $message_storage->getQuery()->execute();
- $message_storage->delete($message_storage->loadMultiple($mids));
- }
-
/**
* Creates a backup of the Joinup `VERSION` file.
*
@@ -2002,11 +2009,13 @@ public function assertDownloadedFileContainsStrings(string $link_label, TableNod
}
// Get the path part from the URL.
- $path = trim(parse_url($url, PHP_URL_PATH), '/');
+ $path = rtrim(parse_url($url, PHP_URL_PATH), '/');
+ // Remove the base path.
+ $path = substr($path, strlen(base_path()));
// Drupal private file.
if (strpos($path, 'system/files') === 0) {
- $path = Settings::get('file_private_path') . '/' . substr($path, 12);
+ $path = Settings::get('file_private_path') . substr($path, 12);
}
// Webserver accessible file.
else {
@@ -2190,6 +2199,15 @@ public function clearFiles(AfterScenarioScope $event): void {
}
}
+ /**
+ * Cleans the mail collector before the scenario starts.
+ *
+ * @BeforeScenario @api
+ */
+ public function cleanUpEmailCollector(): void {
+ \Drupal::state()->delete('system.test_mail_collector');
+ }
+
/**
* Switch to Behat specific Drupal settings during the test suite.
*
diff --git a/tests/src/Context/HomepageContext.php b/tests/src/Context/HomepageContext.php
index 589645c3fb..aeb6ef67fe 100644
--- a/tests/src/Context/HomepageContext.php
+++ b/tests/src/Context/HomepageContext.php
@@ -53,16 +53,16 @@ public function assertExplore(TableNode $table) {
$entity = self::getEntityByLabel('rdf_entity', $expected_data['title']);
// In Joinup, "Read more" links of collections and solutions lead to the
// 'About' page.
- $read_more_url = $entity->toUrl('about-page');
+ $read_more_url = $this->getEntityUri($entity, 'about-page');
}
else {
$entity = self::getNodeByTitle($expected_data['title']);
- $read_more_url = $entity->toUrl('canonical');
+ $read_more_url = $this->getEntityUri($entity, 'canonical');
}
// Check that title links to the canonical page of the
// news, event, solution and collection.
- $xpath = '//h2/a[@href = "' . $entity->toUrl()->toString() . '" and contains(., "' . $expected_data['title'] . '")]';
+ $xpath = '//h2/a[@href = "' . $this->getEntityUri($entity) . '" and contains(., "' . $expected_data['title'] . '")]';
Assert::assertNotEmpty($actual_data->find('xpath', $xpath), sprintf('%s "%s" does not have the correct title which links to the canonical page.', $type, $expected_data['title']));
// Check the body/description text.
@@ -79,7 +79,7 @@ public function assertExplore(TableNode $table) {
// Check that a "Read more" link is present which leads to the canonical
// page of the news, event, solution and collection.
- $xpath = '//a[@href = "' . $read_more_url->toString() . '" and contains(@class, "read-more")]';
+ $xpath = '//a[@href = "' . $read_more_url . '" and contains(@class, "read-more")]';
Assert::assertNotEmpty($actual_data->find('xpath', $xpath), sprintf('%s "%s" does not have a "Read more" link which leads to the canonical page.', $type, $expected_data['title']));
}
}
diff --git a/tests/src/Context/JoinupCommunityContentContext.php b/tests/src/Context/JoinupCommunityContentContext.php
index a35ce84281..63745425d7 100644
--- a/tests/src/Context/JoinupCommunityContentContext.php
+++ b/tests/src/Context/JoinupCommunityContentContext.php
@@ -485,7 +485,7 @@ public function assertInTheSpotlight(TableNode $table) {
// Check that title links to the canonical page of the article.
$node = self::getNodeByTitle($actual_title);
- $xpath = '//h2/a[@href = "' . $node->toUrl()->toString() . '"]';
+ $xpath = '//h2/a[@href = "' . $this->getEntityUri($node) . '"]';
Assert::assertNotEmpty($actual_data->find('xpath', $xpath), sprintf('Article "%s" does not link to the canonical page.', $actual_title));
// Check that the correct number of topics are present.
@@ -507,7 +507,7 @@ public function assertInTheSpotlight(TableNode $table) {
// Check that each topic links to their canonical page.
$topic_entity = self::getEntityByLabel('taxonomy_term', $actual_topic_title, 'topic');
- $xpath = '/a[@href = "' . $topic_entity->toUrl()->toString() . '"]';
+ $xpath = '/a[@href = "' . $this->getEntityUri($topic_entity) . '"]';
Assert::assertNotEmpty($topic_element->find('xpath', $xpath), sprintf('Topic "%s" for article "%s" does not link to the canonical topic page.', $actual_topic_title, $actual_title));
}
}
diff --git a/tests/src/Context/JoinupContext.php b/tests/src/Context/JoinupContext.php
index adb11e906f..5ace99f881 100644
--- a/tests/src/Context/JoinupContext.php
+++ b/tests/src/Context/JoinupContext.php
@@ -319,7 +319,9 @@ public function submitRegistrationForm(TableNode $table, $location) {
*/
public function checkSelectContainsOptions($select, $options) {
$field = $this->findSelect($select);
- $available_options = $this->getSelectOptions($field);
+ $available_options = array_map(function (array $option): string {
+ return $option['text'];
+ }, $this->getSelectOptions($field));
$options = $this->explodeCommaSeparatedStepArgument($options);
if (array_intersect($options, $available_options) !== $options) {
@@ -342,7 +344,9 @@ public function checkSelectContainsOptions($select, $options) {
*/
public function checkSelectDoesNotContainOptions($select, $options) {
$field = $this->findSelect($select);
- $available_options = $this->getSelectOptions($field);
+ $available_options = array_map(function (array $option): string {
+ return $option['text'];
+ }, $this->getSelectOptions($field));
$options = $this->explodeCommaSeparatedStepArgument($options);
$intersection = array_intersect($available_options, $options);
@@ -383,7 +387,9 @@ public function assertSelectOptionsAsList($select, TableNode $table) {
*/
public function assertSelectOptions($select, $options) {
$field = $this->findSelect($select);
- $available_options = $this->getSelectOptions($field);
+ $available_options = array_map(function (array $option): string {
+ return $option['text'];
+ }, $this->getSelectOptions($field));
sort($available_options);
$options = $this->explodeCommaSeparatedStepArgument($options);
@@ -406,7 +412,9 @@ public function assertSelectOptions($select, $options) {
*/
public function assertSelectOptionNotAvailable($select, $options) {
$field = $this->findSelect($select);
- $available_options = $this->getSelectOptions($field);
+ $available_options = array_map(function (array $option): string {
+ return $option['text'];
+ }, $this->getSelectOptions($field));
$options = $this->explodeCommaSeparatedStepArgument($options);
Assert::assertEmpty(array_intersect($available_options, $options), "The '{$select}' select options include at least one of the given values.");
@@ -709,7 +717,13 @@ public function massageFieldsBeforeNodeCreate(BeforeNodeCreateScope $scope) {
// This will allow dynamic tests as well. `strtotime` will also be able to
// receive entries like "1 day ago" or "+1 month".
if (!is_numeric($node->published_at)) {
+ // The strtotime() PHP function is using the default timezone when doing
+ // the conversion. But we want to stick to UTC in order to avoid
+ // timezone and DST issue.
+ $timezone = date_default_timezone_get();
+ date_default_timezone_set('UTC');
$node->published_at = strtotime($node->published_at);
+ date_default_timezone_set($timezone);
}
}
@@ -1133,7 +1147,7 @@ public function assertContentOgMembership($parent, $parent_bundle, $content_bund
* @Then I (should )see the :heading tile
*/
public function assertTilePresent($heading) {
- $results = $this->getSession()->getPage()->findAll('css', '.listing__item--tile .listing__title, article.tile h2');
+ $results = $this->getSession()->getPage()->findAll('css', '.listing__item--tile .listing__title, .card .card-title, article.tile h2');
foreach ($results as $result) {
/** @var \Behat\Mink\Element\Element $result */
if ($result->getText() === $heading) {
@@ -1156,7 +1170,7 @@ public function assertTilePresent($heading) {
* @Then I (should )see :number tile(s)
*/
public function assertTileCount($number) {
- $results = $this->getSession()->getPage()->findAll('css', '.listing__item--tile .listing__title, article.tile h2');
+ $results = $this->getSession()->getPage()->findAll('css', '.listing__item--tile .listing__title, .card .card-title, article.tile h2');
$nr_found = count($results);
if ($nr_found != $number) {
throw new \Exception("Found $nr_found tiles, expected $number");
@@ -1177,7 +1191,7 @@ public function assertTileCount($number) {
public function assertTileNotPresent($heading) {
// We target the heading with "h2" instead of ".listing__title" because both
// unstyled and styled tiles use h2 as element for their titles.
- $results = $this->getSession()->getPage()->findAll('css', '.listing__item--tile h2, article.tile h2');
+ $results = $this->getSession()->getPage()->findAll('css', '.listing__item--tile h2, .card h5, article.tile h2');
foreach ($results as $result) {
/** @var \Behat\Mink\Element\Element $result */
if ($result->getText() === $heading) {
@@ -1958,7 +1972,10 @@ public function assertLinkContainsEntityUrl(string $link, string $title, string
throw new \Exception("Link '{$link}' was not found in the page.");
}
- $entity_url = $entity->toUrl()->setAbsolute()->toString();
+ // @todo Drop the base_url trick as soon as ISAICP-6648 is fixed.
+ $entity_url = $entity->toUrl('canonical', [
+ 'base_url' => $GLOBALS['base_url'],
+ ])->setAbsolute()->toString();
$href = $link_element->getAttribute('href');
Assert::assertContains(urlencode($entity_url), $href);
@@ -2927,4 +2944,82 @@ public function assertLinkIsInActiveTrail(string $link_label): void {
}
}
+ /**
+ * Shows the button in the middle of the screen.
+ *
+ * In the latest version of Selenium in docker, moving to a button element
+ * might throw this exception while the button is visible.
+ * This might be due to attempting to find the button too fast.
+ *
+ * @param string $type
+ * Type of element link/button.
+ * @param string $label
+ * The label of the radio button.
+ *
+ * @throws \Exception
+ * Thrown when an expected scroll in to view failed.
+ *
+ * @Given I scroll :type :label into view
+ */
+ public function scrollButtonIntoView(string $type, string $label): void {
+ $page = $this->getSession()->getPage();
+ $button = $page->find('named', [$type, str_replace('\\"', '"', $label)]);
+ $id = $button->getAttribute('id');
+ $function = << {
+ let elem = document.getElementById("$id");
+ elem.scrollIntoView({ behavior: 'instant', block: 'center' });
+ }, 300);
+ }
+ )()
+ JS;
+ try {
+ $this->getSession()->executeScript($function);
+ sleep(1);
+ }
+ catch (\Exception $e) {
+ throw new \Exception("Scroll element into view failed");
+ }
+ }
+
+ /**
+ * Shows the button in the middle of the screen.
+ *
+ * In the latest version of Selenium in docker, moving to a button element
+ * might throw this exception while the button is visible.
+ * This might be due to attempting to find the button too fast.
+ *
+ * @param string $label
+ * The label of the radio button.
+ *
+ * @throws \Exception
+ * Thrown when an expected scroll in to view failed.
+ *
+ * @Given I scroll the :label chip into view
+ */
+ public function scrollChipIntoView(string $label): void {
+ $css = "div.block-facets-summary-blocksearch-facets-summary li.facet-summary-item--facet a:contains('{$label}')";
+ $element = $this->getSession()->getPage()->find('css', $css);
+ $xpath = $element->getXpath();
+ $function = << {
+ let elem = document.evaluate("$xpath", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
+ elem.scrollIntoView({ behavior: 'instant', block: 'center' });
+ }, 300);
+ }
+ )()
+ JS;
+ try {
+ $this->getSession()->executeScript($function);
+ sleep(1);
+ }
+ catch (\Exception $e) {
+ throw new \Exception("Scroll element into view failed");
+ }
+ }
+
}
diff --git a/tests/src/Context/JoinupNewsContext.php b/tests/src/Context/JoinupNewsContext.php
index 0adb3c2f1b..a5e70e81a3 100644
--- a/tests/src/Context/JoinupNewsContext.php
+++ b/tests/src/Context/JoinupNewsContext.php
@@ -65,7 +65,7 @@ public function assertLatestNews(TableNode $table) {
// Check that title links to the canonical page of the news article.
$news_node = self::getNodeByTitle($actual_title, 'news');
- $xpath = '//h2/a[@href = "' . $news_node->toUrl()->toString() . '"]';
+ $xpath = '//h2/a[@href = "' . $this->getEntityUri($news_node) . '"]';
Assert::assertNotEmpty($actual_data->find('xpath', $xpath), sprintf('Article "%s" does not link to the canonical news page.', $actual_title));
// Check the date.
@@ -92,7 +92,7 @@ public function assertLatestNews(TableNode $table) {
// Check that each topic links to their canonical page.
$topic_entity = self::getEntityByLabel('taxonomy_term', $actual_topic_title, 'topic');
- $xpath = '/a[@href = "' . $topic_entity->toUrl()->toString() . '"]';
+ $xpath = '/a[@href = "' . $this->getEntityUri($topic_entity) . '"]';
Assert::assertNotEmpty($topic_element->find('xpath', $xpath), sprintf('Topic "%s" for article "%s" does not link to the canonical topic page.', $actual_topic_title, $actual_title));
}
}
diff --git a/tests/src/Context/JoinupNotificationContext.php b/tests/src/Context/JoinupNotificationContext.php
index de11b875e7..5a76498d69 100644
--- a/tests/src/Context/JoinupNotificationContext.php
+++ b/tests/src/Context/JoinupNotificationContext.php
@@ -10,7 +10,6 @@
use Drupal\DrupalExtension\TagTrait;
use Drupal\joinup\Traits\ConfigReadOnlyTrait;
use Drupal\joinup\Traits\MailCollectorTrait;
-use Drupal\joinup\Traits\MailConfigTrait;
use Drupal\joinup\Traits\UserTrait;
use Drupal\joinup\Traits\UtilityTrait;
use Drupal\message\Entity\MessageTemplate;
@@ -23,25 +22,10 @@ class JoinupNotificationContext extends RawDrupalContext {
use ConfigReadOnlyTrait;
use MailCollectorTrait;
- use MailConfigTrait;
use TagTrait;
use UserTrait;
use UtilityTrait;
- /**
- * The mail system storage settings.
- *
- * @var \Drupal\Core\Config\StorableConfigBase
- */
- protected $mailConfig;
-
- /**
- * Holds the default settings for the mail server so a revert is possible.
- *
- * @var array
- */
- protected $savedMailDefaults;
-
/**
* Asserts that an email has been sent.
*
@@ -74,8 +58,6 @@ class JoinupNotificationContext extends RawDrupalContext {
* @Then the following email should have been sent:
*/
public function assertEmailSent(TableNode $table) {
- $this->assertEmailTagPresent();
-
/** @var string $template */
/** @var string $recipient */
/** @var string $recipient_mail */
@@ -209,8 +191,6 @@ public function assertEmailSent(TableNode $table) {
* @Then the following email should not have been sent:
*/
public function assertEmailNotSent(TableNode $table) {
- $this->assertEmailTagPresent();
-
try {
// Reusing ::assertEmailSent().
$this->assertEmailSent($table);
@@ -240,8 +220,6 @@ public function assertEmailNotSent(TableNode $table) {
* @Then the email sent to :user with subject :subject contains the( following lines of) text:
*/
public function assertEmailSentAndContainsText(string $user, string $subject, TableNode $table) {
- $this->assertEmailTagPresent();
-
$lines_of_text = $table->getColumnsHash();
$user = user_load_by_name($user);
$recipient = $user->getEmail();
@@ -283,7 +261,6 @@ public function assertEmailSentAndContainsText(string $user, string $subject, Ta
* @Then the email sent to :user with subject :subject should not contain the( following lines of) text:
*/
public function assertEmailSentNotContainsText(string $user, string $subject, TableNode $table) {
- $this->assertEmailTagPresent();
$lines_of_text = $table->getColumnsHash();
$user = user_load_by_name($user);
$recipient = $user->getEmail();
@@ -308,12 +285,9 @@ public function assertEmailSentNotContainsText(string $user, string $subject, Ta
* Use this if you don't want to match on emails that have been sent earlier
* in the scenario.
*
- * @Given the mail collector cache is empty
- * @Given all (the )e-mails have been sent
+ * @Given I mark all emails as read
*/
public function clearMailCollectorCache() {
- $this->assertEmailTagPresent();
-
\Drupal::state()->set('system.test_mail_collector', []);
\Drupal::state()->resetCache();
}
@@ -330,8 +304,6 @@ public function clearMailCollectorCache() {
* @Then :count e-mail(s) should have been sent
*/
public function assertNumberOfEmailSent($count) {
- $this->assertEmailTagPresent();
-
$mails = $this->getMails();
if (count($mails) != $count) {
throw new \Exception("Invalid number of e-mail sent. Expected $count, sent " . count($mails));
@@ -351,8 +323,6 @@ public function assertNumberOfEmailSent($count) {
* @Given I click the mail change link from the email sent to :mail
*/
public function clickMailChangeLinkFromMail(string $mail): void {
- $this->assertEmailTagPresent();
-
$pattern = '#https?://[^/].*/user/mail-change/[^/].*/[^/].*/[^/].*/.*#';
$no_mail_message = "No mail change verification E-mail has been sent to $mail.";
$no_match_message = "The mail change verification E-mail doesn't contain a valid verification link.";
@@ -428,8 +398,6 @@ public function clickCommentLinkInEmail($user) {
* @When I click the link for the :filename attachment in the contact form email sent to :mail
*/
public function clickAttachmentInContactFormConfirmationMail(string $filename, string $mail): void {
- $this->assertEmailTagPresent();
-
// In case multiple files with the same name were uploaded, the File module
// will append a number to the file. Account for this.
$extension = pathinfo($filename, PATHINFO_EXTENSION);
@@ -468,8 +436,6 @@ public function clickAttachmentInContactFormConfirmationMail(string $filename, s
* find any matches.
*/
protected function assertMailLinkMatchingPattern(string $pattern, string $mail, string $no_mail_message, string $no_match_message, ?string $template = NULL): void {
- $this->assertEmailTagPresent();
-
$found = FALSE;
foreach ($this->getMails() as $mail_sent) {
// Optionally filter by mail template.
@@ -498,42 +464,4 @@ protected function assertMailLinkMatchingPattern(string $pattern, string $mail,
throw new \Exception($no_mail_message);
}
- /**
- * Swaps the mailing system settings with a test one.
- *
- * @BeforeScenario @email&&@api
- */
- public function beforeEmailScenario(): void {
- if (!$this->isTestMailCollectorUsed()) {
- // Check if the mail system configuration has been overridden in
- // settings.php or settings.override.php.
- $this->checkMailConfigOverride();
-
- self::bypassReadOnlyConfig();
- $this->mailConfig = \Drupal::configFactory()->getEditable('mailsystem.settings');
- $this->savedMailDefaults = $this->mailConfig->get('defaults.sender');
- $this->mailConfig->set('defaults.sender', 'test_mail_collector')->save();
- self::restoreReadOnlyConfig();
- }
- // Reset the mail collector by wiping any leftovers from a previous test.
- \Drupal::state()->delete('system.test_mail_collector');
- }
-
- /**
- * Restores the mailing system settings with the default one.
- *
- * @AfterScenario @email&&@api
- */
- public function afterEmailScenario(): void {
- // Temporarily bypass read only config so that we can restore the original
- // mail handler.
- if (!empty($this->savedMailDefaults)) {
- self::bypassReadOnlyConfig();
-
- $this->mailConfig->set('defaults.sender', $this->savedMailDefaults)->save();
-
- self::restoreReadOnlyConfig();
- }
- }
-
}
diff --git a/tests/src/Context/JoinupSearchContext.php b/tests/src/Context/JoinupSearchContext.php
index ba20b9113c..7f3ab6ce99 100644
--- a/tests/src/Context/JoinupSearchContext.php
+++ b/tests/src/Context/JoinupSearchContext.php
@@ -255,60 +255,6 @@ public function iClickAnInlineFacetItemLink(string $link, string $facet): void {
$this->findFacetByAlias($facet)->clickLink($link);
}
- /**
- * Clicks a facet item in an inline facet.
- *
- * @param string $select
- * The option to select.
- * @param string $facet
- * The facet alias.
- *
- * @throws \Exception
- * Thrown when the facet or the link inside the facet is not found.
- *
- * @When I select :option from the :facet select facet
- */
- public function iSelectAnOptionFromFacet(string $select, string $facet): void {
- $facet = $this->findFacetByAlias($facet, NULL, 'select');
- $facet->selectOption($select);
- }
-
- /**
- * Clicks a facet item in an inline facet form.
- *
- * @param string $select
- * The option to select.
- * @param string $facet
- * The facet alias.
- *
- * @throws \Exception
- * Thrown when the facet or the link inside the facet is not found.
- *
- * @When I select :option from the :facet select facet form
- */
- public function iSelectAnOptionFromFacetForm(string $select, string $facet): void {
- $facet = $this->findFacetByAlias($facet, NULL, 'select', TRUE);
- $facet->selectOption($select);
- }
-
- /**
- * Clicks in more facet items in an inline facet form.
- *
- * @param string $select
- * The option to select.
- * @param string $facet
- * The facet alias.
- *
- * @throws \Exception
- * Thrown when the facet or the link inside the facet is not found.
- *
- * @When I select :option option in the :facet select facet form
- */
- public function iSelectOtherOptionFromFacetForm(string $select, string $facet): void {
- $facet = $this->findFacetByAlias($facet, NULL, 'select', TRUE);
- $facet->selectOption($select, TRUE);
- }
-
/**
* Asserts a selected option in the .
*
@@ -401,6 +347,15 @@ public function assertSelectFacetOptionsAsList($select, TableNode $table) {
/**
* Asserts the list of available options in a facet select box.
*
+ * @codingStandardsIgnoreStart
+ * Table format:
+ * | Option 1 | 0 |
+ * | Option 2 | 1 |
+ * @codingStandardsIgnoreEnd
+ *
+ * The first column in the table is required and lists the options that should
+ * be available. The second, optional, column lists the expected indentation.
+ *
* @param string $select
* The name of the field element.
* @param \Behat\Gherkin\Node\TableNode $table
@@ -500,8 +455,55 @@ public function checkCheckboxFacetForm(string $option, string $facet_type): void
*/
public function iClickActionsInFacetsForm(string $name) {
$region = $this->getSession()->getPage();
- $element = $region->find('xpath', "//input[@value='{$name}']");
- $element->click();
+ $xpath = '//div[contains(concat(" ", normalize-space(@class), " "), " block-facets-form ")]//div[@data-drupal-selector="edit-actions"]';
+ $actions = $region->find('xpath', $xpath);
+
+ $element = $actions->find('css', "input[value|='{$name}']");
+ $element->submit();
+ }
+
+ /**
+ * Asserts the autocomplete items from search.
+ *
+ * This function asserts also the order of the items.
+ *
+ * @param \Behat\Gherkin\Node\TableNode $table
+ * A list of items to be present.
+ *
+ * @throws \Exception
+ * Thrown when the suggestions are not present in the page.
+ *
+ * @Then I should see the (following )search suggestion(s):
+ */
+ public function iShouldSeeTheSuggestions(TableNode $table): void {
+ $session = $this->getSession();
+ $xpath = '//ul[contains(concat(" ", normalize-space(@class), " "), "search-api-autocomplete-search")]//li';
+ $session->getPage()->waitFor(5, function () use ($session, $xpath, $table): bool {
+ $element = $this->getSearchBarElement();
+ $session->getDriver()->keyDown($element->getXpath(), '', NULL);
+ $allResults = $session->getPage()->findAll('xpath', $xpath);
+ $found = array_map(function ($item) {
+ /** @var \Behat\Mink\Element\NodeElement $item */
+ return $item->getText();
+ }, $allResults);
+
+ return $table->getColumn(0) === $found;
+ });
+ }
+
+ /**
+ * Check number of search results as featured.
+ *
+ * @param int $number
+ * Number of tiles with image.
+ *
+ * @Given I should see the :number tiles with image
+ */
+ public function numberOfTilesWithImage(int $number) {
+ $session = $this->getSession()->getPage();
+ $elements = $session->findAll('css', '.card > img');
+
+ Assert::assertSame(count($elements), $number);
}
/**
@@ -804,15 +806,14 @@ public function assertFacetSummary(string $labels): void {
* @When I should remove the following facet summary :label
*/
public function removeFacetSummary(string $label): void {
-
- $xpath = '//div[contains(concat(" ", normalize-space(@class), " "), " block-facets-summary-blocksearch-facets-summary ")]//span[text()="' . $label . '"]';
- $element = $this->getSession()->getPage()->find('xpath', $xpath);
+ $css = "div.block-facets-summary-blocksearch-facets-summary li.facet-summary-item--facet a:contains('{$label}')";
+ $element = $this->getSession()->getPage()->find('css', $css);
if (empty($element)) {
throw new \Exception("The $label facet summary item was not found in the page.");
}
-
- $element->click();
+ $remove = $element->find('css', '.js-facet-deactivate');
+ $remove->click();
}
/**
diff --git a/tests/src/Context/JoinupSeoContext.php b/tests/src/Context/JoinupSeoContext.php
index 79130ccb17..5d244d6263 100644
--- a/tests/src/Context/JoinupSeoContext.php
+++ b/tests/src/Context/JoinupSeoContext.php
@@ -239,7 +239,7 @@ protected function escapeStringWithVariables(string $string): string {
// The URL structure is very important in the SEO metatags as a wrong URL
// or an internal path could cause search engines to be misled. Thus,
// the full URL must be always asserted.
- $base_url = \Drupal::request()->getSchemeAndHttpHost();
+ $base_url = $this->getMinkParameter('base_url');
$string = preg_quote($string, '#');
$replacements = [
diff --git a/tests/src/Context/JoinupSubscriptionContext.php b/tests/src/Context/JoinupSubscriptionContext.php
index 3ceac0be29..6db0990071 100644
--- a/tests/src/Context/JoinupSubscriptionContext.php
+++ b/tests/src/Context/JoinupSubscriptionContext.php
@@ -605,8 +605,6 @@ protected function getGroupSubscriptionCardByHeading(string $heading): NodeEleme
* @Then the group content subscription digest sent to :username contains the following sections:
*/
public function assertGroupContentSubscriptionEmailSections(string $username, TableNode $table): void {
- $this->assertEmailTagPresent();
-
// Remove the table header from the array.
$expected_sections = $table->getColumn(0);
array_shift($expected_sections);
@@ -657,8 +655,6 @@ public function assertGroupContentSubscriptionEmailSections(string $username, Ta
* @Then the content subscription digest sent to :username should have the subject :subject
*/
public function assertGroupContentSubscriptionEmailSubject(string $username, string $subject): void {
- $this->assertEmailTagPresent();
-
$user = user_load_by_name($username);
$email_address = $user->getEmail();
$emails = $this->getGroupSubscriptionEmailsByEmail($email_address);
diff --git a/tests/src/Context/JoinupUserContext.php b/tests/src/Context/JoinupUserContext.php
index 6405991330..f0e5663928 100644
--- a/tests/src/Context/JoinupUserContext.php
+++ b/tests/src/Context/JoinupUserContext.php
@@ -6,11 +6,13 @@
use Behat\Gherkin\Node\TableNode;
use Drupal\Core\StringTranslation\StringTranslationTrait;
+use Drupal\Core\Url;
use Drupal\DrupalExtension\Context\RawDrupalContext;
use Drupal\DrupalExtension\Hook\Scope\BeforeUserCreateScope;
use Drupal\joinup\Traits\MailCollectorTrait;
use Drupal\joinup\Traits\UserTrait;
use Drupal\joinup\Traits\UtilityTrait;
+use Drupal\user\UserInterface;
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\ExpectationFailedException;
@@ -56,7 +58,7 @@ public function visitOneTimeLogIn(string $user): void {
throw new \Exception("User {$user->getAccountName()} was not found.");
}
- $this->visitPath(user_pass_reset_url($user) . '/login');
+ $this->visitPath($this->getOneTimeLoginUrl($user) . '/login');
}
/**
@@ -116,9 +118,8 @@ public function assertImagePresent(string $filename): void {
// files are uploaded, for example when a test is run more than once.
// We only check up to the filename and not the extension as the xpath
// itself is long enough to ensure the extension part.
- $parts = pathinfo($filename);
- $host = \Drupal::request()->getSchemeAndHttpHost();
- $filename = $parts['filename'];
+ $host = $this->getMinkParameter('base_url');
+ $filename = trim($filename, DIRECTORY_SEPARATOR);
$xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' featured__logo ') and contains(@style, 'background-image: url({$host}/sites/default/files/{$filename}')]";
$this->assertSession()->elementExists('xpath', $xpath);
}
@@ -225,4 +226,34 @@ public function userNotExists(string $name): void {
}
}
+ /**
+ * Generates a unique URL for a user to log in and reset their password.
+ *
+ * @param \Drupal\user\UserInterface $account
+ * An object containing the user account.
+ *
+ * @return string
+ * A unique URL that provides a one-time log in for the user.
+ */
+ protected function getOneTimeLoginUrl(UserInterface $account): string {
+ $timestamp = time();
+ return Url::fromRoute('user.reset', [
+ 'uid' => $account->id(),
+ 'timestamp' => $timestamp,
+ 'hash' => user_pass_rehash($account, $timestamp),
+ ],
+ [
+ 'absolute' => TRUE,
+ 'language' => \Drupal::languageManager()->getLanguage($account->getPreferredLangcode()),
+ // The base URL is derived by the Symfony request handler from
+ // the global variables set by the web server, i.e. REQUEST_URI
+ // or similar. Since Behat tests are run from the command line
+ // this request context is not available and we need to set the
+ // base URL manually.
+ // @todo Remove this workaround once this is fixed in core.
+ // @see https://www.drupal.org/project/drupal/issues/2548095
+ 'base_url' => $GLOBALS['base_url'],
+ ])->toString();
+ }
+
}
diff --git a/tests/src/Context/ModerationContext.php b/tests/src/Context/ModerationContext.php
index 00c0183724..7ab1ef965f 100644
--- a/tests/src/Context/ModerationContext.php
+++ b/tests/src/Context/ModerationContext.php
@@ -26,7 +26,9 @@ class ModerationContext extends RawDrupalContext {
*/
public function assertModerationPreviewContainsText($title, $text) {
$node = $this->getEntityByLabel('node', $title);
- $xpath = '//h2/a[@href = "' . $node->toUrl()->toString() . '"]/ancestor::article';
+ $xpath = '//h2/a[@href = "' . $node->toUrl('canonical', [
+ 'base_url' => rtrim($GLOBALS['base_path'], '/'),
+ ])->toString() . '"]/ancestor::article';
$this->assertSession()->elementTextContains('xpath', $xpath, $text);
}
@@ -42,7 +44,9 @@ public function assertModerationPreviewContainsText($title, $text) {
*/
public function clickLinkInModerationPreview($link_text, $title) {
$node = $this->getEntityByLabel('node', $title);
- $xpath = '//h2/a[@href = "' . $node->toUrl()->toString() . '"]/ancestor::article//a[text() = "' . $link_text . '"]';
+ $xpath = '//h2/a[@href = "' . $node->toUrl('canonical', [
+ 'base_url' => rtrim($GLOBALS['base_path'], '/'),
+ ])->toString() . '"]/ancestor::article//a[text() = "' . $link_text . '"]';
$this->assertSession()->elementExists('xpath', $xpath)->click();
}
diff --git a/tests/src/Context/ScreenshotContext.php b/tests/src/Context/ScreenshotContext.php
index f074c974ea..f882dd0165 100644
--- a/tests/src/Context/ScreenshotContext.php
+++ b/tests/src/Context/ScreenshotContext.php
@@ -84,8 +84,8 @@ public function __construct(?string $localDir = NULL, ?string $s3Dir = NULL, ?st
* @Then I take a screenshot :name
*/
public function takeScreenshot(?string $name = NULL): void {
- $message = "Screenshot created in @file_name";
- $this->createScreenshot($name, $message);
+ $message = "Screenshot: @file_name";
+ $this->createScreenshots($name, $message);
}
/**
@@ -94,9 +94,9 @@ public function takeScreenshot(?string $name = NULL): void {
* @Then I take a screenshot
*/
public function takeScreenshotUnnamed(): void {
- $file_name = 'behat-screenshot-' . user_password();
- $message = "Screenshot created in @file_name";
- $this->createScreenshot($file_name, $message);
+ $file_name = 'screenshot-' . user_password();
+ $message = "Screenshot: @file_name";
+ $this->createScreenshots($file_name, $message);
}
/**
@@ -121,16 +121,9 @@ public function screenshotForPhpNotices(AfterStepScope $event): void {
$context->assertNotWarningMessage('Notice:');
}
catch (ExpectationException $e) {
- // Use the step test in the filename.
- $step = $event->getStep();
- $file_name = str_replace(' ', '_', $step->getKeyword() . '_' . $step->getText());
- $file_name = preg_replace('![^0-9A-Za-z_.-]!', '', $file_name);
- $file_name = substr($file_name, 0, 30);
- $file_name = 'behat-notice__' . $file_name;
-
- $message = "PHP notice detected, screenshot taken: @file_name";
- $this->createScreenshot($file_name, $message);
- // We don't throw $e any more because we don't fail on the notice.
+ $message = "{$this->getStepLine($event)} screenshot: @file_name";
+ $this->createScreenshots($this->buildScreenshotFileName('php-notice', $event), $message, $event->getSuite()->getName());
+ // We don't throw $e anymore because we don't fail on the notice.
}
}
}
@@ -149,17 +142,10 @@ public function screenshotForPhpNotices(AfterStepScope $event): void {
* @AfterStep
*/
public function takeScreenshotAfterFailedStep(AfterStepScope $event): void {
- if ($event->getTestResult()->isPassed()) {
- // Not a failed step.
- return;
+ if (!$event->getTestResult()->isPassed()) {
+ $message = "{$this->getStepLine($event)} screenshot: @file_name";
+ $this->createScreenshots($this->buildScreenshotFileName('failed', $event), $message, $event->getSuite()->getName());
}
- $step = $event->getStep();
- $file_name = str_replace(' ', '_', $step->getKeyword() . '_' . $step->getText());
- $file_name = preg_replace('![^0-9A-Za-z_.-]!', '', $file_name);
- $file_name = substr($file_name, 0, 30);
- $file_name = 'behat-failed__' . $file_name;
- $message = "Screenshot for failed step created in @file_name";
- $this->createScreenshot($file_name, $message);
}
/**
@@ -168,18 +154,14 @@ public function takeScreenshotAfterFailedStep(AfterStepScope $event): void {
* @param string $file_name
* The filename of the screenshot (complete).
* @param string $message
- * The message to be printed. '@file_name' will be replaced with $file_name.
+ * The message to be printed.
+ * @param string|null $suite_name
+ * (optional) Suite name. Passed only from hook callers.
*/
- public function createScreenshot(string $file_name, string $message): void {
+ protected function createScreenshots(string $file_name, string $message, ?string $suite_name = NULL): void {
try {
- if ($this->getSession()->getDriver() instanceof Selenium2Driver) {
- $file_name .= '.png';
- $screenshot = $this->getSession()->getDriver()->getScreenshot();
- }
- else {
- $file_name .= '.html';
- $screenshot = $this->getSession()->getPage()->getContent();
- }
+ $screenshot = $this->getSession()->getPage()->getContent();
+ $this->storeScreenshot($screenshot, "{$file_name}.html", $message, $suite_name);
}
catch (DriverException $e) {
// A DriverException might occur if no page has been loaded yet so no
@@ -188,19 +170,41 @@ public function createScreenshot(string $file_name, string $message): void {
return;
}
- // Save the screenshot locally.
- $path = $this->save($screenshot, $file_name);
+ // For Selenium tests, create an additional .png screenshot.
+ if ($this->getSession()->getDriver() instanceof Selenium2Driver) {
+ try {
+ $screenshot = $this->getSession()->getDriver()->getScreenshot();
+ $this->storeScreenshot($screenshot, "{$file_name}.png", $message, $suite_name);
+ }
+ catch (DriverException $e) {
+ // If the .html screenshot was successful, do nothing.
+ }
+ }
+
+ // Depending on the output formatter used, Behat will suppress any output
+ // generated during the test. Flush the output buffers so out message will
+ // show up in the test logs.
+ ob_flush();
+ }
+ /**
+ * Stores the screenshot locally and, optionally, in S3.
+ *
+ * @param string $screenshot
+ * The screenshot content.
+ * @param string $file_name
+ * The filename of the screenshot (complete).
+ * @param string $message
+ * The message to be printed.
+ * @param string|null $suite_name
+ * (optional) Suite name. Passed only from hook callers.
+ */
+ protected function storeScreenshot(string $screenshot, string $file_name, string $message, ?string $suite_name = NULL): void {
+ // Save the screenshot locally.
+ $path = $this->save($screenshot, $file_name, $suite_name);
// Upload the screenshot to Amazon S3.
$this->upload($screenshot, $file_name);
-
- if ($message) {
- print strtr($message, ['@file_name' => $path ?: $file_name]);
- // Depending on the output formatter used, Behat will suppress any output
- // generated during the test. Flush the output buffers so out message will
- // show up in the test logs.
- ob_flush();
- }
+ print strtr($message, ['@file_name' => $path ?: $file_name]);
}
/**
@@ -210,6 +214,8 @@ public function createScreenshot(string $file_name, string $message): void {
* The screenshot data.
* @param string $file_name
* The file name.
+ * @param string|null $suite_name
+ * (optional) If passed, will be used to build the screenshot file path.
*
* @return string|null
* The saved screenshot path.
@@ -217,7 +223,7 @@ public function createScreenshot(string $file_name, string $message): void {
* @throws \Exception
* Thrown if the destination folder doesn't exist and couldn't be created.
*/
- protected function save(string $screenshot, string $file_name): ?string {
+ protected function save(string $screenshot, string $file_name, ?string $suite_name = NULL): ?string {
// Don't attempt to save the screenshot if no folder name has been
// configured.
if (empty($this->localDir)) {
@@ -225,13 +231,17 @@ protected function save(string $screenshot, string $file_name): ?string {
}
// Ensure the directory exists.
- $dir = rtrim($this->localDir, '/');
+ $dir = rtrim($this->localDir, DIRECTORY_SEPARATOR);
+ if ($suite_name) {
+ $dir .= DIRECTORY_SEPARATOR . $suite_name;
+ }
+
if (!is_dir($dir)) {
if (!mkdir($dir, 0755, TRUE)) {
throw new \Exception("The '$dir' folder does not exist and could not be created.");
}
}
- $path = $this->localDir . DIRECTORY_SEPARATOR . $file_name;
+ $path = $dir . DIRECTORY_SEPARATOR . $file_name;
file_put_contents($path, $screenshot);
return $path;
@@ -280,4 +290,34 @@ protected function getS3Client(): S3ClientInterface {
]);
}
+ /**
+ * Builds a filename from the feature path and failed step line.
+ *
+ * @param string $type
+ * The type of event (failure, PHP notice, etc).
+ * @param \Behat\Behat\Hook\Scope\AfterStepScope $event
+ * The after step event.
+ *
+ * @return string
+ * The screenshot filename.
+ */
+ protected function buildScreenshotFileName(string $type, AfterStepScope $event): string {
+ $step_line = str_replace('/', '--', ltrim(substr($event->getFeature()->getFile(), strlen($event->getEnvironment()->getSuite()->getSetting('paths')[0])), '/'));
+ return "{$type}--{$step_line}--{$event->getStep()->getLine()}";
+ }
+
+ /**
+ * Returns a concatenation of the feature file name and the failed step line.
+ *
+ * @param \Behat\Behat\Hook\Scope\AfterStepScope $event
+ * The after step event.
+ *
+ * @return string
+ * A concatenation of the feature file name and the failed step line.
+ */
+ protected function getStepLine(AfterStepScope $event): string {
+ // Remove the common path for readability reasons.
+ return ltrim(substr($event->getFeature()->getFile(), strlen($event->getEnvironment()->getSuite()->getSetting('paths')[0])), '/') . ":{$event->getStep()->getLine()}";
+ }
+
}
diff --git a/tests/src/Context/SolutionContext.php b/tests/src/Context/SolutionContext.php
index d5da167644..9be31be689 100644
--- a/tests/src/Context/SolutionContext.php
+++ b/tests/src/Context/SolutionContext.php
@@ -877,7 +877,7 @@ public function assertHighlightedSolution(string $label): void {
Assert::assertEquals($solution->label(), $actual_title, sprintf('Expected the highlighted solution to have the title "%s" but instead found "%s".', $solution->label(), $actual_title));
// Check that title links to the canonical page of the solution.
- $xpath = '//h2/a[@href = "' . $solution->toUrl()->toString() . '"]';
+ $xpath = '//h2/a[@href = "' . $this->getEntityUri($solution) . '"]';
Assert::assertNotEmpty($block_element->find('xpath', $xpath), sprintf('Solution "%s" does not link to the canonical page.', $actual_title));
// Retrieve the topics from the solution, limiting the result to maximum 2
@@ -897,7 +897,7 @@ public function assertHighlightedSolution(string $label): void {
Assert::assertEquals($topic->label(), $actual_topic_title, sprintf('Expected topic #%d to be "%s" in the "Highlighted solution" section but instead found "%s".', $j + 1, $topic->label(), $actual_topic_title));
// Check that each topic links to their canonical page.
- $xpath = '/a[@href = "' . $topic->toUrl()->toString() . '"]';
+ $xpath = '/a[@href = "' . $this->getEntityUri($topic) . '"]';
Assert::assertNotEmpty($topic_element->find('xpath', $xpath), sprintf('Topic "%s" in the "Highlighted solution" section does not link to the canonical topic page.', $actual_topic_title));
}
diff --git a/tests/src/ContextualLinksHelper.php b/tests/src/ContextualLinksHelper.php
index 50a0bec96e..02aec68dbc 100644
--- a/tests/src/ContextualLinksHelper.php
+++ b/tests/src/ContextualLinksHelper.php
@@ -114,7 +114,7 @@ protected function generateContextualLinks(TraversableElement $element): array {
}
// @see Drupal.behaviors.contextual.attach(), contextual.js
- $client->request('POST', '/contextual/render', [
+ $client->request('POST', base_path() . 'contextual/render', [
'ids' => $ids,
'tokens' => $tokens,
]);
@@ -170,7 +170,7 @@ protected function findContextualLinkElements(TraversableElement $element): arra
$this->openContextualLinksMenu($element);
$link_list = $element->find('css', '.contextual ul.contextual-links');
- return $link_list->findAll('xpath', '//a');
+ return $link_list->findAll('css', 'a');
}
/**
@@ -241,26 +241,28 @@ protected function openContextualLinksMenu(TraversableElement $element): void {
*
* @param \Behat\Mink\Element\TraversableElement $element
* The element that contains the contextual link menu.
- * @param string $link
+ * @param string $link_title
* The link title.
*/
- public function clickContextualLink(TraversableElement $element, string $link): void {
+ public function clickContextualLink(TraversableElement $element, string $link_title): void {
$links = $this->findContextualLinkPaths($element);
- if (!isset($links[$link])) {
- throw new \RuntimeException("Contextual link '$link' not found.");
+ if (!isset($links[$link_title])) {
+ throw new \RuntimeException("Contextual link '$link_title' not found.");
}
// If we are not in a real browser, visit the link path instead of actually
// opening the contextual menu and clicking the link.
if ($this->browserSupportsJavaScript()) {
$this->openContextualLinksMenu($element);
- $link_element = $this->findContextualLinkElement($element, $link);
- $link_element->focus();
+ $link_element = $this->findContextualLinkElement($element, $link_title);
$link_element->click();
}
else {
- $this->getSession()->visit($this->locatePath($links[$link]));
+ $link = $links[$link_title];
+ // Remove the base path.
+ $link = substr($link, strlen(base_path()) - 1);
+ $this->getSession()->visit($this->locatePath($link));
}
}
diff --git a/tests/src/Traits/EntityTrait.php b/tests/src/Traits/EntityTrait.php
index e9ec610d45..a764bf9e60 100644
--- a/tests/src/Traits/EntityTrait.php
+++ b/tests/src/Traits/EntityTrait.php
@@ -232,4 +232,32 @@ public function visitEntityForm(string $action, string $title, string $bundle):
$this->visitPath($path);
}
+ /**
+ * Returns the URI of the given entity, prefixed with the base path.
+ *
+ * Since Behat tests are run from the CLI the base path (which is normally
+ * provided as an environment variable by the webserver) is not available on
+ * the Symfony router object which is used by Drupal to construct the URI.
+ * This returns the URI prefixed with the base path which is set as a global
+ * variable in Drupal by the Behat Drupal Extension.
+ *
+ * @param \Drupal\Core\Entity\EntityInterface $entity
+ * The entity for which to return the URI.
+ * @param string $rel
+ * The link relationship type, for example: canonical or edit-form.
+ * @param array $options
+ * See \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() for
+ * the available options.
+ *
+ * @return string
+ * The URI.
+ *
+ * @throws \Drupal\Core\Entity\EntityMalformedException
+ * When the entity doesn't have an ID yet.
+ */
+ protected function getEntityUri(EntityInterface $entity, string $rel = 'canonical', array $options = []): string {
+ $base_path = rtrim(base_path(), '/');
+ return $base_path . $entity->toUrl($rel, $options)->toString();
+ }
+
}
diff --git a/tests/src/Traits/MailCollectorTrait.php b/tests/src/Traits/MailCollectorTrait.php
index 459cac5a42..43924adbaa 100644
--- a/tests/src/Traits/MailCollectorTrait.php
+++ b/tests/src/Traits/MailCollectorTrait.php
@@ -6,7 +6,6 @@
use Drupal\Component\Render\MarkupInterface;
use Drupal\user\UserInterface;
-use PHPUnit\Framework\Assert;
/**
* Contains utility methods.
@@ -93,8 +92,6 @@ protected function getUserMails(UserInterface $user): array {
* Thrown if no emails are found or no user exists with the given data.
*/
protected function getEmailsBySubjectAndMail(string $subject, string $recipient_mail, bool $strict = TRUE): array {
- $this->assertEmailTagPresent();
-
$mails = $this->getMails();
if (empty($mails)) {
throw new \Exception('No mail was sent.');
@@ -120,18 +117,6 @@ protected function getEmailsBySubjectAndMail(string $subject, string $recipient_
return $emails_found;
}
- /**
- * Checks if the current scenario or feature has the @email tag.
- *
- * Call this in steps that use the test mail collector so that the developer
- * is alerted if this tag is not present.
- */
- protected function assertEmailTagPresent(): void {
- \assert(method_exists($this, 'getTags'), __METHOD__ . ' depends on TagTrait. Please include it in your class.');
- $tags = $this->getTags();
- Assert::assertTrue(in_array('email', $tags), '@email tag is missing, it should be added to the scenario or feature');
- }
-
/**
* Returns all collected emails.
*
diff --git a/tests/src/Traits/MailConfigTrait.php b/tests/src/Traits/MailConfigTrait.php
deleted file mode 100644
index df593b8f5b..0000000000
--- a/tests/src/Traits/MailConfigTrait.php
+++ /dev/null
@@ -1,55 +0,0 @@
- 'interface.default',
- 'mailsystem.settings' => 'defaults.sender',
- ];
-
- /**
- * Checks if configs are overridden in settings.php, settings.override.php.
- *
- * @throws \Exception
- * When mail configurations were overridden.
- */
- protected function checkMailConfigOverride(): void {
- $config_factory = \Drupal::configFactory();
- foreach (static::$mailOverridableConfigurations as $config_name => $config_path) {
- if ($config_factory->get($config_name)->hasOverrides($config_path)) {
- throw new \Exception("Cannot inspect emails since '{$config_name}:{$config_path}' is overridden in settings.php or settings.override.php.");
- }
- }
- }
-
- /**
- * Checks if the test mail collector is currently used.
- *
- * @return bool
- * TRUE if the testing mail collector is used.
- */
- protected function isTestMailCollectorUsed(): bool {
- $config_factory = \Drupal::configFactory();
- $is_test_mail_collector_used = TRUE;
- foreach (static::$mailOverridableConfigurations as $config_name => $config_path) {
- if ($config_factory->get($config_name)->get($config_path) !== 'test_mail_collector') {
- $is_test_mail_collector_used = FALSE;
- break;
- }
- }
- return $is_test_mail_collector_used;
- }
-
-}
diff --git a/tests/src/Traits/TraversingTrait.php b/tests/src/Traits/TraversingTrait.php
index 8ec24f302e..5e462e48c0 100644
--- a/tests/src/Traits/TraversingTrait.php
+++ b/tests/src/Traits/TraversingTrait.php
@@ -115,18 +115,23 @@ protected function assertSelectedOption(NodeElement $element, string $expected):
* identical.
*/
protected function assertSelectAvailableOptions(NodeElement $element, TableNode $table): void {
- $available_options = $this->getSelectOptions($element);
- $rows = $table->getColumn(0);
-
// Ignore duplicated whitespace.
$strip_multiple_spaces = function (string $option): string {
- $option = preg_replace("/\s{2,}/", " ", $option);
- return $option;
+ return preg_replace("/\s{2,}/", " ", $option);
};
- $available_options = array_map($strip_multiple_spaces, $available_options);
- $rows = array_map($strip_multiple_spaces, $rows);
- Assert::assertEquals($rows, $available_options);
+ $actual_options = $this->getSelectOptions($element);
+ $expected_options = $table->getTable();
+
+ foreach ($expected_options as $expected_option) {
+ $actual_option = array_shift($actual_options);
+
+ Assert::assertEquals($strip_multiple_spaces($expected_option[0]), $strip_multiple_spaces($actual_option['text']));
+
+ if (isset($expected_option[1])) {
+ Assert::assertEquals($expected_option[1], $actual_option['indentation']);
+ }
+ }
}
/**
@@ -136,13 +141,19 @@ protected function assertSelectAvailableOptions(NodeElement $element, TableNode
* The select element.
*
* @return array
- * The options text keyed by option value.
+ * The options as a structured array keyed by option value, with the
+ * following elements:
+ * - text: The option text.
+ * - indentation: The indentation level.
*/
protected function getSelectOptions(NodeElement $select): array {
$options = [];
foreach ($select->findAll('xpath', '//option') as $element) {
/** @var \Behat\Mink\Element\NodeElement $element */
- $options[] = trim($element->getText());
+ $options[] = [
+ 'text' => trim($element->getText()),
+ 'indentation' => substr_count($element->getHtml(), ' '),
+ ];
}
return $options;
@@ -237,10 +248,10 @@ protected function getTiles($region = NULL): array {
$result = [];
// @todo The `.listing__item--tile` selector is part of the original Joinup
// theme and can be removed once we have fully migrated to the new theme.
- foreach ($regionObj->findAll('css', '.listing__item--tile, article.tile') as $element) {
+ foreach ($regionObj->findAll('css', '.listing__item--tile, .card, article.tile') as $element) {
// @todo The `.listing__title` selector is part of the original Joinup
// theme and can be removed once we migrated to the new theme.
- $title_element = $element->find('css', ' .listing__title, h2 a');
+ $title_element = $element->find('css', ' .listing__title, .card-title, h2 a');
// Some tiles don't have a title, like the one to create a new collection
// in the collections page.
if ($title_element) {
@@ -294,7 +305,7 @@ protected function getListingByHeading(string $type, string $heading): NodeEleme
// @todo This can be removed once we are fully migrated to the new theme.
$xpath = '//*[@class and contains(concat(" ", normalize-space(@class), " "), " ' . $type . ' ")]';
// That have a heading with the specified text.
- $xpath .= '[.//*[@class and contains(concat(" ", normalize-space(@class), " "), " listing__title ")][normalize-space()="' . $heading . '"]]';
+ $xpath .= '[.//*[@class and contains(concat(" ", normalize-space(@class), " "), " listing__title ") or contains(concat(" ", normalize-space(@class), " "), " card-title ")][normalize-space()="' . $heading . '"]]';
$item = $this->getSession()->getPage()->find('xpath', $xpath);
diff --git a/web/.eslintrc.json b/web/.eslintrc.json
index d4bbc92052..35ad9123de 100644
--- a/web/.eslintrc.json
+++ b/web/.eslintrc.json
@@ -1,3 +1,59 @@
{
- "extends": "./core/.eslintrc.json"
+ // This is copied from Drupal 9.3 which is the version in which YAML linting
+ // was introduced. Once we are on Drupal 9.3, allow this file to be scaffolded
+ // again by drupal-scaffold. It is currently excluded from scaffolding in
+ // `composer.json`.
+ "extends": [
+ "airbnb",
+ "plugin:prettier/recommended",
+ "plugin:yml/recommended"
+ ],
+ "root": true,
+ "env": {
+ "browser": true,
+ "es6": true,
+ "node": true
+ },
+ "globals": {
+ "Drupal": true,
+ "drupalSettings": true,
+ "drupalTranslations": true,
+ "jQuery": true,
+ "_": true,
+ "Cookies": true,
+ "Backbone": true,
+ "Modernizr": true,
+ "Popper": true,
+ "Shepherd": true,
+ "Sortable": true,
+ "once": true,
+ "CKEDITOR": true,
+ "tabbable": true
+ },
+ "settings": {
+ "react": {
+ "version": "latest"
+ }
+ },
+ "rules": {
+ "prettier/prettier": "error",
+ "consistent-return": ["off"],
+ "no-underscore-dangle": ["off"],
+ "max-nested-callbacks": ["warn", 3],
+ "import/no-mutable-exports": ["warn"],
+ "no-plusplus": ["warn", {
+ "allowForLoopAfterthoughts": true
+ }],
+ "no-param-reassign": ["off"],
+ "no-prototype-builtins": ["off"],
+ "valid-jsdoc": ["warn", {
+ "prefer": {
+ "returns": "return",
+ "property": "prop"
+ },
+ "requireReturn": false
+ }],
+ "no-unused-vars": ["warn"],
+ "operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }]
+ }
}
diff --git a/web/modules/custom/collection/js/subscribe-dialog.js b/web/modules/custom/collection/js/subscribe-dialog.js
index 49f207d87e..1a1aa52fda 100644
--- a/web/modules/custom/collection/js/subscribe-dialog.js
+++ b/web/modules/custom/collection/js/subscribe-dialog.js
@@ -16,7 +16,7 @@
const sparql_encoded_id = drupalSettings.joinGroupData.sparqlEncodedId;
if (!!sparql_encoded_id) {
Drupal.ajax({
- url: '/ajax/collection/' + sparql_encoded_id + '/subscribe/auth',
+ url: drupalSettings.path.baseUrl + 'ajax/collection/' + sparql_encoded_id + '/subscribe/auth',
}).execute();
}
}
diff --git a/web/modules/custom/custom_page/src/Form/OgMenuInstanceForm.php b/web/modules/custom/custom_page/src/Form/OgMenuInstanceForm.php
index 1df745bcf8..e73fd97559 100644
--- a/web/modules/custom/custom_page/src/Form/OgMenuInstanceForm.php
+++ b/web/modules/custom/custom_page/src/Form/OgMenuInstanceForm.php
@@ -290,8 +290,13 @@ protected function buildOverviewTreeForm($tree, $delta) {
'#default_value' => $link->getParent(),
];
+ $pathinfo = $link->getUrlObject()->toString();
+ // @todo Remove this workaround once this is fixed in core.
+ // @see https://www.drupal.org/project/drupal/issues/2548095
+ $pathinfo = substr($pathinfo, strlen(base_path()) - 1);
+
// Disable nesting of links that are not pointing to nodes.
- $route_info = $this->urlMatcher->match($link->getUrlObject()->toString());
+ $route_info = $this->urlMatcher->match($pathinfo);
if ($route_info['_route'] !== 'entity.node.canonical') {
// Force parent value to be empty. This will disable any value
// submission for this form element, thus disallowing any parent to
diff --git a/web/modules/custom/joinup_core/joinup_core.info.yml b/web/modules/custom/joinup_core/joinup_core.info.yml
index 8ffca197e8..64f9e5e3ca 100644
--- a/web/modules/custom/joinup_core/joinup_core.info.yml
+++ b/web/modules/custom/joinup_core/joinup_core.info.yml
@@ -11,6 +11,7 @@ dependencies:
- 'matomo_reporting_api:matomo_reporting_api'
- 'message:message'
- 'message_notify:message_notify'
+ - 'monolog:monolog'
- 'og:og'
- 'rdf_entity:rdf_draft'
- 'rdf_entity:rdf_entity'
diff --git a/web/modules/custom/joinup_core/joinup_core.install b/web/modules/custom/joinup_core/joinup_core.install
index d3df5382e4..9de525c909 100644
--- a/web/modules/custom/joinup_core/joinup_core.install
+++ b/web/modules/custom/joinup_core/joinup_core.install
@@ -112,3 +112,13 @@ function joinup_core_update_0107500(): void {
->condition('name', 'password_policy.password_policy.generic_policy')
->execute();
}
+
+/**
+ * Anticipate 'search_api.server.solr_unpublished' deletion.
+ */
+function joinup_core_update_0107501(): void {
+ \Drupal::database()->delete('config')
+ ->condition('collection', '')
+ ->condition('name', 'search_api.server.solr_unpublished')
+ ->execute();
+}
diff --git a/web/modules/custom/joinup_core/joinup_core.monolog.services.yml b/web/modules/custom/joinup_core/joinup_core.monolog.services.yml
new file mode 100644
index 0000000000..9b451fbe0c
--- /dev/null
+++ b/web/modules/custom/joinup_core/joinup_core.monolog.services.yml
@@ -0,0 +1,28 @@
+parameters:
+
+ monolog.channel_handlers:
+ default: ['default_handler']
+ php: ['php_handler']
+
+ monolog.processors:
+ - message_placeholder
+ - current_user
+ - request_uri
+ - ip
+ - referer
+ - error_page_error_uuid
+
+services:
+
+ monolog.handler.default_handler:
+ class: Monolog\Handler\RotatingFileHandler
+ # The parameter is set in \Drupal\joinup_core\JoinupCoreServiceProvider
+ arguments: ['%joinup_core.monolog.paths.default_handler%', 10, '100']
+
+ monolog.handler.php_handler:
+ class: Monolog\Handler\RotatingFileHandler
+ # The parameter is set in \Drupal\joinup_core\JoinupCoreServiceProvider
+ arguments: ['%joinup_core.monolog.paths.php_handler%', 10, '400']
+
+ monolog.processor.error_page_error_uuid:
+ class: Drupal\joinup_core\Logger\Processor\ErrorPageErrorUuidProcessor
diff --git a/web/modules/custom/joinup_core/src/JoinupCoreServiceProvider.php b/web/modules/custom/joinup_core/src/JoinupCoreServiceProvider.php
new file mode 100644
index 0000000000..d1431b0aef
--- /dev/null
+++ b/web/modules/custom/joinup_core/src/JoinupCoreServiceProvider.php
@@ -0,0 +1,32 @@
+setParameter("joinup_core.monolog.paths.{$handler}", $path);
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/web/modules/custom/joinup_core/src/JoinupVersion.php b/web/modules/custom/joinup_core/src/JoinupVersion.php
index da1950e1bc..0a738983f8 100644
--- a/web/modules/custom/joinup_core/src/JoinupVersion.php
+++ b/web/modules/custom/joinup_core/src/JoinupVersion.php
@@ -9,11 +9,18 @@
/**
* A service that retrieves the current Joinup version.
*
- * The version is saved during composer install in a `VERSION` file in the root
- * folder of the project.
+ * The version is saved during building the codebase in a `VERSION` file, in the
+ * root folder of the project.
*/
class JoinupVersion implements JoinupVersionInterface {
+ /**
+ * Pseudo version used when a real version cannot be determined.
+ *
+ * @var string
+ */
+ const UNTAGGED = 'untagged.version';
+
/**
* The current Joinup version.
*
@@ -27,7 +34,7 @@ class JoinupVersion implements JoinupVersionInterface {
public function getVersion(): string {
if (empty($this->version)) {
$path = JoinupVersionInterface::PATH;
- $this->version = file_exists($path) ? $this->version = trim(file_get_contents($path)) : 'untagged.version';
+ $this->version = file_exists($path) ? trim(file_get_contents($path)) : static::UNTAGGED;
// Sanitize the version string. This is perhaps overkill since if a hacker
// can access the version file we are in big trouble anyway. In any case
@@ -48,18 +55,17 @@ public function getUrl(): Url {
// If a development version is checked out, return a link to the currently
// checked out commit.
if (preg_match('/^.+-\d+-g([a-f0-9]+)$/', $version, $matches) === 1) {
- return Url::fromUri('https://github.com/ec-europa/joinup-dev/commit/' . $matches[1]);
+ return Url::fromUri('https://git.fpfis.eu/digit/digit-joinup-dev/-/commit/' . $matches[1]);
}
// If the current version could not be determined, return a link to the
// releases page on Github.
- if ($version === 'n/a') {
- return Url::fromUri('https://github.com/ec-europa/joinup-dev/releases');
+ if ($version === static::UNTAGGED) {
+ return Url::fromUri('https://git.fpfis.eu/digit/digit-joinup-reference/-/tags');
}
- // If a tag is checked out, return a link to the release that matches the
- // tag.
- return Url::fromUri('https://github.com/ec-europa/joinup-dev/releases/tag/' . $version);
+ // If a tag is checked out, return a link to the matching release.
+ return Url::fromUri('https://git.fpfis.eu/digit/digit-joinup-reference/-/tags/' . $version);
}
}
diff --git a/web/modules/custom/joinup_core/src/Logger/Processor/ErrorPageErrorUuidProcessor.php b/web/modules/custom/joinup_core/src/Logger/Processor/ErrorPageErrorUuidProcessor.php
new file mode 100644
index 0000000000..9143952fbe
--- /dev/null
+++ b/web/modules/custom/joinup_core/src/Logger/Processor/ErrorPageErrorUuidProcessor.php
@@ -0,0 +1,22 @@
+add(new \DateInterval("P{$threshold}Y"))->getTimestamp();
}
diff --git a/web/modules/custom/joinup_core/src/Plugin/Field/FieldType/ReportLinkItem.php b/web/modules/custom/joinup_core/src/Plugin/Field/FieldType/ReportLinkItem.php
index 16d1b95dae..d211f80461 100644
--- a/web/modules/custom/joinup_core/src/Plugin/Field/FieldType/ReportLinkItem.php
+++ b/web/modules/custom/joinup_core/src/Plugin/Field/FieldType/ReportLinkItem.php
@@ -76,15 +76,17 @@ public function set($property_name, $value, $notify = TRUE) {
protected function computeValue() {
$entity = $this->getEntity();
if (!$entity->isNew()) {
- $url = $this->getEntity()->toUrl()->toString();
+ $system_path = $this->getEntity()->toUrl()->getInternalPath();
+ $path = \Drupal::service('path_alias.manager')->getAliasByPath("/$system_path");
$value = [
'uri' => 'internal:/contact',
'title' => $this->t('Report abusive content'),
'options' => [
'query' => [
'category' => 'report',
- 'uri' => $url,
- 'destination' => $url,
+ 'uri' => $path,
+ // Remove the leading slash.
+ 'destination' => substr($path, 1),
],
],
];
diff --git a/web/modules/custom/joinup_core/src/Plugin/Mail/NullMailer.php b/web/modules/custom/joinup_core/src/Plugin/Mail/NullMailer.php
new file mode 100644
index 0000000000..5cc94a1264
--- /dev/null
+++ b/web/modules/custom/joinup_core/src/Plugin/Mail/NullMailer.php
@@ -0,0 +1,34 @@
+restoreMailSettings();
- }
-
/**
* Tests that the active and sync stores are the same.
*/
@@ -46,13 +32,4 @@ public function testConfig(): void {
$this->assertEmpty($diff, 'Differences between active and sync stores for: ' . implode(', ', $diff));
}
- /**
- * {@inheritdoc}
- */
- public function tearDown(): void {
- // Re-enable mail collection.
- $this->startMailCollection();
- parent::tearDown();
- }
-
}
diff --git a/web/modules/custom/joinup_core/tests/src/ExistingSite/OutdatedContentTest.php b/web/modules/custom/joinup_core/tests/src/ExistingSite/OutdatedContentTest.php
index 6e265a8791..98b1be53d0 100644
--- a/web/modules/custom/joinup_core/tests/src/ExistingSite/OutdatedContentTest.php
+++ b/web/modules/custom/joinup_core/tests/src/ExistingSite/OutdatedContentTest.php
@@ -20,7 +20,7 @@ class OutdatedContentTest extends JoinupExistingSiteTestBase {
/**
* The current time.
*
- * @var int
+ * @var \DateTimeInterface
*/
protected $now;
@@ -35,7 +35,7 @@ public function testOutdatedContent(): void {
->set('node.news', 10)
->save();
- $this->now = time();
+ $this->now = new \DateTime('now', new \DateTimeZone('UTC'));
/** @var \Drupal\collection\Entity\CollectionInterface $collection */
$collection = $this->createRdfEntity([
@@ -46,25 +46,34 @@ public function testOutdatedContent(): void {
$discussion = $this->createNode([
'type' => 'discussion',
'og_audience' => $collection,
- 'published_at' => strtotime('-3 years -1 minute', $this->now),
+ 'published_at' => (clone $this->now)
+ ->sub(new \DateInterval('P3YT1M'))
+ ->getTimestamp(),
]);
/** @var \Drupal\joinup_document\Entity\DocumentInterface $document */
$document = $this->createNode([
'type' => 'document',
'og_audience' => $collection,
- 'published_at' => strtotime('-3 years +1 minute', $this->now),
+ 'published_at' => (clone $this->now)
+ ->sub(new \DateInterval('P3Y'))
+ ->add(new \DateInterval('PT1M'))
+ ->getTimestamp(),
]);
/** @var \Drupal\joinup_event\Entity\EventInterface $event */
$event = $this->createNode([
'type' => 'event',
'og_audience' => $collection,
- 'published_at' => strtotime('-40 years', $this->now),
+ 'published_at' => (clone $this->now)
+ ->sub(new \DateInterval('P40Y'))
+ ->getTimestamp(),
]);
/** @var \Drupal\joinup_news\Entity\NewsInterface $news */
$news = $this->createNode([
'type' => 'news',
'og_audience' => $collection,
- 'published_at' => strtotime('-5 years', $this->now),
+ 'published_at' => (clone $this->now)
+ ->sub(new \DateInterval('P5Y'))
+ ->getTimestamp(),
]);
// The discussion is outdated.
@@ -94,9 +103,8 @@ public function tearDown(): void {
* The entity.
*/
protected function assertIsOutdated(OutdatedContentInterface $entity): void {
- $outdated_time = $entity->getOutdatedTime();
- $this->assertNotNull($outdated_time);
- $this->assertGreaterThan($outdated_time, $this->now);
+ $this->assertNotNull($entity->getOutdatedTime());
+ $this->assertGreaterThan($this->getOutdatedTime($entity), $this->now);
}
/**
@@ -106,8 +114,28 @@ protected function assertIsOutdated(OutdatedContentInterface $entity): void {
* The entity.
*/
protected function assertIsNotOutdated(OutdatedContentInterface $entity): void {
- $outdated_time = $entity->getOutdatedTime();
- $this->assertTrue(!$outdated_time || ($this->now < $outdated_time));
+ if (!$entity->getOutdatedTime()) {
+ // It never gets outdated.
+ $this->assertTrue(TRUE);
+ return;
+ }
+ $this->assertGreaterThan($this->now, $this->getOutdatedTime($entity));
+ }
+
+ /**
+ * Returns the entity outdated date/time.
+ *
+ * @param \Drupal\joinup_core\Entity\OutdatedContentInterface $entity
+ * The entity.
+ *
+ * @return \DateTime|null
+ * The entity outdated date/time or NULL if it doesn't get outdated.
+ */
+ protected function getOutdatedTime(OutdatedContentInterface $entity): ?\DateTime {
+ if ($entity->getOutdatedTime()) {
+ return (new \DateTime("@{$entity->getOutdatedTime()}"))->setTimezone($this->now->getTimezone());
+ }
+ return NULL;
}
}
diff --git a/web/modules/custom/joinup_eulogin/src/Plugin/Menu/EuLoginMenuLink.php b/web/modules/custom/joinup_eulogin/src/Plugin/Menu/EuLoginMenuLink.php
index 5bbe3205f1..d69646cf80 100644
--- a/web/modules/custom/joinup_eulogin/src/Plugin/Menu/EuLoginMenuLink.php
+++ b/web/modules/custom/joinup_eulogin/src/Plugin/Menu/EuLoginMenuLink.php
@@ -126,7 +126,7 @@ public function getOptions() {
}
// If we are on the homepage, set the 'returnto' path to '/' alias.
elseif ($this->pathMatcher->isFrontPage()) {
- $return_to = '/';
+ $return_to = base_path();
}
// Return to the current page URL.
else {
diff --git a/web/modules/custom/joinup_eulogin/tests/src/ExistingSite/JoinupEuLoginTest.php b/web/modules/custom/joinup_eulogin/tests/src/ExistingSite/JoinupEuLoginTest.php
index f9e626d305..9bc2fd0f04 100644
--- a/web/modules/custom/joinup_eulogin/tests/src/ExistingSite/JoinupEuLoginTest.php
+++ b/web/modules/custom/joinup_eulogin/tests/src/ExistingSite/JoinupEuLoginTest.php
@@ -4,6 +4,7 @@
namespace Drupal\Tests\joinup_eulogin\ExistingSite;
+use Drupal\Core\Test\AssertMailTrait;
use Drupal\Tests\cas\Traits\CasTestTrait;
use Drupal\Tests\joinup_test\ExistingSite\JoinupExistingSiteTestBase;
use Drupal\user\Entity\User;
@@ -16,6 +17,7 @@
*/
class JoinupEuLoginTest extends JoinupExistingSiteTestBase {
+ use AssertMailTrait;
use CasTestTrait;
use LoginTrait;
@@ -227,7 +229,7 @@ protected function assertLimitedAccess($url): void {
$assert->pageTextContains('Your account access is limited.');
$assert->pageTextContains('Starting from 02/03/2020, signing in to Joinup is handled by EU Login, the European Commission Authentication Service. After you sign-in using EU Login, you will be able to synchronise your existing Joinup account to restore your access.');
$assert->linkExists('EU Login');
- $assert->linkByHrefExists('/user/logout?destination=/caslogin');
+ $assert->linkByHrefExists('/user/logout?destination=' . base_path() . 'caslogin');
}
/**
diff --git a/web/modules/custom/joinup_front_page/src/Plugin/Block/ExploreBlock.php b/web/modules/custom/joinup_front_page/src/Plugin/Block/ExploreBlock.php
index fe829754d4..5fff8c5d9e 100644
--- a/web/modules/custom/joinup_front_page/src/Plugin/Block/ExploreBlock.php
+++ b/web/modules/custom/joinup_front_page/src/Plugin/Block/ExploreBlock.php
@@ -8,6 +8,7 @@
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -90,30 +91,35 @@ public static function create(ContainerInterface $container, array $configuratio
* {@inheritdoc}
*/
public function build(): array {
+ $get_url = function (string $type): string {
+ return Url::fromRoute('view.search.page_1', [], [
+ 'query' => ['f' => ['type:' . $type]],
+ ])->toString();
+ };
$data = [
'solutions' => [
'label' => $this->t('Solutions'),
'plural_type' => $this->t('solutions'),
'data' => $this->getRdfEntities('solution'),
- 'url' => '/search?keys=&f[0]=type%3Asolution',
+ 'url' => $get_url('solution'),
],
'collections' => [
'label' => $this->t('Collections'),
'plural_type' => $this->t('collections'),
'data' => $this->getRdfEntities('collection'),
- 'url' => '/search?keys=&f[0]=type%3Acollection',
+ 'url' => $get_url('collection'),
],
'news' => [
'label' => $this->t('News'),
'plural_type' => $this->t('news'),
'data' => $this->getContent('news'),
- 'url' => '/search?keys=&f[0]=type%3Anews',
+ 'url' => $get_url('news'),
],
'events' => [
'label' => $this->t('Events'),
'plural_type' => $this->t('events'),
'data' => $this->getContent('event'),
- 'url' => '/search?keys=&f[0]=type%3Aevent',
+ 'url' => $get_url('event'),
],
];
diff --git a/web/modules/custom/joinup_group/src/EventSubscriber/TransferGroupOwnershipSubscriber.php b/web/modules/custom/joinup_group/src/EventSubscriber/TransferGroupOwnershipSubscriber.php
index 4d20b6514c..e99da31a6e 100644
--- a/web/modules/custom/joinup_group/src/EventSubscriber/TransferGroupOwnershipSubscriber.php
+++ b/web/modules/custom/joinup_group/src/EventSubscriber/TransferGroupOwnershipSubscriber.php
@@ -79,7 +79,9 @@ public static function getSubscribedEvents(): array {
public function alterRedirection(FilterResponseEvent $event): void {
$response = $event->getResponse();
if ($response->isRedirect() && $response instanceof RedirectResponse) {
- $path = trim(parse_url($response->getTargetUrl(), PHP_URL_PATH), '/');
+ $path = rtrim(parse_url($response->getTargetUrl(), PHP_URL_PATH), '/');
+ $path = substr($path, strlen(base_path()));
+
/** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */
$url = Url::fromUri("internal:/$path");
if ($url->isRouted() && ($url->getRouteName() === 'joinup_group.transfer_group_ownership_confirm')) {
diff --git a/web/modules/custom/joinup_search/config/schema/joinup_search.schema.yml b/web/modules/custom/joinup_search/config/schema/joinup_search.schema.yml
index c5f76303b5..47a7520b0b 100644
--- a/web/modules/custom/joinup_search/config/schema/joinup_search.schema.yml
+++ b/web/modules/custom/joinup_search/config/schema/joinup_search.schema.yml
@@ -28,7 +28,6 @@ plugin.plugin_configuration.search_api_processor.joinup_entity_status:
inverse:
type: boolean
label: 'Inverse'
- roles:
search_api_field.plugin.filter.node_entity_autocomplete:
type: joinup_search_filter_plugin_entity_autocomplete
diff --git a/web/modules/custom/joinup_search/joinup_search.install b/web/modules/custom/joinup_search/joinup_search.install
index 5110fd3482..4a1b3ebab9 100644
--- a/web/modules/custom/joinup_search/joinup_search.install
+++ b/web/modules/custom/joinup_search/joinup_search.install
@@ -22,43 +22,40 @@ function joinup_search_requirements(string $phase): array {
$http_client = \Drupal::httpClient();
$site_hash = Utility::getSiteHash();
- foreach (['published', 'unpublished'] as $index_id) {
- $endpoint = \Drupal::config("search_api.server.solr_{$index_id}")
- ->get('backend_config.connector_config');
- $uri = (string) (new Uri())
- ->withScheme($endpoint['scheme'])
- ->withHost($endpoint['host'])
- ->withPort($endpoint['port'])
- ->withPath(rtrim($endpoint['path'], '/') . "/{$endpoint['core']}/select")
- ->withQuery(http_build_query([
- 'fq' => "-hash:{$site_hash}",
- 'q' => '*:*',
- 'wt' => 'json',
- ]));
-
- try {
- $response = $http_client->get($uri);
- }
- catch (\Throwable $exception) {
- // Ignore error, it's already covered by search_api_solr module.
- // @see search_api_solr_requirements()
- continue;
- }
+ $endpoint = \Drupal::config('search_api.server.joinup')->get('backend_config.connector_config');
+ $uri = (string) (new Uri())
+ ->withScheme($endpoint['scheme'])
+ ->withHost($endpoint['host'])
+ ->withPort($endpoint['port'])
+ ->withPath(rtrim($endpoint['path'], '/') . "/{$endpoint['core']}/select")
+ ->withQuery(http_build_query([
+ 'fq' => "-hash:{$site_hash}",
+ 'q' => '*:*',
+ 'wt' => 'json',
+ ]));
+
+ try {
+ $response = $http_client->get($uri);
+ }
+ catch (\Throwable $exception) {
+ // Ignore error, it's already covered by search_api_solr module.
+ // @see search_api_solr_requirements()
+ return [];
+ }
- $num_found = Json::decode($response->getBody()->getContents())['response']['numFound'];
- if ($num_found) {
- $requirements["solr_data:{$index_id}"] = [
- 'severity' => REQUIREMENT_ERROR,
- 'title' => t('Solr index: %index', ['%index' => $index_id]),
- 'value' => t('Found @count entries with invalid site hash', [
- '@count' => $num_found,
- ]),
- 'description' => t('The valid site hash is %hash. Retrieve the invalid entries with this query.', [
- '%hash' => $site_hash,
- ':uri' => $uri,
- ]),
- ];
- }
+ $num_found = Json::decode($response->getBody()->getContents())['response']['numFound'];
+ if ($num_found) {
+ $requirements['solr_data'] = [
+ 'severity' => REQUIREMENT_ERROR,
+ 'title' => t('Solr core: %core', ['%core' => 'joinup']),
+ 'value' => t('Found @count entries with invalid site hash', [
+ '@count' => $num_found,
+ ]),
+ 'description' => t('The valid site hash is %hash. Retrieve the invalid entries with this query.', [
+ '%hash' => $site_hash,
+ ':uri' => $uri,
+ ]),
+ ];
}
return $requirements;
diff --git a/web/modules/custom/joinup_search/joinup_search.module b/web/modules/custom/joinup_search/joinup_search.module
index 60991a190e..8c8309a42a 100644
--- a/web/modules/custom/joinup_search/joinup_search.module
+++ b/web/modules/custom/joinup_search/joinup_search.module
@@ -14,6 +14,7 @@ use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Template\Attribute;
+use Drupal\joinup_search\Plugin\views\row\JoinupSearchApiRow;
use Drupal\search_api\IndexInterface;
use Drupal\search_api\Query\ConditionGroupInterface;
use Drupal\search_api\Query\QueryInterface;
@@ -401,3 +402,10 @@ function joinup_search_theme_suggestions_joinup_search_global_search(array $vari
return [];
}
+
+/**
+ * Implements hook_views_plugins_row_alter().
+ */
+function joinup_search_views_plugins_row_alter(array &$plugins): void {
+ $plugins['search_api']['class'] = JoinupSearchApiRow::class;
+}
diff --git a/web/modules/custom/joinup_search/src/Plugin/views/row/JoinupSearchApiRow.php b/web/modules/custom/joinup_search/src/Plugin/views/row/JoinupSearchApiRow.php
new file mode 100644
index 0000000000..e52a96d79e
--- /dev/null
+++ b/web/modules/custom/joinup_search/src/Plugin/views/row/JoinupSearchApiRow.php
@@ -0,0 +1,45 @@
+view->id() == 'search') {
+ $datasource_id = $row->search_api_datasource;
+ if ($row->index <= 2 && $this->view->getCurrentPage() <= 0) {
+ $view_mode = 'search_result_featured';
+ try {
+ return $this->index->getDatasource($datasource_id)->viewItem($row->_object, $view_mode);
+ }
+ catch (SearchApiException $e) {
+ $this->logException($e);
+ return '';
+ }
+ }
+ }
+ return $parent;
+ }
+
+}
diff --git a/web/modules/custom/joinup_test/tests/src/ExistingSite/JoinupExistingSiteTestBase.php b/web/modules/custom/joinup_test/tests/src/ExistingSite/JoinupExistingSiteTestBase.php
index d9410f7483..f00953c07a 100644
--- a/web/modules/custom/joinup_test/tests/src/ExistingSite/JoinupExistingSiteTestBase.php
+++ b/web/modules/custom/joinup_test/tests/src/ExistingSite/JoinupExistingSiteTestBase.php
@@ -5,9 +5,7 @@
namespace Drupal\Tests\joinup_test\ExistingSite;
use Drupal\joinup\Traits\AntibotTrait;
-use Drupal\joinup\Traits\MailConfigTrait;
use weitzman\DrupalTestTraits\ExistingSiteBase;
-use weitzman\DrupalTestTraits\Mail\MailCollectionTrait;
/**
* Base class for Joinup ExistingSite tests.
@@ -15,11 +13,6 @@
abstract class JoinupExistingSiteTestBase extends ExistingSiteBase {
use AntibotTrait;
- use MailCollectionTrait {
- startMailCollection as traitStartMailCollection;
- restoreMailSettings as traitRestoreMailSettings;
- }
- use MailConfigTrait;
/**
* The list of Honeypot forms.
@@ -48,9 +41,6 @@ abstract class JoinupExistingSiteTestBase extends ExistingSiteBase {
protected function setUp(): void {
parent::setUp();
- // Use the testing mail collector during tests.
- $this->startMailCollection();
-
// A user whose account in not yet linked with an EU Login account has
// limited access to the website features. They can login only by using the
// one-time-login mechanism, but one-time-login is meant only to allow
@@ -89,9 +79,6 @@ public function tearDown(): void {
// Re-enable limited access functionality.
$this->state->delete('joinup_eulogin.disable_limited_access');
- // Restore the mail settings.
- $this->restoreMailSettings();
-
/** @var \Drupal\Component\Plugin\PluginManagerInterface $delete_orphans_manager */
$delete_orphans_manager = $this->container->get('plugin.manager.og.delete_orphans');
/** @var \Drupal\og\OgDeleteOrphansInterface $delete_orphans_plugin */
@@ -107,31 +94,6 @@ public function tearDown(): void {
$delete_orphans_plugin->process();
}
- /**
- * Overrides the trait method by bypassing config read-only.
- *
- * @throws \Exception
- * If mail config is overwritten in settings.php or settings.override.php.
- */
- protected function startMailCollection(): void {
- // Check if the mail system configuration has been overridden in
- // settings.php or settings.override.php.
- $this->checkMailConfigOverride();
-
- static::bypassReadOnlyConfig();
- $this->traitStartMailCollection();
- static::restoreReadOnlyConfig();
- }
-
- /**
- * Overrides the trait method by bypassing config read-only.
- */
- protected function restoreMailSettings(): void {
- static::bypassReadOnlyConfig();
- $this->traitRestoreMailSettings();
- static::restoreReadOnlyConfig();
- }
-
/**
* Disables Honeypot settings during the test run.
*/
diff --git a/web/modules/custom/joinup_video/src/Plugin/Filter/JoinupVideo.php b/web/modules/custom/joinup_video/src/Plugin/Filter/JoinupVideo.php
index 7da476391b..17874dc391 100644
--- a/web/modules/custom/joinup_video/src/Plugin/Filter/JoinupVideo.php
+++ b/web/modules/custom/joinup_video/src/Plugin/Filter/JoinupVideo.php
@@ -175,23 +175,24 @@ protected function getValidMatches($text) {
$document = Html::load($text);
foreach ($document->getElementsByTagName('iframe') as $iframe) {
/** @var \DOMElement $iframe */
- $src = $iframe->getAttribute('src');
- $options = UrlHelper::parse($src);
- $options['query'] = UrlHelper::filterQueryParameters($options['query'], [
- 'autoplay',
- 'autoPlay',
- 'autostart',
- ]);
- $url = $this->getAbsoluteUrl($options);
- $matches[$document->saveHTML($iframe)] = [
- 'video_url' => $url,
- 'settings' => [
- 'width' => $iframe->getAttribute('width'),
- 'height' => $iframe->getAttribute('height'),
- 'autoplay' => $plugin_settings['autoplay'],
- 'responsive' => $plugin_settings['responsive'],
- ],
- ];
+ if ($src = $iframe->getAttribute('src')) {
+ $parts = UrlHelper::parse($src);
+ $parts['query'] = UrlHelper::filterQueryParameters($parts['query'], [
+ 'autoplay',
+ 'autoPlay',
+ 'autostart',
+ ]);
+ $url = $this->getUrl($parts);
+ $matches[$document->saveHTML($iframe)] = [
+ 'video_url' => $url,
+ 'settings' => [
+ 'width' => $iframe->getAttribute('width'),
+ 'height' => $iframe->getAttribute('height'),
+ 'autoplay' => $plugin_settings['autoplay'],
+ 'responsive' => $plugin_settings['responsive'],
+ ],
+ ];
+ }
}
return $matches;
@@ -218,24 +219,25 @@ protected function getProvider($url) {
}
/**
- * Attempts to create the absolute url.
+ * Attempts to create a URL.
*
- * @param array $options
- * An array of options including the path.
+ * @param array $parts
+ * An array of URL parts.
*
* @return string|null
- * The string representation of the url or null if no url is found.
+ * The string representation of the URL or NULL if no URL is found.
*/
- protected function getAbsoluteUrl(array $options) {
+ protected function getUrl(array $parts): ?string {
try {
- $url = Url::fromUri($options['path'], $options)->toString();
+ $url = Url::fromUri($parts['path'], $parts)->toString();
}
- catch (\Exception $e) {
+ catch (\Exception $exception) {
try {
- $url = ltrim($options['path'], '/');
- $url = Url::fromUri('internal:/' . $url, $options)->setAbsolute(TRUE)->toString();
+ $path = ltrim($parts['path'], '/');
+ $parts['base_url'] = $GLOBALS['base_url'];
+ $url = Url::fromUri('internal:/' . $path, $parts)->toString();
}
- catch (\Exception $e) {
+ catch (\Exception $exception) {
return NULL;
}
}
diff --git a/web/modules/custom/joinup_video/src/Plugin/video_embed_field/Provider/InternalPath.php b/web/modules/custom/joinup_video/src/Plugin/video_embed_field/Provider/InternalPath.php
index bc8392136f..f48def11e3 100644
--- a/web/modules/custom/joinup_video/src/Plugin/video_embed_field/Provider/InternalPath.php
+++ b/web/modules/custom/joinup_video/src/Plugin/video_embed_field/Provider/InternalPath.php
@@ -4,9 +4,9 @@
namespace Drupal\joinup_video\Plugin\video_embed_field\Provider;
+use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Url;
use Drupal\video_embed_field\ProviderPluginBase;
-use GuzzleHttp\ClientInterface;
/**
* An iframe pointing to site itself.
@@ -18,37 +18,6 @@
*/
class InternalPath extends ProviderPluginBase {
- /**
- * The base url of the input.
- *
- * @var string
- */
- protected $baseUrl;
-
- /**
- * Static cache for resolved short URLs.
- *
- * @var string[]
- */
- protected static $resolvedUrl = [];
-
- /**
- * Create a plugin with the given input.
- *
- * @param string $configuration
- * The configuration of the plugin.
- * @param string $plugin_id
- * The plugin id.
- * @param array $plugin_definition
- * The plugin definition.
- * @param \GuzzleHttp\ClientInterface $http_client
- * An HTTP client.
- */
- public function __construct($configuration, $plugin_id, array $plugin_definition, ClientInterface $http_client) {
- parent::__construct($configuration, $plugin_id, $plugin_definition, $http_client);
- $this->baseUrl = $this->getUrlFromInput($configuration['input']);
- }
-
/**
* {@inheritdoc}
*/
@@ -56,7 +25,10 @@ public function renderEmbedCode($width, $height, $autoplay) {
$iframe = [
'#type' => 'video_embed_iframe',
'#provider' => 'internal_path',
- '#url' => Url::fromUserInput('/' . ltrim($this->getVideoId(), '/'))->setAbsolute(TRUE)->toString(),
+ '#url' => Url::fromUri('internal:/' . $this->getVideoId())
+ ->setOption('base_url', $GLOBALS['base_url'])
+ ->setAbsolute()
+ ->toString(),
];
return $iframe;
@@ -64,60 +36,22 @@ public function renderEmbedCode($width, $height, $autoplay) {
/**
* {@inheritdoc}
- *
- * The internal provider needs the url to match the base url to be applicable.
*/
public static function isApplicable($input) {
- $applicable = parent::isApplicable($input);
- $url = static::getUrlFromInput($input);
- return $applicable && !empty($url) && $url === \Drupal::request()->getHost();
- }
-
- /**
- * Parses the input and returns a list of matches.
- *
- * @param string $input
- * The input url.
- *
- * @return array
- * An array of matches related to the url. The two specific values returned
- * are id and base_url.
- */
- public static function getDataFromInput($input) {
- preg_match('#^(?:(?:https?:)?//)(?[^/]+)/(index\.php\?q=)?(?[^&\?]+)#i', $input, $matches);
- return $matches;
+ return !UrlHelper::isExternal($input) || UrlHelper::externalIsLocal($input, $GLOBALS['base_url']);
}
/**
* {@inheritdoc}
*/
- public static function getIdFromInput($input) {
- $matches = static::getDataFromInput($input);
- return isset($matches['id']) ? $matches['id'] : FALSE;
- }
-
- /**
- * Return the base_url from the input.
- *
- * @param string $input
- * The input url.
- *
- * @return mixed
- * The base url.
- */
- public static function getUrlFromInput($input) {
- $matches = static::getDataFromInput($input);
- return isset($matches['base_url']) ? $matches['base_url'] : FALSE;
- }
-
- /**
- * Returns the base url.
- *
- * @return string
- * The base url.
- */
- public function getBaseUrl() {
- return $this->baseUrl;
+ public static function getIdFromInput($input): string {
+ if (strpos($input, $GLOBALS['base_url']) === 0) {
+ $input = substr($input, strlen($GLOBALS['base_url']));
+ }
+ elseif (strpos($input, base_path()) === 0) {
+ $input = substr($input, strlen(base_path()) - 1);
+ }
+ return ltrim($input, '/');
}
/**
diff --git a/web/modules/custom/whats_new/src/WhatsNewHelper.php b/web/modules/custom/whats_new/src/WhatsNewHelper.php
index 1a4891fc89..6dcfd00704 100644
--- a/web/modules/custom/whats_new/src/WhatsNewHelper.php
+++ b/web/modules/custom/whats_new/src/WhatsNewHelper.php
@@ -8,6 +8,7 @@
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Session\AccountProxyInterface;
+use Drupal\path_alias\AliasManagerInterface;
use Drupal\user\UserDataInterface;
/**
@@ -43,6 +44,13 @@ class WhatsNewHelper implements WhatsNewHelperInterface {
*/
protected $invalidator;
+ /**
+ * The path alias manager service.
+ *
+ * @var \Drupal\path_alias\AliasManagerInterface
+ */
+ protected $aliasManager;
+
/**
* Constructs a WhatsNewHelper object.
*
@@ -54,12 +62,15 @@ class WhatsNewHelper implements WhatsNewHelperInterface {
* The user data service.
* @param \Drupal\Core\Cache\CacheTagsInvalidatorInterface $invalidator
* The cache tag invalidator service.
+ * @param \Drupal\path_alias\AliasManagerInterface $alias_manager
+ * The path alias manager service.
*/
- public function __construct(EntityTypeManagerInterface $entity_type_manager, AccountProxyInterface $current_user, UserDataInterface $user_data, CacheTagsInvalidatorInterface $invalidator) {
+ public function __construct(EntityTypeManagerInterface $entity_type_manager, AccountProxyInterface $current_user, UserDataInterface $user_data, CacheTagsInvalidatorInterface $invalidator, AliasManagerInterface $alias_manager) {
$this->entityTypeManager = $entity_type_manager;
$this->currentUser = $current_user;
$this->userData = $user_data;
$this->invalidator = $invalidator;
+ $this->aliasManager = $alias_manager;
}
/**
@@ -84,11 +95,12 @@ public function getFlagEnabledMenuLinks(?EntityInterface $entity = NULL): array
->condition('live_link', 1);
if ($entity) {
+ $system_path = '/' . $entity->toUrl()->getInternalPath();
$entity_uris = [
// Support both the alias and the internal URL. The alias can occur if
// the user copies it from the URL and the internal URL can occur if the
// user selects the entity from the autocomplete field.
- 'internal:' . $entity->toUrl()->toString(),
+ "internal:{$this->aliasManager->getAliasByPath($system_path)}",
"entity:node/{$entity->id()}",
];
diff --git a/web/modules/custom/whats_new/whats_new.services.yml b/web/modules/custom/whats_new/whats_new.services.yml
index b70bd49c44..1e8f1d9870 100644
--- a/web/modules/custom/whats_new/whats_new.services.yml
+++ b/web/modules/custom/whats_new/whats_new.services.yml
@@ -1,4 +1,4 @@
services:
whats_new.helper:
class: Drupal\whats_new\WhatsNewHelper
- arguments: ['@entity_type.manager', '@current_user', '@user.data', '@cache_tags.invalidator']
+ arguments: ['@entity_type.manager', '@current_user', '@user.data', '@cache_tags.invalidator', '@path_alias.manager']
diff --git a/web/themes/joinup/scss/layouts/sections/_section--footer.scss b/web/themes/joinup/scss/layouts/sections/_section--footer.scss
index 853e73a685..238a10e3b5 100644
--- a/web/themes/joinup/scss/layouts/sections/_section--footer.scss
+++ b/web/themes/joinup/scss/layouts/sections/_section--footer.scss
@@ -10,13 +10,13 @@
@include hidden-print;
.footer__first {
- background-color: rgb(20, 59, 118);
+ background-color: $color-blue-default;
}
.footer__second {
padding-top: 10px;
padding-bottom: 5px;
- background-color: rgb(20, 59, 118);
+ background-color: $color-blue-default;
}
.footer__site-name {
@@ -24,7 +24,7 @@
margin-bottom: 10px;
img {
- height: 40px;
+ height: 30px;
width: auto;
}
}
diff --git a/web/themes/joinup/templates/parts/footer.html.twig b/web/themes/joinup/templates/parts/footer.html.twig
index 61b1e807d2..4fb54118be 100644
--- a/web/themes/joinup/templates/parts/footer.html.twig
+++ b/web/themes/joinup/templates/parts/footer.html.twig
@@ -1,56 +1,12 @@
-