diff --git a/src/D8/EmailTrait.php b/src/D8/EmailTrait.php index 5e7836ab..1995da46 100644 --- a/src/D8/EmailTrait.php +++ b/src/D8/EmailTrait.php @@ -136,7 +136,8 @@ public function emailAssertEmailContains($field, PyStringNode $string, $exact = $string = strval($string); $string = $exact ? $string : trim(preg_replace('/\s+/', ' ', $string)); foreach (self::emailGetCollectedEmails() as $email) { - $field_string = $exact ? $email[$field] : trim(preg_replace('/\s+/', ' ', $email[$field])); + $field_string = $email['params'][$field] ?? $email[$field]; + $field_string = $exact ? $field_string : trim(preg_replace('/\s+/', ' ', $field_string)); if (strpos($field_string, $string) !== FALSE) { return $email; } @@ -186,7 +187,7 @@ public function emailAssertEmailNotContainsExact($field, PyStringNode $string) { */ public function emailFollowLinkNumber($number, PyStringNode $subject) { $email = $this->emailAssertEmailContains('subject', $subject); - $links = self::emailExtractLinks($email['body']); + $links = self::emailExtractLinks($email['params']['body'] ?? $email['body']); if (empty($links)) { throw new \Exception(sprintf('No links were found in the email with subject %s', $subject)); } diff --git a/src/D8/FileDownloadTrait.php b/src/D8/FileDownloadTrait.php index 5d607746..51be83e1 100644 --- a/src/D8/FileDownloadTrait.php +++ b/src/D8/FileDownloadTrait.php @@ -195,7 +195,7 @@ public function fileDownloadAssertNoZipContains(TableNode $files) { * Open downloaded ZIP archive and validate contents. */ protected function fileDownloadOpenZip() { - if (!class_exists('ZipArchive')) { + if (!class_exists('\ZipArchive')) { throw new \RuntimeException('ZIP extension is not enabled for PHP'); } @@ -213,7 +213,7 @@ protected function fileDownloadOpenZip() { throw new \Exception('Downloaded file does not have correct headers set for ZIP.'); } - $zip = new ZipArchive(); + $zip = new \ZipArchive(); $result = $zip->open($this->fileDownloadDownloadedFileInfo['file_path']); if ($result !== TRUE) { if ($result == ZipArchive::ER_NOZIP) { diff --git a/src/D8/MediaTrait.php b/src/D8/MediaTrait.php index a116edc0..08ec781b 100644 --- a/src/D8/MediaTrait.php +++ b/src/D8/MediaTrait.php @@ -93,7 +93,7 @@ protected function mediaCreateEntity($stub) { throw new \Exception("Cannot create media because it is missing the required property 'bundle'."); } - $bundles = \Drupal::entityTypeManager()->getBundleInfo('media'); + $bundles = \Drupal::getContainer()->get('entity_type.bundle.info')->getBundleInfo('media'); if (!in_array($stub->bundle, array_keys($bundles))) { throw new \Exception("Cannot create media because provided bundle '$stub->bundle' does not exist."); } diff --git a/src/D8/MenuTrait.php b/src/D8/MenuTrait.php index f0cdbdfc..7d17f1b0 100644 --- a/src/D8/MenuTrait.php +++ b/src/D8/MenuTrait.php @@ -15,12 +15,6 @@ trait MenuTrait { /** * Remove menu. * - * @code - * @Given no menus: - * | main_menu | - * | footer_menu | - * @endcode - * * @Given no menus: */ public function menuDelete(TableNode $table) { diff --git a/src/D8/OverrideTrait.php b/src/D8/OverrideTrait.php index 1f08bc08..bedef0b4 100644 --- a/src/D8/OverrideTrait.php +++ b/src/D8/OverrideTrait.php @@ -14,7 +14,17 @@ trait OverrideTrait { /** - * {@inheritdoc} + * Creates one or more terms on an existing vocabulary. + * + * Provide term data in the following format: + * + * | name | parent | description | weight | taxonomy_field_image | + * | Snook | Fish | Marine fish | 10 | snook-123.jpg | + * | ... | ... | ... | ... | ... | + * + * Only the 'name' field is required. + * + * @Given :vocabulary terms: */ public function createTerms($vocabulary, TableNode $table) { // Delete entities before creating them. @@ -23,7 +33,7 @@ public function createTerms($vocabulary, TableNode $table) { } /** - * {@inheritdoc} + * @Given :type content: */ public function createNodes($type, TableNode $table) { $filtered_table = TableNode::fromList($table->getColumn(0)); @@ -33,7 +43,7 @@ public function createNodes($type, TableNode $table) { } /** - * {@inheritdoc} + * @Given users: */ public function createUsers(TableNode $table) { // Delete entities before creating them. @@ -42,7 +52,10 @@ public function createUsers(TableNode $table) { } /** - * {@inheritdoc} + * Creates and authenticates a user with the given role(s). + * + * @Given I am logged in as a user with the :role role(s) + * @Given I am logged in as a/an :role */ public function assertAuthenticatedByRole($role) { // Override parent assertion to allow using 'anonymous user' role without diff --git a/src/D8/UserTrait.php b/src/D8/UserTrait.php index 585d2ead..04a79088 100644 --- a/src/D8/UserTrait.php +++ b/src/D8/UserTrait.php @@ -44,11 +44,16 @@ public function userVisitOwnProfilePage() { public function userDelete(TableNode $usersTable) { foreach ($usersTable->getHash() as $userHash) { $user = NULL; - if (isset($userHash['mail'])) { - $user = $this->userGetByMail($userHash['mail']); + try { + if (isset($userHash['mail'])) { + $user = $this->userGetByMail($userHash['mail']); + } + elseif (isset($userHash['name'])) { + $user = $this->userGetByMail($userHash['name']); + } } - elseif (isset($userHash['name'])) { - $user = $this->userGetByMail($userHash['name']); + catch (\Exception $exception) { + // User may not exist - do nothing. } if ($user) { diff --git a/tests/behat/bootstrap/FeatureContextD8.php b/tests/behat/bootstrap/FeatureContextD8.php index 4c48f459..20b94da2 100644 --- a/tests/behat/bootstrap/FeatureContextD8.php +++ b/tests/behat/bootstrap/FeatureContextD8.php @@ -12,13 +12,29 @@ */ use Behat\Behat\Hook\Scope\AfterFeatureScope; +use Behat\Gherkin\Node\PyStringNode; use Behat\Mink\Driver\Selenium2Driver; use Drupal\Core\Extension\MissingDependencyException; use Drupal\DrupalExtension\Context\DrupalContext; +use Drupal\file\Entity\File; +use Drupal\user\Entity\User; use IntegratedExperts\BehatSteps\D8\BigPipeTrait; use IntegratedExperts\BehatSteps\D8\ContentTrait; +use IntegratedExperts\BehatSteps\D8\DraggableViewsTrait; +use IntegratedExperts\BehatSteps\D8\EmailTrait; +use IntegratedExperts\BehatSteps\D8\FileDownloadTrait; +use IntegratedExperts\BehatSteps\D8\FileTrait; +use IntegratedExperts\BehatSteps\D8\MediaTrait; +use IntegratedExperts\BehatSteps\D8\MenuTrait; +use IntegratedExperts\BehatSteps\D8\OverrideTrait; +use IntegratedExperts\BehatSteps\D8\ParagraphsTrait; +use IntegratedExperts\BehatSteps\D8\RoleTrait; +use IntegratedExperts\BehatSteps\D8\TaxonomyTrait; +use IntegratedExperts\BehatSteps\D8\TestmodeTrait; use IntegratedExperts\BehatSteps\D8\UserTrait; use IntegratedExperts\BehatSteps\D8\WatchdogTrait; +use IntegratedExperts\BehatSteps\D8\WebformTrait; +use IntegratedExperts\BehatSteps\D8\WysiwygTrait; use IntegratedExperts\BehatSteps\FieldTrait; use IntegratedExperts\BehatSteps\LinkTrait; use IntegratedExperts\BehatSteps\PathTrait; @@ -31,12 +47,25 @@ class FeatureContextD8 extends DrupalContext { use BigPipeTrait; use ContentTrait; + use DraggableViewsTrait; + use EmailTrait; use FieldTrait; + use FileDownloadTrait; + use FileTrait; use LinkTrait; + use MediaTrait; + use MenuTrait; + use OverrideTrait; + use ParagraphsTrait; use PathTrait; use ResponseTrait; + use RoleTrait; + use TaxonomyTrait; + use TestmodeTrait; use UserTrait; use WatchdogTrait; + use WebformTrait; + use WysiwygTrait; /** * @Then user :name does not exists @@ -165,4 +194,58 @@ public function uninstallModule($name) { } } + /** + * @When I send test email to :email with + * @When I send test email to :email with: + */ + public function sendTestEmail($email, PyStringNode $string) { + \Drupal::service('plugin.manager.mail')->mail( + 'mysite_core', + 'test_email', + $email, + \Drupal::languageManager()->getDefaultLanguage(), + ['body' => strval($string)], + FALSE + ); + } + + /** + * @Then :file_name file object exists + */ + public function fileObjectExist($file_name) { + $file_name = basename($file_name); + $fids = $this->fileLoadMultiple(['filename' => $file_name]); + if (empty($fids)) { + throw new \Exception(sprintf('"%s" file does not exist in DB, but it should', $file_name)); + } + + $fid = reset($fids); + $file = File::load($fid); + + if ($file_name !== $file->label()) { + throw new \Exception(sprintf('"%s" file does not exist in DB, but it should', $file_name)); + } + } + + /** + * Helper to load multiple files with specified conditions. + * + * @param array $conditions + * Conditions keyed by field names. + * + * @return array + * Array of file ids. + */ + protected function fileLoadMultiple(array $conditions = []) { + $query = \Drupal::entityQuery('file'); + $query->addMetaData('account', User::load(1)); + foreach ($conditions as $k => $v) { + $and = $query->andConditionGroup(); + $and->condition($k, $v); + $query->condition($and); + } + + return $query->execute(); + } + } diff --git a/tests/behat/features/d8.email.feature b/tests/behat/features/d8.email.feature new file mode 100644 index 00000000..9970981a --- /dev/null +++ b/tests/behat/features/d8.email.feature @@ -0,0 +1,142 @@ +@d8 +Feature: Check that email assertions work for D8 + + @api + Scenario: As a developer, I want to know that email step definitions work as + expected. + # @note: No @email tag on scenario to test "Given I enable the test email system" step. + Given I enable the test email system + When I send test email to "test@example.com" with + """ + Line one of the test email content + Line two of the test email content + Line three with tabs and spaces + """ + Then an email is sent to "test@example.com" + And an email body contains: + """ + Line two of the test email content + """ + And an email body does not contain: + """ + Line four of the test email content + """ + And an email body contains exact: + """ + Line three with tabs and spaces + """ + And an email body does not contain exact: + """ + Line three with tabs and spaces + """ + But an email body contains: + """ + Line three with tabs and spaces + """ + And an email body contains: + """ + Line three with tabs and spaces + """ + And I disable the test email system + + @api + Scenario: As a developer, I want to know that test email system is activated + as before and after scenario steps. + Given I enable the test email system + When I send test email to "test@example.com" with + """ + Line one of the test email content + Line two of the test email content + Line three of the test email content + """ + Then an email is sent to "test@example.com" + And an email "body" contains: + """ + Line two of the test email content + """ + And an email body does not contain: + """ + Line four of the test email content + """ + And I disable the test email system + + @api + Scenario: As a developer, I want to know that test email system queue clearing + step is working. + Given I enable the test email system + When I send test email to "test@example.com" with + """ + Line one of the test email content + Line two of the test email content + Line three of the test email content + """ + Then an email is sent to "test@example.com" + And an email body contains: + """ + Line two of the test email content + """ + And an email body does not contain: + """ + Line four of the test email content + """ + When I clear the test email system queue + And an email body does not contain: + """ + Line two of the test email content + """ + And I disable the test email system + + @api @email + Scenario: As a developer, I want to know that test email system is automatically + activated when @email tag is added to the scenario. + When I send test email to "test@example.com" with + """ + Line one of the test email content + Line two of the test email content + Line three of the test email content + """ + Then an email is sent to "test@example.com" + And an email body contains: + """ + Line two of the test email content + """ + + @api @email + Scenario Outline: As a developer, I want to know that following a link from + the email is working. + Given I send test email to "test@example.com" with + """ + Line one of the test email content + "" + Line two of the test email content + """ + Then an email is sent to "test@example.com" + + And I follow the link number "" in the email with the subject: + """ + Test Email + """ + Then the response status code should be 200 + And I should see "Example Domain" + Examples: + | content | number | + | http://example.com | 1 | + | http://www.example.com | 1 | + | www.example.com | 1 | + | Link is a part of content http://example.com | 1 | + | http://1.example.com http://example.com http://3.example.com | 2 | + | http://1.example.com http://2.example.com http://example.com | 3 | + + @api @email + Scenario: As a developer, I want to know that no emails assertions works as expected. + Given no emails were sent + Given I send test email to "test@example.com" with + """ + Line one of the test email content + "" + Line two of the test email content + """ + Then an email is sent to "test@example.com" + + When I clear the test email system queue + Then no emails were sent diff --git a/tests/behat/features/d8.file-download.feature b/tests/behat/features/d8.file-download.feature new file mode 100644 index 00000000..c932494b --- /dev/null +++ b/tests/behat/features/d8.file-download.feature @@ -0,0 +1,48 @@ +@d8 +Feature: Check that FileDownloadTrait works for D8 + + Background: + Given I am logged in as a user with the "administrator" role + Given managed file: + | path | + | example_document.pdf | + | example_image.png | + | example_audio.mp3 | + | example_text.txt | + | example_files.zip | + And article content: + | title | field_file | + | [TEST] document page | example_text.txt | + | [TEST] zip page | example_files.zip | + + @api @download + Scenario: Assert "Then I download file from :url" + And I download file from "/example_text.txt" + + @api @javascript @download + Scenario: Assert in browser "Then I download file from :url" + And I download file from "/example_text.txt" + + @api + Scenario: Assert "Then I download file from link :link" + When I visit article "[TEST] document page" + Then I see download "example_text.txt" link "present" + Then I download file from link "example_text.txt" + And downloaded file contains: + """ + Some Text + """ + + @api + Scenario: Assert "Given downloaded file is zip archive that contains files:" + When I visit article "[TEST] zip page" + Then I see download "example_files.zip" link "present" + Then I download file from link "example_files.zip" + And downloaded file name is "example_files.zip" + And downloaded file is zip archive that contains files: + | example_audio.mp3 | + | example_image.png | + | example_document.pdf | + Then downloaded file is zip archive that does not contain files: + | example_text.txt | + | not_existing.png | diff --git a/tests/behat/features/d8.file.feature b/tests/behat/features/d8.file.feature new file mode 100644 index 00000000..e7b2a65f --- /dev/null +++ b/tests/behat/features/d8.file.feature @@ -0,0 +1,14 @@ +@d8 +Feature: Check that FileTrait works for D8 + + @api + Scenario: Assert "Given managed file:" + When I am logged in as a user with the "administrator" role + Given managed file: + | path | + | example_document.pdf | + | example_image.png | + | example_audio.mp3 | + And "example_document.pdf" file object exists + And "example_image.png" file object exists + And "example_audio.mp3" file object exists diff --git a/tests/behat/features/d8.media.feature b/tests/behat/features/d8.media.feature new file mode 100644 index 00000000..be0f1e25 --- /dev/null +++ b/tests/behat/features/d8.media.feature @@ -0,0 +1,11 @@ +@d8 +Feature: Check that MediaTrait works for D8 + + @api + Scenario: Assert "When I attach the file :file to :field_name media field" + Given "image" media: + | name | field_media_image | + | Test media | example_image.png | + And I am logged in as a user with the "administrator" role + When I visit "/admin/content/media" + Then I should see the text "Test media" diff --git a/tests/behat/features/d8.override.feature b/tests/behat/features/d8.override.feature new file mode 100644 index 00000000..e12cd67c --- /dev/null +++ b/tests/behat/features/d8.override.feature @@ -0,0 +1,13 @@ +@d8 +Feature: Check that OverrideTrait works for D8 + + @api + Scenario Outline: Assert override of authentication by role works + Given I am logged in as a user with the "" role + When I go to "admin" + Then I should get a "" HTTP response + Examples: + | role | code | + | administrator | 200 | + | authenticated user | 403 | + | anonymous user | 403 | diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.audio.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.audio.default.yml new file mode 100644 index 00000000..bba8d254 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.audio.default.yml @@ -0,0 +1,55 @@ +uuid: 831970c0-a4a5-46ea-811a-17c4030a0d00 +langcode: en +status: true +dependencies: + config: + - field.field.media.audio.field_media_audio_file + - media.type.audio + module: + - file + - path +_core: + default_config_hash: HGa6EpWJApUec2IS8zsOnJ3NhIhwY2QYNmLY7eS5zLM +id: media.audio.default +targetEntityType: media +bundle: audio +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_media_audio_file: + weight: 0 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 100 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: + name: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.audio.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.audio.media_library.yml new file mode 100644 index 00000000..b65342b1 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.audio.media_library.yml @@ -0,0 +1,22 @@ +uuid: c9317b57-1885-4be2-98c2-74ace051b32c +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.media.media_library + - field.field.media.audio.field_media_audio_file + - media.type.audio +_core: + default_config_hash: 28vwMIYtvyjPcD4RyciZXIztxtZgmuWRCNgYemr_SZE +id: media.audio.media_library +targetEntityType: media +bundle: audio +mode: media_library +content: { } +hidden: + created: true + field_media_audio_file: true + name: true + path: true + status: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.document.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.document.default.yml new file mode 100644 index 00000000..b2bbba49 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.document.default.yml @@ -0,0 +1,55 @@ +uuid: 1a96e349-7149-46ea-a6c7-6639a4a6198a +langcode: en +status: true +dependencies: + config: + - field.field.media.document.field_media_document + - media.type.document + module: + - file + - path +_core: + default_config_hash: gtZlAQdQqZgVWvvZ6v-hfmACkfEimqn_GPDbQZqNAbw +id: media.document.default +targetEntityType: media +bundle: document +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_media_document: + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + weight: 0 + region: content + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 100 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: + name: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.document.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.document.media_library.yml new file mode 100644 index 00000000..7f16a514 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.document.media_library.yml @@ -0,0 +1,22 @@ +uuid: ea54022d-26bf-4934-9097-71cea08db4c9 +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.media.media_library + - field.field.media.document.field_media_document + - media.type.document +_core: + default_config_hash: dcpfpqyLXOSGpulacMAJW3H-G34_LeNsjdfxd1_oCfY +id: media.document.media_library +targetEntityType: media +bundle: document +mode: media_library +content: { } +hidden: + created: true + field_media_document: true + name: true + path: true + status: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.image.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.image.default.yml new file mode 100644 index 00000000..f2e3820e --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.image.default.yml @@ -0,0 +1,57 @@ +uuid: 08a4eca4-e84b-4b6d-8434-6bb246750d62 +langcode: en +status: true +dependencies: + config: + - field.field.media.image.field_media_image + - image.style.thumbnail + - media.type.image + module: + - image + - path +_core: + default_config_hash: WeM0d1VqhuyGELo4SRiDJfhDQSLqfKavISEbrnlcTaE +id: media.image.default +targetEntityType: media +bundle: image +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_media_image: + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + weight: 0 + region: content + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 100 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: + name: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.image.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.image.media_library.yml new file mode 100644 index 00000000..d5e2d329 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.image.media_library.yml @@ -0,0 +1,32 @@ +uuid: 584be9f5-89c9-4f0b-94c6-401f8b76caa5 +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.media.media_library + - field.field.media.image.field_media_image + - image.style.thumbnail + - media.type.image + module: + - image +_core: + default_config_hash: BMLrK4zKp8-FFnMseBdT_6h6YipUsKRfbDf_3WUB5HA +id: media.image.media_library +targetEntityType: media +bundle: image +mode: media_library +content: + field_media_image: + type: image_image + weight: 1 + region: content + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } +hidden: + created: true + name: true + path: true + status: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.remote_video.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.remote_video.default.yml new file mode 100644 index 00000000..b88dcbe1 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.remote_video.default.yml @@ -0,0 +1,56 @@ +uuid: bd8d05e4-7feb-4580-ba5a-a0d27187ba88 +langcode: en +status: true +dependencies: + config: + - field.field.media.remote_video.field_media_oembed_video + - media.type.remote_video + module: + - media + - path +_core: + default_config_hash: DfbjvjtGEMGLvm-1Zm7-MCRZj3wpGokUWZOuaK5-1Po +id: media.remote_video.default +targetEntityType: media +bundle: remote_video +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_media_oembed_video: + type: oembed_textfield + weight: 0 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + region: content + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 100 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: + name: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.remote_video.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.remote_video.media_library.yml new file mode 100644 index 00000000..72f6b92f --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.remote_video.media_library.yml @@ -0,0 +1,22 @@ +uuid: 56512c90-c526-4d06-b1db-901d138142ba +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.media.media_library + - field.field.media.remote_video.field_media_oembed_video + - media.type.remote_video +_core: + default_config_hash: TBgPW-uaXRaICBwLaVc16rXpRiLSknDIdF9q0XL7qso +id: media.remote_video.media_library +targetEntityType: media +bundle: remote_video +mode: media_library +content: { } +hidden: + created: true + field_media_oembed_video: true + name: true + path: true + status: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.video.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.video.default.yml new file mode 100644 index 00000000..a20429a5 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.video.default.yml @@ -0,0 +1,55 @@ +uuid: 9a0337ae-bd90-45af-9ebc-70c2b8cac95c +langcode: en +status: true +dependencies: + config: + - field.field.media.video.field_media_video_file + - media.type.video + module: + - file + - path +_core: + default_config_hash: QcsaoQN46kJyeffkXCqa7aX7pPtpqJjITEqeBse33D0 +id: media.video.default +targetEntityType: media +bundle: video +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_media_video_file: + weight: 0 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 100 + region: content + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + region: content + third_party_settings: { } +hidden: + name: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.video.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.video.media_library.yml new file mode 100644 index 00000000..6508ee7e --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.media.video.media_library.yml @@ -0,0 +1,22 @@ +uuid: f0e2bb0f-9beb-475b-8274-686eec5b4b0f +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.media.media_library + - field.field.media.video.field_media_video_file + - media.type.video +_core: + default_config_hash: kGv8YsopqHvzTzb7QTINWcv0fnNa5ZDQyZxpOQR2vro +id: media.video.media_library +targetEntityType: media +bundle: video +mode: media_library +content: { } +hidden: + created: true + field_media_video_file: true + name: true + path: true + status: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.node.article.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.node.article.default.yml index df519956..0759cf37 100644 --- a/tests/behat/fixtures/d8/config/sync/core.entity_form_display.node.article.default.yml +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_display.node.article.default.yml @@ -5,12 +5,14 @@ dependencies: config: - field.field.node.article.body - field.field.node.article.comment + - field.field.node.article.field_file - field.field.node.article.field_image - field.field.node.article.field_tags - image.style.thumbnail - node.type.article module: - comment + - file - image - path - text @@ -42,6 +44,13 @@ content: region: content settings: { } third_party_settings: { } + field_file: + weight: 121 + settings: + progress_indicator: throbber + third_party_settings: { } + type: file_generic + region: content field_image: type: image_image weight: 4 diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_form_mode.media.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_form_mode.media.media_library.yml new file mode 100644 index 00000000..a8b737e0 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_form_mode.media.media_library.yml @@ -0,0 +1,15 @@ +uuid: 72d08afa-0cac-45f5-aa37-3d494f57a83b +langcode: en +status: true +dependencies: + enforced: + module: + - media_library + module: + - media +_core: + default_config_hash: pkq0uj-IoqEQRBOP_ddUDV0ZJ-dKQ_fLcppsEDF2UO8 +id: media.media_library +label: 'Media library' +targetEntityType: media +cache: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.audio.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.audio.default.yml new file mode 100644 index 00000000..92eaa38e --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.audio.default.yml @@ -0,0 +1,32 @@ +uuid: fd9acb83-b19d-4efe-add3-5626605d3ec8 +langcode: en +status: true +dependencies: + config: + - field.field.media.audio.field_media_audio_file + - media.type.audio + module: + - file +_core: + default_config_hash: SWf3MLdbEKvlx4Vs6iPwDHu5pr1aKT0SJmgp8no73-k +id: media.audio.default +targetEntityType: media +bundle: audio +mode: default +content: + field_media_audio_file: + type: file_audio + weight: 0 + label: visually_hidden + settings: + controls: true + autoplay: false + loop: false + multiple_file_display_type: tags + third_party_settings: { } + region: content +hidden: + created: true + name: true + thumbnail: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.audio.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.audio.media_library.yml new file mode 100644 index 00000000..4d07c13f --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.audio.media_library.yml @@ -0,0 +1,32 @@ +uuid: 4504df97-0c80-41fd-932a-4a7d27ed0a7d +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.media_library + - field.field.media.audio.field_media_audio_file + - image.style.thumbnail + - media.type.audio + module: + - image +_core: + default_config_hash: bluLijrv0ELGIq1uFR777kImy6ZH6VLl8mBCOwvuLg4 +id: media.audio.media_library +targetEntityType: media +bundle: audio +mode: media_library +content: + thumbnail: + type: image + weight: 0 + region: content + label: hidden + settings: + image_style: thumbnail + image_link: '' + third_party_settings: { } +hidden: + created: true + field_media_audio_file: true + name: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.document.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.document.default.yml new file mode 100644 index 00000000..d6f5e8d6 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.document.default.yml @@ -0,0 +1,28 @@ +uuid: 7b44f363-82fa-4b7d-a6c9-769769841491 +langcode: en +status: true +dependencies: + config: + - field.field.media.document.field_media_document + - media.type.document + module: + - file +_core: + default_config_hash: DXitcriWmE5QHvGvk2OzWouaSnXD5uipkRdAG6_pnkg +id: media.document.default +targetEntityType: media +bundle: document +mode: default +content: + field_media_document: + label: visually_hidden + settings: { } + third_party_settings: { } + type: file_default + weight: 1 + region: content +hidden: + created: true + name: true + thumbnail: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.document.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.document.media_library.yml new file mode 100644 index 00000000..11a296e5 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.document.media_library.yml @@ -0,0 +1,32 @@ +uuid: 1f0418b2-1c76-4624-b2f3-49b3c29b643e +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.media_library + - field.field.media.document.field_media_document + - image.style.thumbnail + - media.type.document + module: + - image +_core: + default_config_hash: WA5PBCSll9OeXbS16GbGz8jNgz7vkUAmC_72nn0yyBo +id: media.document.media_library +targetEntityType: media +bundle: document +mode: media_library +content: + thumbnail: + type: image + weight: 0 + region: content + label: hidden + settings: + image_style: thumbnail + image_link: '' + third_party_settings: { } +hidden: + created: true + field_media_document: true + name: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.image.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.image.default.yml new file mode 100644 index 00000000..19329701 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.image.default.yml @@ -0,0 +1,31 @@ +uuid: d8061e18-9f6c-4080-88f1-49f01c47ee2e +langcode: en +status: true +dependencies: + config: + - field.field.media.image.field_media_image + - image.style.large + - media.type.image + module: + - image +_core: + default_config_hash: B1a2aBHmUulUZN6HrxITEH1tSResuVjXMBEv1lUBtOo +id: media.image.default +targetEntityType: media +bundle: image +mode: default +content: + field_media_image: + label: visually_hidden + settings: + image_style: large + image_link: '' + third_party_settings: { } + type: image + weight: 1 + region: content +hidden: + created: true + name: true + thumbnail: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.image.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.image.media_library.yml new file mode 100644 index 00000000..38911ad4 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.image.media_library.yml @@ -0,0 +1,32 @@ +uuid: 7edd2bab-d5f7-4fe0-b4bc-5a1ebf473081 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.media_library + - field.field.media.image.field_media_image + - image.style.medium + - media.type.image + module: + - image +_core: + default_config_hash: PaGXvzRcL9eII--JV4eCVfObjrNo0l-u1dB_WJtB9ig +id: media.image.media_library +targetEntityType: media +bundle: image +mode: media_library +content: + thumbnail: + type: image + weight: 0 + region: content + label: hidden + settings: + image_style: medium + image_link: '' + third_party_settings: { } +hidden: + created: true + field_media_image: true + name: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.remote_video.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.remote_video.default.yml new file mode 100644 index 00000000..e1370328 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.remote_video.default.yml @@ -0,0 +1,30 @@ +uuid: 6c2a020b-ccf1-4eb1-9468-db0d25f86aee +langcode: en +status: true +dependencies: + config: + - field.field.media.remote_video.field_media_oembed_video + - media.type.remote_video + module: + - media +_core: + default_config_hash: gUaDZKMQD3lmLKWPn727X3JHVdKJ525g4EJCCcDVAqk +id: media.remote_video.default +targetEntityType: media +bundle: remote_video +mode: default +content: + field_media_oembed_video: + type: oembed + weight: 0 + label: hidden + settings: + max_width: 0 + max_height: 0 + third_party_settings: { } + region: content +hidden: + created: true + name: true + thumbnail: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.remote_video.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.remote_video.media_library.yml new file mode 100644 index 00000000..30308627 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.remote_video.media_library.yml @@ -0,0 +1,32 @@ +uuid: fbbdca85-8e06-4600-8ce8-7271dfb3cd4a +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.media_library + - field.field.media.remote_video.field_media_oembed_video + - image.style.medium + - media.type.remote_video + module: + - image +_core: + default_config_hash: sLyo3lc_eX4-C1Jv0ivqjuORGfdclLsX09tZf7K3EVM +id: media.remote_video.media_library +targetEntityType: media +bundle: remote_video +mode: media_library +content: + thumbnail: + type: image + weight: 0 + region: content + label: hidden + settings: + image_style: medium + image_link: '' + third_party_settings: { } +hidden: + created: true + field_media_oembed_video: true + name: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.video.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.video.default.yml new file mode 100644 index 00000000..543a86c2 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.video.default.yml @@ -0,0 +1,35 @@ +uuid: d891ab94-efbe-44db-a01b-9e1b707401b9 +langcode: en +status: true +dependencies: + config: + - field.field.media.video.field_media_video_file + - media.type.video + module: + - file +_core: + default_config_hash: dQR0mYK5NNg27OigHrxZrHSsnwewnNZcPJKjKIO0cpA +id: media.video.default +targetEntityType: media +bundle: video +mode: default +content: + field_media_video_file: + type: file_video + weight: 0 + label: visually_hidden + settings: + muted: false + width: 640 + height: 480 + controls: true + autoplay: false + loop: false + multiple_file_display_type: tags + third_party_settings: { } + region: content +hidden: + created: true + name: true + thumbnail: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.video.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.video.media_library.yml new file mode 100644 index 00000000..96f4417c --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.media.video.media_library.yml @@ -0,0 +1,32 @@ +uuid: 6a01a8fe-4a8a-4adf-ad46-2128fc68407d +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.media_library + - field.field.media.video.field_media_video_file + - image.style.thumbnail + - media.type.video + module: + - image +_core: + default_config_hash: PDQo9eqAz3D8g87S89zPgXsm7Xy-dYMdEgwKBahFdy0 +id: media.video.media_library +targetEntityType: media +bundle: video +mode: media_library +content: + thumbnail: + type: image + weight: 0 + region: content + label: hidden + settings: + image_style: thumbnail + image_link: '' + third_party_settings: { } +hidden: + created: true + field_media_video_file: true + name: true + uid: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.default.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.default.yml index d5efa821..4ac1ec01 100644 --- a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.default.yml +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.default.yml @@ -6,12 +6,14 @@ dependencies: - core.entity_view_display.comment.comment.default - field.field.node.article.body - field.field.node.article.comment + - field.field.node.article.field_file - field.field.node.article.field_image - field.field.node.article.field_tags - image.style.large - node.type.article module: - comment + - file - image - text - user @@ -38,6 +40,14 @@ content: view_mode: default pager_id: 0 third_party_settings: { } + field_file: + weight: 111 + label: above + settings: + use_description_as_link_text: true + third_party_settings: { } + type: file_default + region: content field_image: type: image weight: -1 diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.rss.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.rss.yml index f0a0bc75..8df7797f 100644 --- a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.rss.yml +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.rss.yml @@ -6,6 +6,7 @@ dependencies: - core.entity_view_mode.node.rss - field.field.node.article.body - field.field.node.article.comment + - field.field.node.article.field_file - field.field.node.article.field_image - field.field.node.article.field_tags - node.type.article @@ -24,5 +25,6 @@ content: hidden: body: true comment: true + field_file: true field_image: true field_tags: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.teaser.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.teaser.yml index 8d4ee889..7530748d 100644 --- a/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.teaser.yml +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_display.node.article.teaser.yml @@ -6,6 +6,7 @@ dependencies: - core.entity_view_mode.node.teaser - field.field.node.article.body - field.field.node.article.comment + - field.field.node.article.field_file - field.field.node.article.field_image - field.field.node.article.field_tags - image.style.medium @@ -51,5 +52,6 @@ content: region: content hidden: comment: true + field_file: true field_image: true field_tags: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_mode.media.full.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_mode.media.full.yml new file mode 100644 index 00000000..ffa5139b --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_mode.media.full.yml @@ -0,0 +1,12 @@ +uuid: 3fb69c8a-26e3-4dd8-be10-d8451a35c378 +langcode: en +status: false +dependencies: + module: + - media +_core: + default_config_hash: 6NBUEuGmlkClK8Fb76tSMMpO2eZ4LWCBdbUk4z7CuP0 +id: media.full +label: 'Full content' +targetEntityType: media +cache: true diff --git a/tests/behat/fixtures/d8/config/sync/core.entity_view_mode.media.media_library.yml b/tests/behat/fixtures/d8/config/sync/core.entity_view_mode.media.media_library.yml new file mode 100644 index 00000000..4454f6a5 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/core.entity_view_mode.media.media_library.yml @@ -0,0 +1,15 @@ +uuid: 2245353c-68bb-41d8-b371-0c16bd4a3517 +langcode: en +status: true +dependencies: + enforced: + module: + - media_library + module: + - media +_core: + default_config_hash: pkq0uj-IoqEQRBOP_ddUDV0ZJ-dKQ_fLcppsEDF2UO8 +id: media.media_library +label: 'Media library' +targetEntityType: media +cache: true diff --git a/tests/behat/fixtures/d8/config/sync/core.extension.yml b/tests/behat/fixtures/d8/config/sync/core.extension.yml index 5dc6b107..f851254d 100644 --- a/tests/behat/fixtures/d8/config/sync/core.extension.yml +++ b/tests/behat/fixtures/d8/config/sync/core.extension.yml @@ -25,6 +25,8 @@ module: history: 0 image: 0 link: 0 + media: 0 + media_library: 0 menu_ui: 0 mysite_core: 0 node: 0 diff --git a/tests/behat/fixtures/d8/config/sync/field.field.media.audio.field_media_audio_file.yml b/tests/behat/fixtures/d8/config/sync/field.field.media.audio.field_media_audio_file.yml new file mode 100644 index 00000000..5f02707c --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.field.media.audio.field_media_audio_file.yml @@ -0,0 +1,29 @@ +uuid: eab219e9-3beb-40d9-86d3-eebf064af1d7 +langcode: en +status: true +dependencies: + config: + - field.storage.media.field_media_audio_file + - media.type.audio + module: + - file +_core: + default_config_hash: sI-7KvS4Qbg6EucALXjwYEotxgxUfH-bMC19yTpZ1kw +id: media.audio.field_media_audio_file +field_name: field_media_audio_file +entity_type: media +bundle: audio +label: 'Audio file' +description: '' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: + file_extensions: 'mp3 wav aac' + file_directory: '[date:custom:Y]-[date:custom:m]' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/tests/behat/fixtures/d8/config/sync/field.field.media.document.field_media_document.yml b/tests/behat/fixtures/d8/config/sync/field.field.media.document.field_media_document.yml new file mode 100644 index 00000000..b7681ee4 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.field.media.document.field_media_document.yml @@ -0,0 +1,32 @@ +uuid: b051da0e-24c7-462d-b3e8-915a609457ba +langcode: en +status: true +dependencies: + config: + - field.storage.media.field_media_document + - media.type.document + enforced: + module: + - media + module: + - file +_core: + default_config_hash: 52m0CtJVAoE3Qvh2AiciSkV8odAgQeRo4yNDGgUA7dc +id: media.document.field_media_document +field_name: field_media_document +entity_type: media +bundle: document +label: Document +description: '' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt rtf doc docx ppt pptx xls xlsx pdf odf odg odp ods odt fodt fods fodp fodg key numbers pages' + max_filesize: '' + handler: 'default:file' + handler_settings: { } + description_field: false +field_type: file diff --git a/tests/behat/fixtures/d8/config/sync/field.field.media.image.field_media_image.yml b/tests/behat/fixtures/d8/config/sync/field.field.media.image.field_media_image.yml new file mode 100644 index 00000000..73dd6490 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.field.media.image.field_media_image.yml @@ -0,0 +1,43 @@ +uuid: 040a1d11-431b-4338-93fc-86ff3a809935 +langcode: en +status: true +dependencies: + config: + - field.storage.media.field_media_image + - media.type.image + enforced: + module: + - media + module: + - image +_core: + default_config_hash: pzPA-2JwyxlJ3qMb4L9viAnhNhbEhl2couH8A3FO020 +id: media.image.field_media_image +field_name: field_media_image +entity_type: media +bundle: image +label: Image +description: '' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + max_resolution: '' + min_resolution: '' + default_image: + uuid: null + alt: '' + title: '' + width: null + height: null + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/tests/behat/fixtures/d8/config/sync/field.field.media.remote_video.field_media_oembed_video.yml b/tests/behat/fixtures/d8/config/sync/field.field.media.remote_video.field_media_oembed_video.yml new file mode 100644 index 00000000..374a9634 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.field.media.remote_video.field_media_oembed_video.yml @@ -0,0 +1,21 @@ +uuid: 12ffc994-7bd6-4ee5-9152-fe1eb98e68a5 +langcode: en +status: true +dependencies: + config: + - field.storage.media.field_media_oembed_video + - media.type.remote_video +_core: + default_config_hash: Eo4HHenV5iZat_kEWgr_wydD3TgwURMCzwt-7qIEyoM +id: media.remote_video.field_media_oembed_video +field_name: field_media_oembed_video +entity_type: media +bundle: remote_video +label: 'Video URL' +description: '' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/tests/behat/fixtures/d8/config/sync/field.field.media.video.field_media_video_file.yml b/tests/behat/fixtures/d8/config/sync/field.field.media.video.field_media_video_file.yml new file mode 100644 index 00000000..a031019d --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.field.media.video.field_media_video_file.yml @@ -0,0 +1,29 @@ +uuid: aa33e72c-460f-445d-bde2-bc527dd945a4 +langcode: en +status: true +dependencies: + config: + - field.storage.media.field_media_video_file + - media.type.video + module: + - file +_core: + default_config_hash: OA1qtcEH8xxQhIPvf4TykZOp1MqSTA1R4HoWxbcWZD0 +id: media.video.field_media_video_file +field_name: field_media_video_file +entity_type: media +bundle: video +label: 'Video file' +description: '' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: + file_extensions: mp4 + file_directory: '[date:custom:Y]-[date:custom:m]' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/tests/behat/fixtures/d8/config/sync/field.field.node.article.field_file.yml b/tests/behat/fixtures/d8/config/sync/field.field.node.article.field_file.yml new file mode 100644 index 00000000..df5ef3b7 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.field.node.article.field_file.yml @@ -0,0 +1,27 @@ +uuid: 63c880bb-07bf-41a7-8253-a3ec284c7771 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_file + - node.type.article + module: + - file +id: node.article.field_file +field_name: field_file +entity_type: node +bundle: article +label: File +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'txt zip' + max_filesize: '' + description_field: false + handler: 'default:file' + handler_settings: { } +field_type: file diff --git a/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_audio_file.yml b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_audio_file.yml new file mode 100644 index 00000000..e058f4e5 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_audio_file.yml @@ -0,0 +1,25 @@ +uuid: ca4cd8ab-34ed-4225-b3c6-f78f50eae7a2 +langcode: en +status: true +dependencies: + module: + - file + - media +_core: + default_config_hash: JCHoh95CpUeBx9ch24Tmi6ru0nwmNz8xWVH4Qs7RnTg +id: media.field_media_audio_file +field_name: field_media_audio_file +entity_type: media +type: file +settings: + target_type: file + display_field: false + display_default: false + uri_scheme: public +module: file +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_document.yml b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_document.yml new file mode 100644 index 00000000..80ea5a52 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_document.yml @@ -0,0 +1,28 @@ +uuid: c5f439b6-1487-4796-8da4-6cc281f13b15 +langcode: en +status: true +dependencies: + enforced: + module: + - media + module: + - file + - media +_core: + default_config_hash: rQoPQKvhehKl_xDCFHeMJ5nA5i6bxUSdrNxazOSPGTg +id: media.field_media_document +field_name: field_media_document +entity_type: media +type: file +settings: + uri_scheme: public + target_type: file + display_field: false + display_default: false +module: file +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_image.yml b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_image.yml new file mode 100644 index 00000000..e7f12a61 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_image.yml @@ -0,0 +1,35 @@ +uuid: e69eab9c-3a84-4573-bd03-f35708c867eb +langcode: en +status: true +dependencies: + enforced: + module: + - media + module: + - file + - image + - media +_core: + default_config_hash: 7ZBrcl87ZXaw42v952wwcw_9cQgTBq5_5tgyUkE-VV0 +id: media.field_media_image +field_name: field_media_image +entity_type: media +type: image +settings: + default_image: + uuid: null + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false + uri_scheme: public +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_oembed_video.yml b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_oembed_video.yml new file mode 100644 index 00000000..333e9f37 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_oembed_video.yml @@ -0,0 +1,23 @@ +uuid: d8720fd8-45c5-47d9-b689-7aa221a0fdb8 +langcode: en +status: true +dependencies: + module: + - media +_core: + default_config_hash: SJgxR5XWOesQbEKqp8VgInPyJjCFU_t2pi7UzYB78xg +id: media.field_media_oembed_video +field_name: field_media_oembed_video +entity_type: media +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_video_file.yml b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_video_file.yml new file mode 100644 index 00000000..b02fd234 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.storage.media.field_media_video_file.yml @@ -0,0 +1,25 @@ +uuid: f1832cfc-612c-480b-836d-3f6ec25879e4 +langcode: en +status: true +dependencies: + module: + - file + - media +_core: + default_config_hash: z5mgbn1PIVZ5TNMByBmivqo_u3Rdk58UIzpyN4ypTeM +id: media.field_media_video_file +field_name: field_media_video_file +entity_type: media +type: file +settings: + target_type: file + display_field: false + display_default: false + uri_scheme: public +module: file +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/tests/behat/fixtures/d8/config/sync/field.storage.node.field_file.yml b/tests/behat/fixtures/d8/config/sync/field.storage.node.field_file.yml new file mode 100644 index 00000000..1432ba3e --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/field.storage.node.field_file.yml @@ -0,0 +1,23 @@ +uuid: d38b0cf9-a215-4eb7-85fd-9f57237a01e4 +langcode: en +status: true +dependencies: + module: + - file + - node +id: node.field_file +field_name: field_file +entity_type: node +type: file +settings: + display_field: false + display_default: false + uri_scheme: public + target_type: file +module: file +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/tests/behat/fixtures/d8/config/sync/image.style.media_library.yml b/tests/behat/fixtures/d8/config/sync/image.style.media_library.yml new file mode 100644 index 00000000..98cb6cd7 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/image.style.media_library.yml @@ -0,0 +1,20 @@ +uuid: 1f76b060-8f06-4258-b8b8-d0602b438505 +langcode: en +status: true +dependencies: + enforced: + module: + - media_library +_core: + default_config_hash: 7qJqToD1OQLAyeswpmg7M0LRxQlw1URQkJDWUJCnmR8 +name: media_library +label: 'Media Library thumbnail (220×220)' +effects: + 75b076a8-1234-4b42-85db-bf377c4d8d5f: + uuid: 75b076a8-1234-4b42-85db-bf377c4d8d5f + id: image_scale + weight: 0 + data: + width: 220 + height: 220 + upscale: false diff --git a/tests/behat/fixtures/d8/config/sync/media.settings.yml b/tests/behat/fixtures/d8/config/sync/media.settings.yml new file mode 100644 index 00000000..27467c0b --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/media.settings.yml @@ -0,0 +1,6 @@ +icon_base_uri: 'public://media-icons/generic' +iframe_domain: '' +oembed_providers_url: 'https://oembed.com/providers.json' +standalone_url: false +_core: + default_config_hash: PlWtVQXY5oKYZqCMPXh6SPamXagn5BoZqgAI8EY9WsY diff --git a/tests/behat/fixtures/d8/config/sync/media.type.audio.yml b/tests/behat/fixtures/d8/config/sync/media.type.audio.yml new file mode 100644 index 00000000..c0a63771 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/media.type.audio.yml @@ -0,0 +1,16 @@ +uuid: eadbb04b-f2ad-49e6-9563-8bd7d15adc79 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: eJw8n6Tk2tO3ZysuEeGR1gZa1yRffaZzR4t0Q7iNurs +id: audio +label: Audio +description: 'A locally hosted audio file.' +source: audio_file +queue_thumbnail_downloads: false +new_revision: true +source_configuration: + source_field: field_media_audio_file +field_map: + name: name diff --git a/tests/behat/fixtures/d8/config/sync/media.type.document.yml b/tests/behat/fixtures/d8/config/sync/media.type.document.yml new file mode 100644 index 00000000..4d816e91 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/media.type.document.yml @@ -0,0 +1,16 @@ +uuid: 2ce36717-efa5-4c4f-90a6-2ce5ef1ef901 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: _D9q3XSnP6ik9we9UuoTvZsQKPuYNp_G9PfwVtWzgnQ +id: document +label: Document +description: 'An uploaded file or document, such as a PDF.' +source: file +queue_thumbnail_downloads: false +new_revision: true +source_configuration: + source_field: field_media_document +field_map: + name: name diff --git a/tests/behat/fixtures/d8/config/sync/media.type.image.yml b/tests/behat/fixtures/d8/config/sync/media.type.image.yml new file mode 100644 index 00000000..775e27b7 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/media.type.image.yml @@ -0,0 +1,16 @@ +uuid: 589b7c2c-1e19-490e-851e-f52dcf36cc6f +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: 6Qope5wG7HUpV0tPOBMtDI_GZkHFcF1Xj4hgD9Cu_hM +id: image +label: Image +description: 'Use local images for reusable media.' +source: image +queue_thumbnail_downloads: false +new_revision: true +source_configuration: + source_field: field_media_image +field_map: + name: name diff --git a/tests/behat/fixtures/d8/config/sync/media.type.remote_video.yml b/tests/behat/fixtures/d8/config/sync/media.type.remote_video.yml new file mode 100644 index 00000000..b47de76f --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/media.type.remote_video.yml @@ -0,0 +1,20 @@ +uuid: 3052f196-e6a0-406e-be62-1718adb5910d +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: FvzYbqrSLeKG-eXDngFRYlGe3_f8RaSXPBf3i4jWpa0 +id: remote_video +label: 'Remote video' +description: 'A remotely hosted video from YouTube or Vimeo.' +source: 'oembed:video' +queue_thumbnail_downloads: false +new_revision: true +source_configuration: + thumbnails_directory: 'public://oembed_thumbnails' + providers: + - YouTube + - Vimeo + source_field: field_media_oembed_video +field_map: + title: name diff --git a/tests/behat/fixtures/d8/config/sync/media.type.video.yml b/tests/behat/fixtures/d8/config/sync/media.type.video.yml new file mode 100644 index 00000000..a6701e13 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/media.type.video.yml @@ -0,0 +1,16 @@ +uuid: 15f212a9-d192-4654-9118-da5daf22cf9c +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: hzgvcRgZHltqWf8hBmttoWh95tCJoPL25lPq9YSIRsY +id: video +label: Video +description: 'A locally hosted video file.' +source: video_file +queue_thumbnail_downloads: false +new_revision: true +source_configuration: + source_field: field_media_video_file +field_map: + name: name diff --git a/tests/behat/fixtures/d8/config/sync/media_library.settings.yml b/tests/behat/fixtures/d8/config/sync/media_library.settings.yml new file mode 100644 index 00000000..62ce1ed4 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/media_library.settings.yml @@ -0,0 +1,3 @@ +advanced_ui: false +_core: + default_config_hash: _3gQsCnZELUjUUqHk8SSh8bXnx7TZwN95vctAeVJG60 diff --git a/tests/behat/fixtures/d8/config/sync/system.action.media_delete_action.yml b/tests/behat/fixtures/d8/config/sync/system.action.media_delete_action.yml new file mode 100644 index 00000000..44ce308e --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/system.action.media_delete_action.yml @@ -0,0 +1,13 @@ +uuid: 62c5c7fa-a117-471e-ad26-98a96f46d0d8 +langcode: en +status: true +dependencies: + module: + - media +_core: + default_config_hash: FrZy1tmuXJcOxhXlBoI1Hsnen5TT-9OCC1iolWH84go +id: media_delete_action +label: 'Delete media' +type: media +plugin: 'entity:delete_action:media' +configuration: { } diff --git a/tests/behat/fixtures/d8/config/sync/system.action.media_publish_action.yml b/tests/behat/fixtures/d8/config/sync/system.action.media_publish_action.yml new file mode 100644 index 00000000..a0eef0aa --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/system.action.media_publish_action.yml @@ -0,0 +1,13 @@ +uuid: 80dd2371-10b9-46cb-9f5d-40c3eda11160 +langcode: en +status: true +dependencies: + module: + - media +_core: + default_config_hash: nh83qNNrmWE-CDdHz2MdFOAk60T9mzv3R-MaKfZR2jw +id: media_publish_action +label: 'Publish media' +type: media +plugin: 'entity:publish_action:media' +configuration: { } diff --git a/tests/behat/fixtures/d8/config/sync/system.action.media_save_action.yml b/tests/behat/fixtures/d8/config/sync/system.action.media_save_action.yml new file mode 100644 index 00000000..76e1e4fc --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/system.action.media_save_action.yml @@ -0,0 +1,13 @@ +uuid: c46ff9f1-dd9d-483b-b460-913a03dbd755 +langcode: en +status: true +dependencies: + module: + - media +_core: + default_config_hash: VVyUA6PIaVeGtcIbgEWqJ6SYDiJdReBeojFswURFpKs +id: media_save_action +label: 'Save media' +type: media +plugin: 'entity:save_action:media' +configuration: { } diff --git a/tests/behat/fixtures/d8/config/sync/system.action.media_unpublish_action.yml b/tests/behat/fixtures/d8/config/sync/system.action.media_unpublish_action.yml new file mode 100644 index 00000000..52296da2 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/system.action.media_unpublish_action.yml @@ -0,0 +1,13 @@ +uuid: 16f8732e-8245-4d48-83e1-bb0b0892455f +langcode: en +status: true +dependencies: + module: + - media +_core: + default_config_hash: CsK6TseQ2DatEbZgbd30swOlZ28_HHwAESU2LvEnWq0 +id: media_unpublish_action +label: 'Unpublish media' +type: media +plugin: 'entity:unpublish_action:media' +configuration: { } diff --git a/tests/behat/fixtures/d8/config/sync/user.role.anonymous.yml b/tests/behat/fixtures/d8/config/sync/user.role.anonymous.yml index 847da464..38be0892 100644 --- a/tests/behat/fixtures/d8/config/sync/user.role.anonymous.yml +++ b/tests/behat/fixtures/d8/config/sync/user.role.anonymous.yml @@ -14,3 +14,4 @@ permissions: - 'access site-wide contact form' - 'search content' - 'use text format restricted_html' + - 'view media' diff --git a/tests/behat/fixtures/d8/config/sync/user.role.authenticated.yml b/tests/behat/fixtures/d8/config/sync/user.role.authenticated.yml index 12ebcd00..062e1709 100644 --- a/tests/behat/fixtures/d8/config/sync/user.role.authenticated.yml +++ b/tests/behat/fixtures/d8/config/sync/user.role.authenticated.yml @@ -17,3 +17,4 @@ permissions: - 'search content' - 'skip comment approval' - 'use text format basic_html' + - 'view media' diff --git a/tests/behat/fixtures/d8/config/sync/views.view.media.yml b/tests/behat/fixtures/d8/config/sync/views.view.media.yml new file mode 100644 index 00000000..5901a8be --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/views.view.media.yml @@ -0,0 +1,907 @@ +uuid: 3f3413aa-598d-4d7e-a04c-e1e6351c3695 +langcode: en +status: true +dependencies: + config: + - image.style.thumbnail + module: + - image + - media + - user +_core: + default_config_hash: UZP23LgBdE1XbvscbLCdd9uTk5t4qqA1Z56koqbvYP0 +id: media +label: Media +module: views +description: 'Find and manage media.' +tag: '' +base_table: media_field_data +base_field: mid +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access media overview' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Filter + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: full + options: + items_per_page: 50 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: '‹ Previous' + next: 'Next ›' + first: '« First' + last: 'Last »' + quantity: 9 + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + override: true + sticky: false + caption: '' + summary: '' + description: '' + columns: + name: name + bundle: bundle + changed: changed + uid: uid + status: status + thumbnail__target_id: thumbnail__target_id + info: + name: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + bundle: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + changed: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: '' + uid: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + status: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + thumbnail__target_id: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + default: changed + empty_table: true + row: + type: fields + fields: + media_bulk_form: + id: media_bulk_form + table: media + field: media_bulk_form + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + action_title: Action + include_exclude: exclude + selected_actions: { } + entity_type: media + plugin_id: bulk_form + thumbnail__target_id: + id: thumbnail__target_id + table: media_field_data + field: thumbnail__target_id + relationship: none + group_type: group + admin_label: '' + label: Thumbnail + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: image + settings: + image_style: thumbnail + image_link: '' + group_column: '' + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: media + entity_field: thumbnail + plugin_id: field + name: + id: name + table: media_field_data + field: name + entity_type: media + entity_field: media + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + label: 'Media name' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + bundle: + id: bundle + table: media_field_data + field: bundle + relationship: none + group_type: group + admin_label: '' + label: Type + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: false + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: media + entity_field: bundle + plugin_id: field + uid: + id: uid + table: media_field_data + field: uid + relationship: none + group_type: group + admin_label: '' + label: Author + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: true + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: media + entity_field: uid + plugin_id: field + status: + id: status + table: media_field_data + field: status + relationship: none + group_type: group + admin_label: '' + label: Status + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: custom + format_custom_true: Published + format_custom_false: Unpublished + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: media + entity_field: status + plugin_id: field + changed: + id: changed + table: media_field_data + field: changed + relationship: none + group_type: group + admin_label: '' + label: Updated + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: short + custom_date_format: '' + timezone: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: media + entity_field: changed + plugin_id: field + operations: + id: operations + table: media + field: operations + relationship: none + group_type: group + admin_label: '' + label: Operations + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: true + entity_type: media + plugin_id: entity_operations + filters: + name: + id: name + table: media_field_data + field: name + relationship: none + group_type: group + admin_label: '' + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: name_op + label: 'Media name' + description: '' + use_operator: false + operator: name_op + identifier: name + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: name + plugin_id: string + bundle: + id: bundle + table: media_field_data + field: bundle + relationship: none + group_type: group + admin_label: '' + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: bundle_op + label: Type + description: '' + use_operator: false + operator: bundle_op + identifier: type + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: bundle + plugin_id: bundle + status: + id: status + table: media_field_data + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: true + expose: + operator_id: '' + label: 'True' + description: null + use_operator: false + operator: status_op + identifier: status + required: true + remember: false + multiple: false + remember_roles: + authenticated: authenticated + operator_limit_selection: false + operator_list: { } + is_grouped: true + group_info: + label: 'Published status' + description: '' + identifier: status + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: + 1: + title: Published + operator: '=' + value: '1' + 2: + title: Unpublished + operator: '=' + value: '0' + plugin_id: boolean + entity_type: media + entity_field: status + status_extra: + id: status_extra + table: media_field_data + field: status_extra + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + plugin_id: media_status + langcode: + id: langcode + table: media_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: langcode_op + label: Language + description: '' + use_operator: false + operator: langcode_op + identifier: langcode + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: langcode + plugin_id: language + sorts: + created: + id: created + table: media_field_data + field: created + order: DESC + entity_type: media + entity_field: created + plugin_id: date + relationship: none + group_type: group + admin_label: '' + exposed: false + expose: + label: '' + granularity: second + title: Media + header: { } + footer: { } + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + empty: true + tokenize: false + content: 'No media available.' + plugin_id: text_custom + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - user + - user.permissions + tags: { } + media_page_list: + display_plugin: page + id: media_page_list + display_title: Media + position: 1 + display_options: + display_extenders: { } + path: admin/content/media + menu: + type: tab + title: Media + description: '' + expanded: false + parent: '' + weight: 0 + context: '0' + menu_name: main + display_description: '' + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - user + - user.permissions + tags: { } diff --git a/tests/behat/fixtures/d8/config/sync/views.view.media_library.yml b/tests/behat/fixtures/d8/config/sync/views.view.media_library.yml new file mode 100644 index 00000000..11aaed08 --- /dev/null +++ b/tests/behat/fixtures/d8/config/sync/views.view.media_library.yml @@ -0,0 +1,1389 @@ +uuid: 13151203-166b-4883-9fcd-3a6a44af8cf9 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.media_library + - image.style.media_library + enforced: + module: + - media_library + module: + - image + - media + - media_library + - user +_core: + default_config_hash: dHOSWSHbMJNke0ZBGh1O5KrnwynSOCOpQycITW-pwfs +id: media_library +label: 'Media library' +module: views +description: 'Find and manage media.' +tag: '' +base_table: media_field_data +base_field: mid +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access media overview' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: 'Apply filters' + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: false + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 24 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '6, 12, 24, 48' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + fields: + media_bulk_form: + id: media_bulk_form + table: media + field: media_bulk_form + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + action_title: Action + include_exclude: exclude + selected_actions: { } + entity_type: media + plugin_id: bulk_form + rendered_entity: + id: rendered_entity + table: media + field: rendered_entity + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + view_mode: media_library + entity_type: media + plugin_id: rendered_entity + filters: + status: + id: status + table: media_field_data + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: true + expose: + operator_id: '' + label: 'Publishing status' + description: null + use_operator: false + operator: status_op + identifier: status + required: true + remember: false + multiple: false + remember_roles: + authenticated: authenticated + operator_limit_selection: false + operator_list: { } + is_grouped: true + group_info: + label: Published + description: '' + identifier: status + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: + 1: + title: Published + operator: '=' + value: '1' + 2: + title: Unpublished + operator: '=' + value: '0' + plugin_id: boolean + entity_type: media + entity_field: status + name: + id: name + table: media_field_data + field: name + relationship: none + group_type: group + admin_label: '' + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: name_op + label: Name + description: '' + use_operator: false + operator: name_op + identifier: name + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: name + plugin_id: string + bundle: + id: bundle + table: media_field_data + field: bundle + relationship: none + group_type: group + admin_label: '' + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: bundle_op + label: 'Media type' + description: '' + use_operator: false + operator: bundle_op + identifier: type + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: 'Media type' + description: null + identifier: bundle + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: + 1: { } + 2: { } + 3: { } + entity_type: media + entity_field: bundle + plugin_id: bundle + status_extra: + id: status_extra + table: media_field_data + field: status_extra + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + plugin_id: media_status + langcode: + id: langcode + table: media_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: langcode_op + label: Language + description: '' + use_operator: false + operator: langcode_op + identifier: langcode + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: langcode + plugin_id: language + sorts: + created: + id: created + table: media_field_data + field: created + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: true + expose: + label: 'Newest first' + granularity: second + entity_type: media + entity_field: created + plugin_id: date + name: + id: name + table: media_field_data + field: name + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: true + expose: + label: 'Name (A-Z)' + entity_type: media + entity_field: name + plugin_id: standard + name_1: + id: name_1 + table: media_field_data + field: name + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: true + expose: + label: 'Name (Z-A)' + entity_type: media + entity_field: name + plugin_id: standard + title: Media + header: { } + footer: { } + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + empty: true + tokenize: false + content: 'No media available.' + plugin_id: text_custom + relationships: { } + display_extenders: { } + use_ajax: true + css_class: '' + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_interface' + - url + - url.query_args + - 'url.query_args:sort_by' + - user + - user.permissions + tags: { } + page: + display_plugin: page + id: page + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: admin/content/media-grid + fields: + media_bulk_form: + id: media_bulk_form + table: media + field: media_bulk_form + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + action_title: Action + include_exclude: exclude + selected_actions: { } + entity_type: media + plugin_id: bulk_form + name: + id: name + table: media_field_data + field: name + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: true + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: media + entity_field: name + plugin_id: field + edit_media: + id: edit_media + table: media + field: edit_media + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: true + text: 'Edit {{ name }}' + make_link: true + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: 'Edit {{ name }}' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '0' + element_wrapper_class: '' + element_default_classes: false + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + text: Edit + output_url_as_text: false + absolute: false + entity_type: media + plugin_id: entity_link_edit + delete_media: + id: delete_media + table: media + field: delete_media + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: true + text: 'Delete {{ name }}' + make_link: true + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: 'Delete {{ name }}' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '0' + element_wrapper_class: '' + element_default_classes: false + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + text: Delete + output_url_as_text: false + absolute: false + entity_type: media + plugin_id: entity_link_delete + rendered_entity: + id: rendered_entity + table: media + field: rendered_entity + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + view_mode: media_library + entity_type: media + plugin_id: rendered_entity + defaults: + fields: false + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'url.query_args:sort_by' + - user + - user.permissions + tags: { } + widget: + display_plugin: page + id: widget + display_title: Widget + position: 2 + display_options: + display_extenders: { } + path: admin/content/media-widget + fields: + media_library_select_form: + id: media_library_select_form + table: media + field: media_library_select_form + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + entity_type: media + plugin_id: media_library_select_form + rendered_entity: + id: rendered_entity + table: media + field: rendered_entity + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + view_mode: media_library + entity_type: media + plugin_id: rendered_entity + defaults: + fields: false + access: false + filters: false + filter_groups: false + arguments: false + header: false + css_class: false + display_description: '' + access: + type: perm + options: + perm: 'view media' + filters: + status: + id: status + table: media_field_data + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: status + plugin_id: boolean + name: + id: name + table: media_field_data + field: name + relationship: none + group_type: group + admin_label: '' + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: name_op + label: Name + description: '' + use_operator: false + operator: name_op + identifier: name + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: name + plugin_id: string + default_langcode: + id: default_langcode + table: media_field_data + field: default_langcode + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: default_langcode + plugin_id: boolean + filter_groups: + operator: AND + groups: + 1: AND + arguments: + bundle: + id: bundle + table: media_field_data + field: bundle + relationship: none + group_type: group + admin_label: '' + default_action: ignore + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + default_argument_skip_url: false + summary_options: + base_path: '' + count: true + items_per_page: 24 + override: false + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + glossary: false + limit: 0 + case: none + path_case: none + transform_dash: false + break_phrase: false + entity_type: media + entity_field: bundle + plugin_id: string + header: + display_link_grid: + id: display_link_grid + table: views + field: display_link + display_id: widget + label: Grid + plugin_id: display_link + empty: true + display_link_table: + id: display_link_table + table: views + field: display_link + display_id: widget_table + label: Table + plugin_id: display_link + empty: true + css_class: '' + rendering_language: '***LANGUAGE_language_interface***' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + - url.query_args + - 'url.query_args:sort_by' + - user.permissions + tags: { } + widget_table: + display_plugin: page + id: widget_table + display_title: 'Widget (table)' + position: 3 + display_options: + display_extenders: { } + path: admin/content/media-widget-table + style: + type: table + options: + row_class: 'media-library-item media-library-item--table js-media-library-item js-click-to-select' + default_row_class: true + defaults: + style: false + row: false + fields: false + access: false + filters: false + filter_groups: false + arguments: false + header: false + css_class: false + row: + type: fields + fields: + media_library_select_form: + id: media_library_select_form + label: '' + table: media + field: media_library_select_form + relationship: none + entity_type: media + plugin_id: media_library_select_form + element_wrapper_class: '' + element_class: '' + thumbnail__target_id: + id: thumbnail__target_id + label: Thumbnail + table: media_field_data + field: thumbnail__target_id + relationship: none + type: image + entity_type: media + entity_field: thumbnail + plugin_id: field + settings: + image_style: media_library + image_link: '' + name: + id: name + label: Name + table: media_field_data + field: name + relationship: none + type: string + entity_type: media + entity_field: name + plugin_id: field + settings: + link_to_entity: false + uid: + id: uid + label: Author + table: media_field_revision + field: uid + relationship: none + type: entity_reference_label + entity_type: media + entity_field: uid + plugin_id: field + settings: + link: true + changed: + id: changed + label: Updated + table: media_field_data + field: changed + relationship: none + type: timestamp + entity_type: media + entity_field: changed + plugin_id: field + settings: + date_format: short + custom_date_format: '' + timezone: '' + access: + type: perm + options: + perm: 'view media' + filters: + status: + id: status + table: media_field_data + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: status + plugin_id: boolean + name: + id: name + table: media_field_data + field: name + relationship: none + group_type: group + admin_label: '' + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: name_op + label: Name + description: '' + use_operator: false + operator: name_op + identifier: name + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + operator_limit_selection: false + operator_list: { } + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: name + plugin_id: string + default_langcode: + id: default_langcode + table: media_field_data + field: default_langcode + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: media + entity_field: default_langcode + plugin_id: boolean + filter_groups: + operator: AND + groups: + 1: AND + arguments: + bundle: + id: bundle + table: media_field_data + field: bundle + relationship: none + group_type: group + admin_label: '' + default_action: ignore + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + default_argument_skip_url: false + summary_options: + base_path: '' + count: true + items_per_page: 24 + override: false + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + glossary: false + limit: 0 + case: none + path_case: none + transform_dash: false + break_phrase: false + entity_type: media + entity_field: bundle + plugin_id: string + header: + display_link_grid: + id: display_link_grid + table: views + field: display_link + display_id: widget + label: Grid + plugin_id: display_link + empty: true + display_link_table: + id: display_link_table + table: views + field: display_link + display_id: widget_table + label: Table + plugin_id: display_link + empty: true + css_class: '' + rendering_language: '***LANGUAGE_language_interface***' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + - url.query_args + - 'url.query_args:sort_by' + - user.permissions + tags: { } diff --git a/tests/behat/fixtures/d8/docroot/modules/custom/mysite_core/mysite_core.module b/tests/behat/fixtures/d8/docroot/modules/custom/mysite_core/mysite_core.module index 911f8aa5..2a4a86e2 100644 --- a/tests/behat/fixtures/d8/docroot/modules/custom/mysite_core/mysite_core.module +++ b/tests/behat/fixtures/d8/docroot/modules/custom/mysite_core/mysite_core.module @@ -7,9 +7,21 @@ /** * Implements hook_form_alter(). */ -function mysite_core_form_alter() { - if (\Drupal::currentUser()->isAuthenticated()) { +function mysite_core_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { + if ($form_id == 'search_block_form' && \Drupal::currentUser()->isAuthenticated()) { // Set test cookie to retrieve from tests, but only for authenticated user. setcookie('testcookiename', 'testcookievalue'); } } + +/** + * Implements hook_mail(). + */ +function mysite_core_mail($key, &$message, $params) { + switch ($key) { + case 'test_email': + // Add test subject to all test emails. + $message['subject'] = t('Test Email'); + break; + } +}