Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add focal_point patch #829

Merged
merged 4 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"drupal/diff": {
"Back button for comparison page": "https://www.drupal.org/files/issues/back_button_for-2853193-4.patch"
},
"drupal/focal_point": {
"Issue #3462165: Preview results in Error: Call to a member function getDefinitions() on null": "https://www.drupal.org/files/issues/2024-07-18/Preview-results-in-Error-3462165.patch"
},
"drupal/gin": {
"Issue #3455558: There is no visible change to a toggle when pressed (but it does trigger conditional fields, value is saved, etc)": "https://www.drupal.org/files/issues/2024-08-06/3455558-Refactor-toggle-styles-mr438.patch"
},
Expand Down
25 changes: 25 additions & 0 deletions tests/src/FunctionalJavascript/Integration/FocalPointTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Drupal\Tests\thunder\FunctionalJavascript;

/**
* Tests the Image media modification.
*
* @group Thunder
*/
class FocalPointTest extends ThunderJavascriptTestBase {

/**
* Test that focal_point preview is rendered in overlay.
*/
public function testFocalPointPreview(): void {
$node = $this->loadNodeByUuid('0bd5c257-2231-450f-b4c2-ab156af7b78d');
$this->drupalGet($node->toUrl('edit-form'));
$this->clickDrupalSelector('edit-field-teaser-media-selection-0-edit');
$this->clickDrupalSelector('edit-field-image-0-preview-preview-link');

$this->assertSession()->elementExists('css', '#focal-point-derivatives .focal-point-derivative-preview-image');
$this->assertSession()->elementExists('css', '.focal-point-original-image > #focal-point-preview-image');
}

}
Loading