Browse Source

pre mirador fix

master
rdrew 1 week ago
parent
commit
6f6339acd2
  1. 7
      js/checkbox.js
  2. 42
      junk_drawer/tests/src/Functional/Update/OlivesimaginedPostUpdateTest.php
  3. 52
      junk_drawer/tests/src/Unit/OlivesimaginedHexToHslTest.php

7
js/checkbox.js

@ -14,11 +14,4 @@
'<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>'; '<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>';
})(Drupal); })(Drupal);
jQuery( window ).on( "load", function() {
console.log( "window loaded" );
//jQuery(".mirador80").remove();
//jQuery(".mirador104").click();
// jQuery('.mirador104 button.MuiButtonBase-root.MuiIconButton-root').trigger('click');
});

42
junk_drawer/tests/src/Functional/Update/OlivesimaginedPostUpdateTest.php

@ -1,42 +0,0 @@
<?php
namespace Drupal\Tests\olivesimagined\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Tests the update path for Olivesimagined.
*
* @group Update
*/
class OlivesimaginedPostUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../../modules/system/tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz',
];
}
/**
* Tests update hook setting base primary color.
*/
public function testOlivesimaginedPrimaryColorUpdate() {
$config = $this->config('olivesimagined.settings');
$this->assertEmpty($config->get('base_primary_color'));
// Run updates.
$this->runUpdates();
$config = $this->config('olivesimagined.settings');
$this->assertSame('#1b9ae4', $config->get('base_primary_color'));
}
}

52
junk_drawer/tests/src/Unit/OlivesimaginedHexToHslTest.php

@ -1,52 +0,0 @@
<?php
namespace Drupal\Tests\olivesimagined\Unit;
use Drupal\Tests\UnitTestCase;
/**
* Tests the _olivesimagined_hex_to_hsl() function.
*
* @group olivesimagined
*/
final class OlivesimaginedHexToHslTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp(): void {
parent::setUp();
require_once __DIR__ . '/../../../olivesimagined.theme';
}
/**
* Tests hex to HSL conversion.
*
* @param string $hex
* The hex code.
* @param array $expected_hsl
* The expected HSL values.
*
* @dataProvider hexCodes
*/
public function testHexToHsl(string $hex, array $expected_hsl): void {
self::assertEquals($expected_hsl, _olivesimagined_hex_to_hsl($hex));
}
/**
* Data provider of hex codes and HSL values.
*
* @return array[]
* The test data.
*/
public function hexCodes(): array {
return [
'Blue Lagoon' => ['#1b9ae4', [202, 79, 50]],
'Firehouse' => ['#a30f0f', [0, 83, 35]],
'Ice' => ['#57919e', [191, 29, 48]],
'Plum' => ['#7a4587', [288, 32, 40]],
'Slate' => ['#47625b', [164, 16, 33]],
];
}
}
Loading…
Cancel
Save