Skip to content

Commit

Permalink
EICNET-3012: Added the Story author visibility test. Added patch for …
Browse files Browse the repository at this point in the history
…content moderation module.
  • Loading branch information
Chrisa committed Mar 7, 2024
1 parent 8782ffb commit 912ddb3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
13 changes: 11 additions & 2 deletions composer.lock

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

3 changes: 2 additions & 1 deletion composer.patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"2329253 - Allow the ChangedItem to skip updating the entity's \"changed\" timestamp when synchronizing (f.e. when migrating)": "https://www.drupal.org/files/issues/2022-12-07/2329253-97.patch",
"3052115 - Mark an entity as 'syncing' during a migration update": "https://www.drupal.org/files/issues/2022-06-16/3052115-53.patch",
"2907760 - Notice: Undefined index: default in Drupal\\views\\Plugin\\views\\PluginBase->setOptionDefaults()": "https://www.drupal.org/files/issues/2022-05-26/2907760-11-9.3.x.patch",
"3183509 - Use the user display name instead of the username on the user authoring information in the node edit form": "https://git.drupalcode.org/project/drupal/-/merge_requests/352.patch"
"3183509 - Use the user display name instead of the username on the user authoring information in the node edit form": "https://git.drupalcode.org/project/drupal/-/merge_requests/352.patch",
"Content moderation does not sanity check original entity moderate state is present / exists": "https://www.drupal.org/files/issues/2022-06-09/add-sanity-checking-to-content-moderation-original-value-checks.patch"
},
"drupal/address": {
"2812659 - Integrate Address with Search API (adds a Search API processor to convert country code to full country name)": "https://www.drupal.org/files/issues/2021-06-14/integrate-address-searchapi-2812659-57_0.patch",
Expand Down
22 changes: 22 additions & 0 deletions tests/features/users_privacy.feature
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,25 @@ Feature: Personal user information should not be visible to not logged in users.
Given I am an anonymous user
And I visit the "Business development" overview page
And I should not see the text "behat_user group_author_testing" in the "content" region

Scenario: Check if information of "Story" author is visible to authorised and anonymous users.
Given users:
|name | field_first_name | field_last_name |mail | roles |
|behat | behat_user | story_author_testing |member@behat.localhost | administrator |
Given the user "behat" has profile with data:
|field_body | field_vocab_topic_expertise | field_vocab_topic_interest |field_vocab_geo |
|behat profile body | Biotechnology,Energy,Finance | Biotechnology,Energy,Finance |203,204,205 |
Given I am logged in as "behat"
And the following image:
| name | file | alt | title |
| Cat Image | cat.jpg | Alternative text 1 | cat |
Given "story" content:
| title | field_body | field_header_visual | field_image | field_introduction | field_vocab_program_type | field_vocab_story_type | field_vocab_topics | author | moderation_state |
| Behat Story | story body | Cat Image | Cat Image | story introduction | EIC & EIT | Events | Business development | behat | published |
And I run cron
And I visit the "Business development" overview page
And I should see the link "behat_user story_author_testing" in the "content" region
Given I am not logged in
Given I am an anonymous user
And I visit the "Business development" overview page
And I should not see the text "behat_user story_author_testing" in the "content" region

0 comments on commit 912ddb3

Please sign in to comment.