Skip to content

Commit acf83b7

Browse files
Notes: Update reaction E2E tests to renamed fixture and method
Trunk's collab-sidebar refactor renamed the test fixture and helper: - blockCommentUtils → blockNoteUtils - addBlockWithComment → addBlockWithNote Update the Emoji Reactions describe block to use the current names so Playwright stops failing with 'Test has unknown parameter blockCommentUtils'.
1 parent 9064196 commit acf83b7

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

test/e2e/specs/editor/various/block-notes.spec.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -852,15 +852,15 @@ test.describe( 'Block Notes', () => {
852852
test.describe( 'Emoji Reactions', () => {
853853
test( 'can add an emoji reaction to a note', async ( {
854854
page,
855-
blockCommentUtils,
855+
blockNoteUtils,
856856
} ) => {
857-
await blockCommentUtils.addBlockWithComment( {
857+
await blockNoteUtils.addBlockWithNote( {
858858
type: 'core/paragraph',
859859
attributes: { content: 'Testing emoji reactions' },
860860
comment: 'Test comment for reactions',
861861
} );
862862

863-
await blockCommentUtils.addReactionToComment( 'Heart' );
863+
await blockNoteUtils.addReactionToComment( 'Heart' );
864864

865865
await expect(
866866
page
@@ -878,16 +878,16 @@ test.describe( 'Block Notes', () => {
878878

879879
test( 'can remove own emoji reaction by clicking it', async ( {
880880
page,
881-
blockCommentUtils,
881+
blockNoteUtils,
882882
} ) => {
883-
await blockCommentUtils.addBlockWithComment( {
883+
await blockNoteUtils.addBlockWithNote( {
884884
type: 'core/paragraph',
885885
attributes: { content: 'Testing reaction removal' },
886886
comment: 'Test comment for removing reactions',
887887
} );
888888

889889
// Add a reaction.
890-
await blockCommentUtils.addReactionToComment( 'Heart' );
890+
await blockNoteUtils.addReactionToComment( 'Heart' );
891891
await expect(
892892
page
893893
.getByRole( 'button', { name: 'Dismiss this notice' } )
@@ -912,16 +912,16 @@ test.describe( 'Block Notes', () => {
912912

913913
test( 'can see reaction tooltip on hover', async ( {
914914
page,
915-
blockCommentUtils,
915+
blockNoteUtils,
916916
} ) => {
917-
await blockCommentUtils.addBlockWithComment( {
917+
await blockNoteUtils.addBlockWithNote( {
918918
type: 'core/paragraph',
919919
attributes: { content: 'Testing reaction tooltip' },
920920
comment: 'Test comment for reaction tooltip',
921921
} );
922922

923923
// Add a reaction.
924-
await blockCommentUtils.addReactionToComment( 'Celebration' );
924+
await blockNoteUtils.addReactionToComment( 'Celebration' );
925925
await expect(
926926
page
927927
.getByRole( 'button', { name: 'Dismiss this notice' } )
@@ -943,9 +943,9 @@ test.describe( 'Block Notes', () => {
943943

944944
test( 'reaction buttons are keyboard accessible', async ( {
945945
page,
946-
blockCommentUtils,
946+
blockNoteUtils,
947947
} ) => {
948-
await blockCommentUtils.addBlockWithComment( {
948+
await blockNoteUtils.addBlockWithNote( {
949949
type: 'core/paragraph',
950950
attributes: { content: 'Testing keyboard accessibility' },
951951
comment: 'Test comment for keyboard access',
@@ -979,24 +979,24 @@ test.describe( 'Block Notes', () => {
979979

980980
test( 'can add multiple different reactions to same note', async ( {
981981
page,
982-
blockCommentUtils,
982+
blockNoteUtils,
983983
} ) => {
984-
await blockCommentUtils.addBlockWithComment( {
984+
await blockNoteUtils.addBlockWithNote( {
985985
type: 'core/paragraph',
986986
attributes: { content: 'Testing multiple reactions' },
987987
comment: 'Test comment for multiple reactions',
988988
} );
989989

990990
// Add first reaction.
991-
await blockCommentUtils.addReactionToComment( 'Smile' );
991+
await blockNoteUtils.addReactionToComment( 'Smile' );
992992
await expect(
993993
page
994994
.getByRole( 'button', { name: 'Dismiss this notice' } )
995995
.filter( { hasText: 'Reaction added.' } )
996996
).toBeVisible();
997997

998998
// Add second reaction.
999-
await blockCommentUtils.addReactionToComment( 'Rocket' );
999+
await blockNoteUtils.addReactionToComment( 'Rocket' );
10001000
await expect(
10011001
page
10021002
.getByRole( 'button', { name: 'Dismiss this notice' } )

0 commit comments

Comments
 (0)