@@ -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