Skip to content

Commit 643dfee

Browse files
committed
try multiple upload
1 parent 926fdb0 commit 643dfee

File tree

2 files changed

+61
-52
lines changed

2 files changed

+61
-52
lines changed

.github/workflows/playwright.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,26 @@ jobs:
2828
run: wp-env start
2929
- name: Run playwright tests
3030
env:
31-
WP_BASE_URL: http://localhost:8888
32-
WP_AUTH_STORAGE: wp-auth.json
33-
WP_USERNAME: admin
34-
WP_PASSWORD: password
35-
STACKABLE_SLUG: Stackable/plugin
31+
WP_BASE_URL: http://localhost:8888
32+
WP_AUTH_STORAGE: wp-auth.json
33+
WP_USERNAME: admin
34+
WP_PASSWORD: password
35+
STACKABLE_SLUG: Stackable/plugin
3636
run: npm run test
3737
- uses: markpatterson27/markdown-to-output@v1
3838
id: mto
3939
if: ${{ !cancelled() }}
4040
with:
41-
filepath: ./playwright-errors/errors.md
41+
filepath: ./playwright-errors/errors.md
42+
- uses: initdc/upload-artifact@baac12d9f85834b2f8baa26a08ff97c27cc82cd9
43+
id: upload-traces
44+
if: ${{ !cancelled() }}
45+
with:
46+
artifact-per-file: true
47+
artifact-name-rule: ${dir}-${name}${ext}
48+
path: |
49+
test-results/*/trace.zip
50+
retention-days: 1
4251
- uses: actions/upload-artifact@v4
4352
if: ${{ !cancelled() }}
4453
id: artifact-upload-step

e2e/tests/site-editor.spec.ts

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -55,51 +55,51 @@ test.describe( 'Site Editor', () => {
5555
await expect( page.getByLabel( 'Advanced Tab' ) ).toBeVisible()
5656
} )
5757

58-
test( 'A Stackable block\'s attributes should update when settings are changed in the Inspector Controls.', async ( {
59-
page,
60-
editor,
61-
} ) => {
62-
await editor.insertBlock( {
63-
name: 'stackable/text',
64-
}, { clientId: postContentBlock.clientId } )
65-
await editor.canvas.getByLabel( 'Type / to choose a block' ).fill( 'test' )
66-
await expect( page.locator( '#inspector-textarea-control-0' ) ).toContainText( 'test' )
67-
await page.locator( '.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button' ).first().click()
68-
await page.getByLabel( 'Hex color' ).fill( 'ff0000' )
69-
await editor.canvas.locator( 'body' ).click()
70-
71-
await expect( editor.canvas.locator( '[data-type="stackable/text"]' ) ).toContainText( 'test' )
72-
await expect( editor.canvas.locator( '[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]' ) ).toHaveCSS( 'color', 'rgb(255, 0, 0)' )
73-
74-
await editor.saveDraft()
75-
76-
const blocks = await editor.getBlocks( { clientId: postContentBlock.clientId } )
77-
const textBlock = blocks.find( block => block.name === 'stackable/text' )
78-
expect( textBlock.attributes.text ).toBe( 'test' )
79-
expect( textBlock.attributes.textColor1 ).toBe( '#ff0000' )
80-
} )
81-
82-
test( 'The Stackable block added in the site editor should be visible in the frontend', async ( {
83-
editor,
84-
} ) => {
85-
await editor.insertBlock( {
86-
name: 'stackable/text',
87-
attributes: {
88-
text: 'test',
89-
textColor1: '#ff0000',
90-
},
91-
}, { clientId: postContentBlock.clientId } )
92-
93-
const blocks = await editor.getBlocks( { clientId: postContentBlock.clientId } )
94-
const uniqueId = blocks.find( block => block.name === 'stackable/text' ).attributes.uniqueId
95-
96-
await editor.saveDraft()
97-
98-
const preview = await editor.openPreviewPage()
99-
100-
await expect( preview.locator( `[data-block-id="${ uniqueId }"]` ) ).toBeVisible()
101-
await expect( preview.locator( `[data-block-id="${ uniqueId }"]` ) ).toContainText( 'test' )
102-
await expect( preview.locator( `[data-block-id="${ uniqueId }"] p` ) ).toHaveCSS( 'color', 'rgb(255, 0, 0)' )
103-
} )
58+
// test( 'A Stackable block\'s attributes should update when settings are changed in the Inspector Controls.', async ( {
59+
// page,
60+
// editor,
61+
// } ) => {
62+
// await editor.insertBlock( {
63+
// name: 'stackable/text',
64+
// }, { clientId: postContentBlock.clientId } )
65+
// await editor.canvas.getByLabel( 'Type / to choose a block' ).fill( 'test' )
66+
// await expect( page.locator( '#inspector-textarea-control-0' ) ).toContainText( 'test' )
67+
// await page.locator( '.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button' ).first().click()
68+
// await page.getByLabel( 'Hex color' ).fill( 'ff0000' )
69+
// await editor.canvas.locator( 'body' ).click()
70+
71+
// await expect( editor.canvas.locator( '[data-type="stackable/text"]' ) ).toContainText( 'test' )
72+
// await expect( editor.canvas.locator( '[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]' ) ).toHaveCSS( 'color', 'rgb(255, 0, 0)' )
73+
74+
// await editor.saveDraft()
75+
76+
// const blocks = await editor.getBlocks( { clientId: postContentBlock.clientId } )
77+
// const textBlock = blocks.find( block => block.name === 'stackable/text' )
78+
// expect( textBlock.attributes.text ).toBe( 'test' )
79+
// expect( textBlock.attributes.textColor1 ).toBe( '#ff0000' )
80+
// } )
81+
82+
// test( 'The Stackable block added in the site editor should be visible in the frontend', async ( {
83+
// editor,
84+
// } ) => {
85+
// await editor.insertBlock( {
86+
// name: 'stackable/text',
87+
// attributes: {
88+
// text: 'test',
89+
// textColor1: '#ff0000',
90+
// },
91+
// }, { clientId: postContentBlock.clientId } )
92+
93+
// const blocks = await editor.getBlocks( { clientId: postContentBlock.clientId } )
94+
// const uniqueId = blocks.find( block => block.name === 'stackable/text' ).attributes.uniqueId
95+
96+
// await editor.saveDraft()
97+
98+
// const preview = await editor.openPreviewPage()
99+
100+
// await expect( preview.locator( `[data-block-id="${ uniqueId }"]` ) ).toBeVisible()
101+
// await expect( preview.locator( `[data-block-id="${ uniqueId }"]` ) ).toContainText( 'test' )
102+
// await expect( preview.locator( `[data-block-id="${ uniqueId }"] p` ) ).toHaveCSS( 'color', 'rgb(255, 0, 0)' )
103+
// } )
104104
} )
105105

0 commit comments

Comments
 (0)