Skip to content

Commit 4475088

Browse files
authored
Merge branch 'core-beta' into wp-6-9
2 parents eb1e7c8 + a3dfe61 commit 4475088

File tree

10 files changed

+39
-8
lines changed

10 files changed

+39
-8
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
4+
## [3.9.3] (2025-12-03)
5+
6+
### Added
7+
* end-to-end tests to verify the toggle visual state in the snippets list page, improving UI verification and test reliability
8+
9+
### Fixed
10+
* Fix missing import of common/direction in src/css/manage.scss to restore correct styling and direction-aware layout
11+
* Fix toggle activation check to ensure the correct transformation value is used when detecting active/inactive state
12+
313
## [3.9.2] (2025-11-17)
414

515
### Changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "code-snippets",
33
"description": "Manage code snippets running on a WordPress-powered site through a graphical interface.",
44
"homepage": "https://codesnippets.pro",
5-
"version": "3.9.2",
5+
"version": "3.9.3",
66
"main": "src/dist/edit.js",
77
"directories": {
88
"test": "tests"

src/code-snippets.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
* License: GPL-2.0-or-later
99
* License URI: license.txt
1010
* Text Domain: code-snippets
11-
* Version: 3.9.2
11+
* Version: 3.9.3
1212
* Requires PHP: 7.4
1313
* Requires at least: 5.0
1414
*
15-
* @version 3.9.2
15+
* @version 3.9.3
1616
* @package Code_Snippets
1717
* @author Shea Bunge <shea@codesnippets.pro>
1818
* @copyright 2012-2024 Code Snippets Pro
@@ -37,7 +37,7 @@
3737
*
3838
* @const string
3939
*/
40-
define( 'CODE_SNIPPETS_VERSION', '3.9.2' );
40+
define( 'CODE_SNIPPETS_VERSION', '3.9.3' );
4141

4242
/**
4343
* The full path to the main file of this plugin.

src/css/manage.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@use 'common/theme';
88
@use 'common/badges';
99
@use 'common/switch';
10+
@use 'common/direction';
1011
@use 'common/select';
1112
@use 'manage/cloud';
1213

src/readme.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://codesnippets.pro
44
Tags: code, snippets, multisite, php, css
55
License: GPL-2.0-or-later
66
License URI: license.txt
7-
Stable tag: 3.9.2
7+
Stable tag: 3.9.3
88
Tested up to: 6.9
99

1010
An easy, clean and simple way to enhance your site with code snippets.
@@ -104,6 +104,18 @@ You can report security bugs found in the source code of this plugin through the
104104

105105
== Changelog ==
106106

107+
108+
= 3.9.3 (2025-12-03) =
109+
110+
__Added__
111+
112+
* Enhanced end-to-end tests to verify the toggle visual state in the snippets list page, improving UI verification and test reliability
113+
114+
__Fixed__
115+
116+
* Fix missing import of common/direction in src/css/manage.scss to restore correct styling and direction-aware layout
117+
* Fix toggle activation check to ensure the correct transformation value is used when detecting active/inactive state
118+
107119
= 3.9.2 (2025-11-17) =
108120

109121
__Changed__

tests/e2e/code-snippets-list.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ test.describe('Code Snippets List Page Actions', () => {
2828

2929
await expect(toggleSwitch).toHaveAttribute('title', 'Deactivate')
3030

31+
// Check that the toggle is rendered to the right (active)
32+
await expect(snippetRow).toHaveScreenshot('snippet-row-active.png')
33+
3134
await toggleSwitch.click()
3235
await page.waitForLoadState('networkidle')
3336

3437
const updatedRow = page.locator(`tr:has-text("${TEST_SNIPPET_NAME}")`)
3538
const updatedToggle = updatedRow.locator('a.snippet-activation-switch')
3639
await expect(updatedToggle).toHaveAttribute('title', 'Activate')
3740

41+
// Check that the toggle is rendered to the left (inactive)
42+
await expect(updatedRow).toHaveScreenshot('snippet-row-inactive.png')
43+
3844
await updatedToggle.click()
3945
await page.waitForLoadState('networkidle')
4046

7.26 KB
Loading
7.42 KB
Loading

tests/playwright/playwright.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const WORKERS = 1
1010
*/
1111
export default defineConfig({
1212
testDir: '../e2e',
13+
snapshotPathTemplate: '{testDir}/{testFileDir}/{testFileName}-snapshots/{arg}-{platform}{ext}',
1314
fullyParallel: true,
1415
forbidOnly: !!process.env.CI,
1516
retries: process.env.CI ? RETRIES : 0,
@@ -66,6 +67,7 @@ export default defineConfig({
6667
timeout: 30000,
6768

6869
expect: {
69-
timeout: 10000
70+
timeout: 10000,
71+
toHaveScreenshot: { maxDiffPixels: 100 }
7072
}
7173
})

0 commit comments

Comments
 (0)