MM-54458 : Refactor playwright test with app areas (#24527)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c887381318
Коммит
6109330beb
@@ -3,6 +3,7 @@
|
||||
exports[`components/advanced_create_post Show tutorial 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -81,6 +82,7 @@ exports[`components/advanced_create_post Show tutorial 1`] = `
|
||||
exports[`components/advanced_create_post should match snapshot for center textbox 1`] = `
|
||||
<form
|
||||
className="center"
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -159,6 +161,7 @@ exports[`components/advanced_create_post should match snapshot for center textbo
|
||||
exports[`components/advanced_create_post should match snapshot when cannot post 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -237,6 +240,7 @@ exports[`components/advanced_create_post should match snapshot when cannot post
|
||||
exports[`components/advanced_create_post should match snapshot when file upload disabled 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -315,6 +319,7 @@ exports[`components/advanced_create_post should match snapshot when file upload
|
||||
exports[`components/advanced_create_post should match snapshot, can post; preview disabled 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -393,6 +398,7 @@ exports[`components/advanced_create_post should match snapshot, can post; previe
|
||||
exports[`components/advanced_create_post should match snapshot, can post; preview enabled 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -471,6 +477,7 @@ exports[`components/advanced_create_post should match snapshot, can post; previe
|
||||
exports[`components/advanced_create_post should match snapshot, cannot post; preview disabled 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -549,6 +556,7 @@ exports[`components/advanced_create_post should match snapshot, cannot post; pre
|
||||
exports[`components/advanced_create_post should match snapshot, cannot post; preview enabled 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -627,6 +635,7 @@ exports[`components/advanced_create_post should match snapshot, cannot post; pre
|
||||
exports[`components/advanced_create_post should match snapshot, init 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -705,6 +714,7 @@ exports[`components/advanced_create_post should match snapshot, init 1`] = `
|
||||
exports[`components/advanced_create_post should match snapshot, post priority disabled, with priority important 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -788,6 +798,7 @@ exports[`components/advanced_create_post should match snapshot, post priority di
|
||||
exports[`components/advanced_create_post should match snapshot, post priority enabled 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
@@ -874,6 +885,7 @@ exports[`components/advanced_create_post should match snapshot, post priority en
|
||||
exports[`components/advanced_create_post should match snapshot, post priority enabled, with priority important 1`] = `
|
||||
<form
|
||||
className=""
|
||||
data-testid="create-post"
|
||||
id="create_post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
|
||||
@@ -1626,6 +1626,7 @@ class AdvancedCreatePost extends React.PureComponent<Props, State> {
|
||||
<form
|
||||
id='create_post'
|
||||
ref={this.topDiv}
|
||||
data-testid='create-post'
|
||||
className={centerClass}
|
||||
onSubmit={this.handleSubmit}
|
||||
>
|
||||
|
||||
@@ -55,6 +55,7 @@ export default function ChannelController(props: Props) {
|
||||
<div
|
||||
id='channel_view'
|
||||
className='channel-view'
|
||||
data-testid='channel_view'
|
||||
>
|
||||
<FaviconTitleHandler/>
|
||||
<ProductNoticesModal/>
|
||||
|
||||
@@ -143,6 +143,7 @@ exports[`components/channel_view Should match snapshot with base props 1`] = `
|
||||
/>
|
||||
<div
|
||||
className="post-create__container AdvancedTextEditor__ctr"
|
||||
data-testid="post-create"
|
||||
id="post-create"
|
||||
>
|
||||
<Connect(AdvancedCreatePost)
|
||||
|
||||
@@ -149,8 +149,9 @@ export default class ChannelView extends React.PureComponent<Props, State> {
|
||||
} else {
|
||||
createPost = (
|
||||
<div
|
||||
className='post-create__container AdvancedTextEditor__ctr'
|
||||
id='post-create'
|
||||
data-testid='post-create'
|
||||
className='post-create__container AdvancedTextEditor__ctr'
|
||||
>
|
||||
<AdvancedCreatePost getChannelView={this.getChannelView}/>
|
||||
</div>
|
||||
|
||||
@@ -509,13 +509,20 @@ const PostComponent = (props: Props): JSX.Element => {
|
||||
priority = <span className='d-flex mr-2 ml-1'><PriorityLabel priority={post.metadata.priority.priority}/></span>;
|
||||
}
|
||||
|
||||
let postAriaLabelDivTestId = '';
|
||||
if (props.location === Locations.CENTER) {
|
||||
postAriaLabelDivTestId = 'postView';
|
||||
} else if (props.location === Locations.RHS_ROOT || props.location === Locations.RHS_COMMENT) {
|
||||
postAriaLabelDivTestId = 'rhsPostView';
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{(isSearchResultItem || (props.location !== Locations.CENTER && (props.isPinnedPosts || props.isFlaggedPosts))) && <DateSeparator date={currentPostDay}/>}
|
||||
<PostAriaLabelDiv
|
||||
ref={postRef}
|
||||
id={getTestId()}
|
||||
data-testid={props.location === 'CENTER' ? 'postView' : ''}
|
||||
data-testid={postAriaLabelDivTestId}
|
||||
tabIndex={0}
|
||||
post={post}
|
||||
className={getClassName()}
|
||||
|
||||
@@ -92,6 +92,7 @@ const CreateComment = forwardRef<HTMLDivElement, Props>(({
|
||||
<div
|
||||
className='post-create__container'
|
||||
ref={ref}
|
||||
data-testid='comment-create'
|
||||
>
|
||||
<AdvancedCreateComment
|
||||
focusOnMount={focusOnMount}
|
||||
|
||||
Ссылка в новой задаче
Block a user