From dff7f9f61dbeaf2a8396bcaf29f6080834cc0128 Mon Sep 17 00:00:00 2001 From: "lee.5151" <lee.5151@osu.edu> Date: Wed, 2 Aug 2023 11:45:50 -0400 Subject: [PATCH] Upgrading drupal/mathjax (3.0.1 => 4.0.2) --- composer.json | 2 +- composer.lock | 18 +++++----- vendor/composer/installed.json | 18 +++++----- vendor/composer/installed.php | 10 +++--- web/modules/mathjax/mathjax.info.yml | 6 ++-- .../tests/src/Functional/MathjaxWebTest.php | 35 ++++++++++--------- 6 files changed, 45 insertions(+), 44 deletions(-) diff --git a/composer.json b/composer.json index 6bb0c49e7d..3016918252 100644 --- a/composer.json +++ b/composer.json @@ -127,7 +127,7 @@ "drupal/libraries": "4.0", "drupal/link_attributes": "1.12", "drupal/linkit": "5.0-beta13", - "drupal/mathjax": "3.0.1", + "drupal/mathjax": "4.0.2", "drupal/media_entity_browser": "2.0-alpha4", "drupal/media_entity_file_replace": "^1.0", "drupal/media_entity_twitter": "2.9", diff --git a/composer.lock b/composer.lock index e00751c8a0..c99c2f904c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c2bb47d13bfe53e2d75bb64e53de9e82", + "content-hash": "5e44a8642c1a018223a53f36ef6178a1", "packages": [ { "name": "alchemy/zippy", @@ -5156,26 +5156,26 @@ }, { "name": "drupal/mathjax", - "version": "3.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://git.drupalcode.org/project/mathjax.git", - "reference": "3.0.1" + "reference": "4.0.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/mathjax-3.0.1.zip", - "reference": "3.0.1", - "shasum": "0298e9e464512d7be51cbfc87404ce2529b30f5f" + "url": "https://ftp.drupal.org/files/projects/mathjax-4.0.2.zip", + "reference": "4.0.2", + "shasum": "e92f2f50aa8149e55af8b1f744cad84cf680d91f" }, "require": { - "drupal/core": "^8 || ^9" + "drupal/core": "^9.1 || ^10" }, "type": "drupal-module", "extra": { "drupal": { - "version": "3.0.1", - "datestamp": "1673381690", + "version": "4.0.2", + "datestamp": "1673381514", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2bb2704405..abef8a072a 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -5351,27 +5351,27 @@ }, { "name": "drupal/mathjax", - "version": "3.0.1", - "version_normalized": "3.0.1.0", + "version": "4.0.2", + "version_normalized": "4.0.2.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/mathjax.git", - "reference": "3.0.1" + "reference": "4.0.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/mathjax-3.0.1.zip", - "reference": "3.0.1", - "shasum": "0298e9e464512d7be51cbfc87404ce2529b30f5f" + "url": "https://ftp.drupal.org/files/projects/mathjax-4.0.2.zip", + "reference": "4.0.2", + "shasum": "e92f2f50aa8149e55af8b1f744cad84cf680d91f" }, "require": { - "drupal/core": "^8 || ^9" + "drupal/core": "^9.1 || ^10" }, "type": "drupal-module", "extra": { "drupal": { - "version": "3.0.1", - "datestamp": "1673381690", + "version": "4.0.2", + "datestamp": "1673381514", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 5ae27e9686..d8bae5bfa0 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'osu-asc-webservices/d8-upstream', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '76170104ccd58f4dee5ecfcce96b1acdc257252c', + 'reference' => '4cbb2152350103f297f5852d6a6816b907061d82', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -896,9 +896,9 @@ 'dev_requirement' => false, ), 'drupal/mathjax' => array( - 'pretty_version' => '3.0.1', - 'version' => '3.0.1.0', - 'reference' => '3.0.1', + 'pretty_version' => '4.0.2', + 'version' => '4.0.2.0', + 'reference' => '4.0.2', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/mathjax', 'aliases' => array(), @@ -1549,7 +1549,7 @@ 'osu-asc-webservices/d8-upstream' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '76170104ccd58f4dee5ecfcce96b1acdc257252c', + 'reference' => '4cbb2152350103f297f5852d6a6816b907061d82', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/web/modules/mathjax/mathjax.info.yml b/web/modules/mathjax/mathjax.info.yml index 4380b0e5e4..eb84fa146e 100644 --- a/web/modules/mathjax/mathjax.info.yml +++ b/web/modules/mathjax/mathjax.info.yml @@ -1,7 +1,7 @@ name: MathJax type: module description: Javascript-based LaTeX rendering solution for your Drupal website. -core_version_requirement: ^8 || ^9 +core_version_requirement: ^9.1 || ^10 configure: mathjax.settings libraries: - mathjax/setup @@ -9,6 +9,6 @@ libraries: - mathjax/config # Information added by Drupal.org packaging script on 2023-01-10 -version: '3.0.1' +version: '4.0.2' project: 'mathjax' -datestamp: 1673381692 +datestamp: 1673381516 diff --git a/web/modules/mathjax/tests/src/Functional/MathjaxWebTest.php b/web/modules/mathjax/tests/src/Functional/MathjaxWebTest.php index 7035a4821f..0d7d3be247 100644 --- a/web/modules/mathjax/tests/src/Functional/MathjaxWebTest.php +++ b/web/modules/mathjax/tests/src/Functional/MathjaxWebTest.php @@ -43,7 +43,7 @@ public static function getInfo() { * * @var array */ - public static $modules = ['mathjax', 'filter']; + protected static $modules = ['mathjax', 'filter']; /** * Set up the test environment. @@ -67,16 +67,16 @@ public function testAdmin() { $config = Drupal::config('mathjax.settings'); $this->drupalLogin($this->administrator); $this->drupalGet('admin/config'); - $this->assertText('Configure global settings for MathJax.'); + $this->assertSession()->pageTextContains('Configure global settings for MathJax.'); $this->drupalGet('admin/config/content/formats/add'); - $this->assertText('Mathematics inside the configured delimiters is rendered by MathJax'); + $this->assertSession()->pageTextContains('Mathematics inside the configured delimiters is rendered by MathJax'); $this->drupalGet('admin/config/content/mathjax'); - $this->assertTitle('MathJax | Drupal'); - $this->assertText('MathJax CDN URL'); - $this->assertFieldByName('cdn_url', $config->get('cdn_url')); - $this->assertText('Enter the MathJax CDN url here or leave it unchanged to use the one provided by www.mathjax.org.'); - $this->assertText('Configuration Type'); - $this->assertFieldByName('config_type', 0); + $this->assertSession()->titleEquals('MathJax | Drupal'); + $this->assertSession()->pageTextContains('MathJax CDN URL'); + $this->assertSession()->fieldValueEquals('cdn_url', $config->get('cdn_url')); + $this->assertSession()->pageTextContains('Enter the MathJax CDN url here or leave it unchanged to use the one provided by www.mathjax.org.'); + $this->assertSession()->pageTextContains('Configuration Type'); + $this->assertSession()->fieldValueEquals('config_type', 0); $custom = '{"tex2jax":{"inlineMath":[["#","#"],["\\(","\\)"]],"processEscapes":"true"},"showProcessingMessages":"false","messageStyle":"none"}'; $path = 'admin/config/content/mathjax'; @@ -84,10 +84,11 @@ public function testAdmin() { 'config_type' => 1, 'config_string' => $custom, ]; + $this->drupalGet($path); - $this->drupalPostForm($path, $edit, t('Save configuration')); - $this->assertText('Enter a JSON configuration string as documented'); - $this->assertRaw(htmlentities($custom)); + $this->submitForm($edit, t('Save configuration')); + $this->assertSession()->pageTextContains('Enter a JSON configuration string as documented'); + $this->assertSession()->responseContains(htmlentities($custom)); } /** @@ -96,14 +97,14 @@ public function testAdmin() { public function testLibraryDetection() { $this->drupalLogin($this->administrator); $this->drupalGet('admin/reports/status'); - $this->assertNoText('MathJax is configured to use local library files but they could not be found. See the README.'); + $this->assertSession()->pageTextNotContains('MathJax is configured to use local library files but they could not be found. See the README.'); $this->drupalGet('admin/config/content/mathjax'); $edit = [ 'use_cdn' => FALSE, ]; - $this->drupalPostForm(NULL, $edit, t('Save configuration')); + $this->submitForm($edit, t('Save configuration')); $this->drupalGet('admin/reports/status'); - $this->assertText('MathJax is configured to use local library files but they could not be found. See the README.'); + $this->assertSession()->pageTextContains('MathJax is configured to use local library files but they could not be found. See the README.'); } /** @@ -114,12 +115,12 @@ public function testFilterOrder() { // Activate the MathJax filter on the plain_text format. $this->drupalGet('admin/config/content/formats/manage/plain_text'); $edit = ['filters[filter_mathjax][status]' => TRUE]; - $this->drupalPostForm(NULL, $edit, t('Save configuration')); + $this->submitForm($edit, t('Save configuration')); $this->drupalGet('admin/config/content/formats/manage/plain_text'); // Ensure that MathJax appears at the bottom of the active filter list. $count = count($this->xpath("//div[@id='edit-filters-status']/div/input[@class='form-checkbox' and @checked='checked']")); $result = $this->xpath("//table[@id='filter-order']/tbody/tr[$count]/td[1]"); - $this->assertEqual($result[0]->getText(), 'MathJax'); + $this->assertEquals($result[0]->getText(), 'MathJax'); } } -- GitLab