Skip to content

Commit

Permalink
EWPP-3349: Fix failing tests for 10.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
hernani committed Aug 31, 2023
1 parent 8158621 commit 6628545
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
*/
class InfoDisclosureExtraFieldTest extends WebDriverTestBase {

/**
* {@inheritdoc}
*/
protected $failOnJavascriptConsoleErrors = FALSE;

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
*/
class InPageNavigationLibraryTest extends WebDriverTestBase {

/**
* {@inheritdoc}
*/
protected $failOnJavascriptConsoleErrors = FALSE;

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
*/
class InPageNavigationParagraphTest extends WebDriverTestBase {

/**
* {@inheritdoc}
*/
protected $failOnJavascriptConsoleErrors = FALSE;

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class WysiwygTableTest extends WebDriverTestBase {

use CKEditorTestTrait;

/**
* {@inheritdoc}
*/
protected $failOnJavascriptConsoleErrors = FALSE;

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
*/
class InPageNavigationBlockTest extends AbstractKernelTestBase {

/**
* {@inheritdoc}
*/
protected $failOnJavascriptConsoleErrors = FALSE;

/**
* Tests the block markup.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public function testSmartTrimFilter(array $variables, array $assertions, array $
* An array of test data arrays with assertions.
*/
public function smartTrimFilterDataProvider(): array {
$drupal_version = (float) substr(\Drupal::VERSION, 0, 4);

return [
'Trim a string' => [
'variables' => [
Expand Down Expand Up @@ -121,7 +123,10 @@ public function smartTrimFilterDataProvider(): array {
],
'assertions' => [
'contains' => [
"<script>\n<!--//--><![CDATA[// ><!--\ndocum...\n//--><!]]>\n</script>",
// https://www.drupal.org/project/drupal/issues/3259255
$drupal_version < 10.1 ?
"&lt;script&gt;\n&lt;!--//--&gt;&lt;![CDATA[// &gt;&lt;!--\ndocum...\n//--&gt;&lt;!]]&gt;\n&lt;/script&gt;" :
"&lt;script&gt;\n//&lt;![CDATA[\ndocum...\n//]]&gt;\n&lt;/script&gt;",
],
],
],
Expand Down

0 comments on commit 6628545

Please sign in to comment.