Skip to content

Commit

Permalink
chore(comments): enable inline comments (#5883)
Browse files Browse the repository at this point in the history
* chore(comments): enable inline comments

* fix(comments): remove comment in plugin

* test(comments): remove comment in e2e test

---------

Co-authored-by: Herman Wikner <[email protected]>
  • Loading branch information
skogsmaskin and hermanwikner authored Mar 6, 2024
1 parent 4acc11e commit 7d3f33d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions packages/sanity/src/structure/comments/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {definePlugin} from 'sanity'
import {commentsUsEnglishLocaleBundle} from '../i18n'
import {CommentsDocumentLayout} from './document-layout'
import {CommentsField} from './field'
// import {CommentsInput} from './input'
import {CommentsInput} from './input'
import {commentsInspector} from './inspector'
import {CommentsStudioLayout} from './studio-layout'

Expand All @@ -20,8 +20,7 @@ export const comments = definePlugin({
form: {
components: {
field: CommentsField,
// The `CommentsInput` will be enabled when it is ready to be used.
// input: CommentsInput,
input: CommentsInput,
},
},

Expand Down
5 changes: 2 additions & 3 deletions test/e2e/tests/comments/inline.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,15 @@ async function inlineCommentCreationTest(props: InlineCommentCreationTestProps)
await expect(commentsListItemReferencedValue).toHaveText(PTE_CONTENT_TEXT)
}

// The tests will be enabled when the inline comments feature is ready to be used.
test.describe('Inline comments:', () => {
test.skip('should create inline comment', async ({page, createDraftDocument, browserName}) => {
test('should create inline comment', async ({page, createDraftDocument, browserName}) => {
// For now, only test in Chromium due to flakiness in Firefox and WebKit
test.skip(browserName !== 'chromium')

await inlineCommentCreationTest({page, createDraftDocument})
})

test.skip('should resolve inline comment', async ({page, createDraftDocument, browserName}) => {
test('should resolve inline comment', async ({page, createDraftDocument, browserName}) => {
// For now, only test in Chromium due to flakiness in Firefox and WebKit
test.skip(browserName !== 'chromium')

Expand Down

0 comments on commit 7d3f33d

Please sign in to comment.