Skip to content

Commit

Permalink
Issue #3380569: Fix getAddModalBlock for Gin 3.0.0-rc5 (#75)
Browse files Browse the repository at this point in the history
Needs patch from https://www.drupal.org/project/gin/issues/3375350 as well, we do not have a dependency on gin, so we cannot add the patch here.
  • Loading branch information
chrfritsch authored Aug 22, 2023
1 parent d507005 commit 2fef71f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v1

- name: phpcs
uses: chrfritsch/action-drupal-coder@v1
uses: thunder/action-drupal-coder@v1
with:
github_token: ${{ secrets.github_token }}
level: error
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,28 @@ env:
DRUPAL_TESTING_DATABASE_PASSWORD: root
DRUPAL_TESTING_DATABASE_ENGINE: mysql
DRUPAL_TESTING_HTTP_PORT: 8888
DRUPAL_TESTING_PARALLEL_TESTING: true
DRUPAL_TESTING_SELENIUM_HOST: 127.0.0.1
DRUPAL_TESTING_SELENIUM_PORT: 9515
DRUPAL_TESTING_PARALLEL_TESTING: false
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://127.0.0.1:9515"]'
SIMPLETEST_BASE_URL: http://module-testing:8888

jobs:
build:

runs-on: ubuntu-20.04

services:
chrome:
image: drupalci/chromedriver:production
options: --add-host=module-testing:host-gateway --name chrome
ports:
- 9515:9515

strategy:
matrix:
THEME: ['claro', 'gin']
DRUPAL_TESTING_DRUPAL_VERSION: ['~9.4.0', '~10.0.0']
DRUPAL_TESTING_DRUPAL_VERSION: ['~9.5.0', '~10.1.0']
PHP_VERSION: ['8.1']

steps:
Expand Down Expand Up @@ -83,4 +94,3 @@ jobs:
run: test-drupal-project
env:
THEME: ${{ matrix.THEME }}
DRUPAL_TESTING_SELENIUM_CHROME_VERSION: '105.0'
4 changes: 2 additions & 2 deletions js/paragraphs-features.add-in-between.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
* Get paragraphs add modal block in various themes structures.
*
* gin:
* .layer-wrapper table
* .gin-table-scroll-wrapper table
* .form-actions
* claro:
* table
Expand Down Expand Up @@ -158,7 +158,7 @@
sibling = sibling.nextSibling;
}
};
return fromParent(table) || fromParent(table.parentNode);
return fromParent(table) || fromParent(table.parentNode) || fromParent(table.parentNode.parentNode);
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ParagraphsFeatures.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
use Drupal\Component\Utility\Html;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\InsertCommand;
use Drupal\paragraphs_features\Ajax\ScrollToElementCommand;
use Drupal\Core\Field\WidgetInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget;
use Drupal\paragraphs_features\Ajax\ScrollToElementCommand;

/**
* Paragraphs features class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\filter\Entity\FilterFormat;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\Tests\paragraphs\Traits\ParagraphsCoreVersionUiTestTrait;
use Drupal\Tests\paragraphs\FunctionalJavascript\LoginAdminTrait;
use Drupal\Tests\paragraphs\FunctionalJavascript\ParagraphsTestBaseTrait;
use Drupal\Tests\paragraphs\Traits\ParagraphsCoreVersionUiTestTrait;

/**
* Base class for Javascript tests for paragraphs features module.
Expand Down

0 comments on commit 2fef71f

Please sign in to comment.