@@ -2,7 +2,7 @@ import { expect, FrameLocator, Locator } from '@playwright/test';
22
33const COMMENT_LIST_TES_ID = 'pullrequest.comment-list' ;
44const FORM_TEST_ID = 'common.comment-form' ;
5- const RICH_EDITOR_TEST_ID = 'common.rich-markdown -editor' ;
5+ const RICH_EDITOR_TEST_ID = 'common.atlaskit -editor' ;
66
77export class PRComments {
88 readonly frame : FrameLocator ;
@@ -12,8 +12,6 @@ export class PRComments {
1212 readonly editor : Locator ;
1313 readonly editorContent : Locator ;
1414 readonly editorConfirmButton : Locator ;
15- readonly editorCancelButton : Locator ;
16- readonly richEditorCheckbox : Locator ;
1715 readonly commentList : Locator ;
1816 readonly testComment : Locator ;
1917
@@ -24,9 +22,7 @@ export class PRComments {
2422 this . form = this . frame . getByTestId ( FORM_TEST_ID ) ;
2523 this . editor = this . form . getByTestId ( RICH_EDITOR_TEST_ID ) ;
2624 this . editorContent = this . editor . locator ( 'div.ProseMirror[contenteditable="true"]' ) ;
27- this . editorConfirmButton = this . form . getByRole ( 'button' , { name : 'save' } ) ;
28- this . editorCancelButton = this . form . getByRole ( 'button' , { name : 'cancel' } ) ;
29- this . richEditorCheckbox = this . form . getByRole ( 'checkbox' ) ;
25+ this . editorConfirmButton = this . form . getByRole ( 'button' , { name : / s a v e / i } ) ;
3026 this . commentList = this . frame . getByTestId ( COMMENT_LIST_TES_ID ) ;
3127 this . testComment = this . commentList . locator ( 'div.MuiBox-root p' ) . filter ( { hasText : 'test comment' } ) . first ( ) ;
3228 }
@@ -40,7 +36,5 @@ export class PRComments {
4036 await expect ( this . editor ) . toBeVisible ( ) ;
4137 await expect ( this . editorContent ) . toBeVisible ( ) ;
4238 await expect ( this . editorConfirmButton ) . toBeVisible ( ) ;
43- await expect ( this . editorCancelButton ) . toBeVisible ( ) ;
44- await expect ( this . richEditorCheckbox ) . toBeVisible ( ) ;
4539 }
4640}
0 commit comments