Skip to content

Commit a2f564d

Browse files
committed
Try to fix the E2E test with AI in Opus 4.5
15s Run ./vendor/bin/phpunit ./vendor/bin/phpunit shell: /usr/bin/bash -e {0} env: WP_VERSION: 6.7 WP_SITE_URL: http://localhost:8100 WP_DB_NAME: wordpress WP_DB_USER: root WP_DB_PASS: root WP_DB_HOST: 127.0.0.1 COMPOSER_PROCESS_TIMEOUT: 0 COMPOSER_NO_INTERACTION: 1 COMPOSER_NO_AUDIT: 1 PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin PHPUnit 12.4.0 by Sebastian Bergmann and contributors. Runtime: PHP 8.4.14 Configuration: /home/runner/work/wordpress-plugin/wordpress-plugin/phpunit.xml .E 2 / 2 (100%) Saved Browser Artifacts: test_adds_script_with_ignored_pages Saved Source Files: * ./var/browser/source/error_Tests-Browser-PluginSettingsTest__test_adds_script_with_ignored_pages__0.html: Saved Console Logs: * ./var/browser/console-logs/error_Tests-Browser-PluginSettingsTest__test_adds_script_with_ignored_pages__0.log: Saved Screenshots: * ./var/browser/screenshots/error_Tests-Browser-PluginSettingsTest__test_adds_script_with_ignored_pages__0.png: Time: 00:14.918, Memory: 22.00 MB There was 1 error: 1) Tests\Browser\PluginSettingsTest::test_adds_script_with_ignored_pages Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value|placeholder "simpleanalytics_ignore_pages" not found. /home/runner/work/wordpress-plugin/wordpress-plugin/vendor/behat/mink/src/Element/TraversableElement.php:163 /home/runner/work/wordpress-plugin/wordpress-plugin/vendor/zenstruck/browser/src/Browser.php:214 /home/runner/work/wordpress-plugin/wordpress-plugin/tests/Browser/PluginSettingsTest.php:25 ERRORS! Tests: 2, Assertions: 6, Errors: 1. Error: Process completed with exit code 2.
1 parent 75d5fe7 commit a2f564d

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

resources/css/settings.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
@import url(https://fonts.bunny.net/css?family=space-grotesk:500,600);
22

3-
@tailwind base;
4-
@tailwind components;
3+
.sa-settings {
4+
@tailwind base;
5+
@tailwind components;
6+
}
7+
58
@tailwind utilities;

src/UI/PageLayoutComponent.php

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public function __invoke(): void
3131
padding-left: 0;
3232
}
3333
</style>
34-
<template shadowrootmode="open">
35-
<link rel="preconnect" href="https://fonts.bunny.net">
36-
<link rel="stylesheet" href="<?php echo PLUGIN_URL ?>build/css/settings.css">
34+
<link rel="preconnect" href="https://fonts.bunny.net">
35+
<link rel="stylesheet" href="<?php echo PLUGIN_URL ?>build/css/settings.css">
36+
<div class="sa-settings">
3737
<form method="post" action="options.php">
3838
<!-- Hidden fields -->
3939
<?php settings_fields($this->page->getOptionGroup($currentTab)); ?>
@@ -106,22 +106,8 @@ function sa_textarea_add_value(textarea, value) {
106106
textarea.value += `\n${value}`;
107107
}
108108
}
109-
</script>
110-
</template>
111-
<script>
112-
// Polyfill in case the browser has no support for shadowRootMode
113-
// 1. https://developer.chrome.com/docs/css-ui/declarative-shadow-dom#polyfill
114-
// 2. https://caniuse.com/mdn-html_elements_template_shadowrootmode
115-
(function attachShadowRoots(root) {
116-
root.querySelectorAll("template[shadowrootmode]").forEach(template => {
117-
const mode = template.getAttribute("shadowrootmode");
118-
const shadowRoot = template.parentNode.attachShadow({ mode });
119-
shadowRoot.appendChild(template.content);
120-
template.remove();
121-
attachShadowRoots(shadowRoot);
122-
});
123-
})(document);
124-
</script>
109+
</script>
110+
</div>
125111
<?php
126112
}
127113

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
content: [
77
'./**/*.php',
88
],
9+
important: '.sa-settings',
910
theme: {
1011
extend: {
1112
colors: {

0 commit comments

Comments
 (0)