Skip to content

Commit cdfd88e

Browse files
committed
update tests, add php 7.3 and wp 6.5.5
1 parent 8639e0c commit cdfd88e

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/playwright.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
fail-fast: false # Ensures the matrix doesn't stop if one job fails
1313
matrix:
1414
include:
15+
- php_version: '7.3'
16+
wp_version: 6.5.5
17+
1518
- php_version: '7.3'
1619
wp_version: null
1720

e2e/tests/block-editor.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ test.describe( 'Block Editor', () => {
2424
} ) => {
2525
// Insert Stackable Text Block through block inserter
2626
// Also checks if Stackable Block is in the list of blocks in the Editor
27-
await page.getByLabel( 'Toggle block inserter' ).click()
27+
if ( await page.getByLabel( 'Toggle block inserter' ).isVisible() ) {
28+
// For WP version 6.7 and below
29+
await page.getByLabel( 'Toggle block inserter' ).click()
30+
} else {
31+
// For WP version 6.8
32+
await page.getByLabel( 'Block Inserter' ).click()
33+
}
34+
2835
await page.locator( '.editor-block-list-item-stackable-text' ).click()
2936

3037
await expect( editor.canvas.getByLabel( 'Block: Text' ) ).toBeVisible()

e2e/tests/global-settings.spec.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,15 @@ test.describe( 'Global Settings', () => {
5151

5252
// Verify the newly added global color is in the color picker
5353
await expect( page.getByRole( 'heading', { name: 'Global Colors' } ) ).toBeVisible()
54-
await expect( page.getByLabel( `Color: Custom Color ${ count }` ) ).toBeVisible()
54+
55+
// For WP 6.7 and below, the label for colors has a prefix `Color: `
56+
// For WP 6.8 the prefix was removed.
57+
const regex = new RegExp( `^(?:Color:\\s*)?Custom Color ${ count }$` )
58+
59+
await expect( page.getByLabel( regex ) ).toBeVisible()
5560

5661
// Verify the color value
57-
await page.getByLabel( `Color: Custom Color ${ count }` ).click()
62+
await page.getByLabel( regex ).click()
5863
await expect( page.getByLabel( 'Hex color' ) ).toHaveValue( hexValue )
5964

6065
// Click on the color picker button to close the popup

0 commit comments

Comments
 (0)