Skip to content

Commit

Permalink
Add remaining use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot committed Sep 24, 2024
1 parent 9b8e872 commit c2ce926
Showing 1 changed file with 44 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,48 @@ test.describe( 'Registered sources', () => {
} );
} );

test( 'should show the label of a source only registered in the server in blocks connected', async () => {} );
test( 'should lock editing when connected to an undefined source', async () => {} );
test( 'should show an "Invalid source" warning for not registered sources', async () => {} );
test( 'should show the label of a source only registered in the server in blocks connected', async ( {
editor,
page,
} ) => {
await editor.insertBlock( {
name: 'core/paragraph',
attributes: {
metadata: {
bindings: {
content: {
source: 'testing/server-only-source',
},
},
},
},
} );

const contentButton = page.getByRole( 'button', {
name: 'content',
} );
await expect( contentButton ).toContainText( 'Server Source' );
} );
test( 'should show an "Invalid source" warning for not registered sources', async ( {
editor,
page,
} ) => {
await editor.insertBlock( {
name: 'core/paragraph',
attributes: {
metadata: {
bindings: {
content: {
source: 'testing/undefined-source',
},
},
},
},
} );

const contentButton = page.getByRole( 'button', {
name: 'content',
} );
await expect( contentButton ).toContainText( 'Invalid source' );
} );
} );

0 comments on commit c2ce926

Please sign in to comment.