Skip to content

Commit fe8f5c3

Browse files
authored
test: fix/3708 test failure (#3709)
* fix: add the color in the inserted text similar with other tests * fix: update the php version from 7.3 to 7.4 * fix: use the develop branch instead of the old v3 branch * fix: specify build script to be no-translate
1 parent f74f44e commit fe8f5c3

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/compressed-diff.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v2 # Checkout the Stackable Premium repo.
1414
with:
1515
repository: 'bfintal/Stackable-Premium'
16-
ref: 'v3'
16+
ref: 'develop'
1717
path: 'pro__premium_only'
1818
token: '${{ secrets.ACCESS_KEY }}'
1919
- name: Install Composer Dependencies
@@ -26,6 +26,7 @@ jobs:
2626
- uses: preactjs/compressed-size-action@v2
2727
with:
2828
repo-token: "${{ secrets.GITHUB_TOKEN }}"
29+
build-script: "build:no-translate"
2930
clean-script: "clean"
3031
pattern: "./build/stackable/**"
3132
exclude: "{**/*.map,**/node_modules/**}"

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- php_version: '7.3'
1616
wp_version: 6.5.5
1717

18-
- php_version: '7.3'
18+
- php_version: '7.4'
1919
wp_version: null
2020

2121
- php_version: '8.2'

e2e/tests/block-editor.spec.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,22 @@ test.describe( 'Block Editor', () => {
103103
} ) => {
104104
await editor.insertBlock( {
105105
name: 'stackable/text',
106-
attributes: {
107-
text: 'test',
108-
textColor1: '#ff0000',
109-
},
110106
} )
111107

108+
const settings = page.getByLabel( 'Settings', { exact: true } )
109+
110+
if ( await settings.getAttribute( 'aria-pressed' ) === 'false' ) {
111+
await settings.click()
112+
}
113+
114+
// Add content and color to Stackable Text Block
115+
await editor.canvas.locator( '[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]' ).fill( 'test' )
116+
await page.locator( '.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button' ).first().click()
117+
await page.getByLabel( 'Hex color' ).fill( 'ff0000' )
118+
119+
// Click on the body to close the Color Picker popup
120+
await editor.canvas.locator( 'body' ).click()
121+
112122
const clientId = await editor.canvas.getByLabel( 'Block: Text' ).getAttribute( 'data-block' )
113123
const uniqueId = ( await editor.getBlockAttributes( clientId ) ).uniqueId
114124

0 commit comments

Comments
 (0)