Skip to content

Commit

Permalink
Merge pull request #3174 from nextcloud/renovate/stable25-tiptap
Browse files Browse the repository at this point in the history
fix(deps): update tiptap (stable25)
  • Loading branch information
juliusknorr authored Oct 12, 2022
2 parents a18844d + d7d07f9 commit 8395720
Show file tree
Hide file tree
Showing 17 changed files with 411 additions and 596 deletions.
25 changes: 18 additions & 7 deletions cypress/e2e/links.spec.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
import { initUserAndFiles, randHash } from '../utils/index.js'

const randUser = randHash()
const fileName = 'test.md'
const fileName = 'empty.md'

describe('test link marks', function() {
before(function() {
initUserAndFiles(randUser, fileName)
initUserAndFiles(randUser)
})

beforeEach(function() {
cy.login(randUser, 'password', {
cy.login(randUser, 'password')

cy.isolateTest({
sourceFile: fileName,
onBeforeLoad(win) {
cy.stub(win, 'open')
.as('winOpen')
},
})

return cy.openFile(fileName)
return cy.openFile(fileName, { force: true })
})

describe('autolink', function() {
beforeEach(() => cy.clearContent())
it('with protocol', () => {
cy.getFile(fileName)
.then($el => {
const id = $el.data('id')

const link = `${Cypress.env('baseUrl')}/file-name?fileId=${id}`
const link = `${Cypress.env('baseUrl')}/file-name?fileId=${id} `
cy.getContent()
.type(link)

Expand All @@ -42,11 +44,20 @@ describe('test link marks', function() {

it('whithout protocol', () => {
cy.getContent()
.type('google.com')
.type('google.com{enter}')

cy.getContent()
.find('a[href*="google.com"]')
.should('not.exist')
})

it('whithout space', () => {
cy.getContent()
.type('https://nextcloud.com')

cy.getContent()
.find('a[href*="nextcloud.com"]')
.should('not.exist')
})
})
})
15 changes: 15 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,21 @@ Cypress.Commands.add('shareFileToUser', (userId, password, path, targetUserId) =
})
})

Cypress.Commands.add('isolateTest', ({ sourceFile = 'text.md', targetFile = null, onBeforeLoad } = {}) => {
targetFile = targetFile || sourceFile

const retry = cy.state('test').currentRetry()
const folderName = retry
? `${Cypress.currentTest.title} (${retry})`
: Cypress.currentTest.title

cy.createFolder(folderName)
cy.uploadFile(sourceFile, 'text/markdown', `${encodeURIComponent(folderName)}/${targetFile}`)

return cy.visit(`apps/files?dir=/${encodeURIComponent(folderName)}`, { onBeforeLoad })
.then(() => ({ folderName, fileName: targetFile }))
})

Cypress.Commands.add('shareFile', (path, options = {}) => {
return cy.window().then(async window => {
try {
Expand Down
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/vendors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/vendors.js.map

Large diffs are not rendered by default.

862 changes: 325 additions & 537 deletions package-lock.json

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,38 @@
"@nextcloud/router": "^2.0.0",
"@nextcloud/vue": "^7.0.0-beta.6",
"@quartzy/markdown-it-mentions": "^0.2.0",
"@tiptap/core": "^2.0.0-beta.195",
"@tiptap/extension-blockquote": "^2.0.0-beta.195",
"@tiptap/extension-bold": "^2.0.0-beta.195",
"@tiptap/extension-bullet-list": "^2.0.0-beta.195",
"@tiptap/extension-code": "^2.0.0-beta.195",
"@tiptap/extension-code-block": "^2.0.0-beta.195",
"@tiptap/extension-code-block-lowlight": "^2.0.0-beta.195",
"@tiptap/extension-document": "^2.0.0-beta.195",
"@tiptap/extension-dropcursor": "^2.0.0-beta.195",
"@tiptap/extension-hard-break": "^2.0.0-beta.195",
"@tiptap/extension-heading": "^2.0.0-beta.195",
"@tiptap/extension-history": "^2.0.0-beta.195",
"@tiptap/extension-horizontal-rule": "^2.0.0-beta.195",
"@tiptap/extension-image": "^2.0.0-beta.195",
"@tiptap/extension-italic": "^2.0.0-beta.195",
"@tiptap/extension-link": "^2.0.0-beta.195",
"@tiptap/extension-list-item": "^2.0.0-beta.195",
"@tiptap/extension-mention": "^2.0.0-beta.195",
"@tiptap/extension-ordered-list": "^2.0.0-beta.195",
"@tiptap/extension-paragraph": "^2.0.0-beta.195",
"@tiptap/extension-placeholder": "^2.0.0-beta.195",
"@tiptap/extension-strike": "^2.0.0-beta.195",
"@tiptap/extension-table": "^2.0.0-beta.195",
"@tiptap/extension-table-cell": "^2.0.0-beta.195",
"@tiptap/extension-table-header": "^2.0.0-beta.195",
"@tiptap/extension-table-row": "^2.0.0-beta.195",
"@tiptap/extension-task-item": "^2.0.0-beta.195",
"@tiptap/extension-task-list": "^2.0.0-beta.195",
"@tiptap/extension-text": "^2.0.0-beta.195",
"@tiptap/extension-underline": "^2.0.0-beta.195",
"@tiptap/suggestion": "^2.0.0-beta.195",
"@tiptap/vue-2": "^2.0.0-beta.195",
"@tiptap/core": "^2.0.0-beta.199",
"@tiptap/extension-blockquote": "^2.0.0-beta.199",
"@tiptap/extension-bold": "^2.0.0-beta.199",
"@tiptap/extension-bullet-list": "^2.0.0-beta.199",
"@tiptap/extension-code": "^2.0.0-beta.199",
"@tiptap/extension-code-block": "^2.0.0-beta.199",
"@tiptap/extension-code-block-lowlight": "^2.0.0-beta.199",
"@tiptap/extension-document": "^2.0.0-beta.199",
"@tiptap/extension-dropcursor": "^2.0.0-beta.199",
"@tiptap/extension-hard-break": "^2.0.0-beta.199",
"@tiptap/extension-heading": "^2.0.0-beta.199",
"@tiptap/extension-history": "^2.0.0-beta.199",
"@tiptap/extension-horizontal-rule": "^2.0.0-beta.199",
"@tiptap/extension-image": "^2.0.0-beta.199",
"@tiptap/extension-italic": "^2.0.0-beta.199",
"@tiptap/extension-link": "^2.0.0-beta.199",
"@tiptap/extension-list-item": "^2.0.0-beta.199",
"@tiptap/extension-mention": "^2.0.0-beta.199",
"@tiptap/extension-ordered-list": "^2.0.0-beta.199",
"@tiptap/extension-paragraph": "^2.0.0-beta.199",
"@tiptap/extension-placeholder": "^2.0.0-beta.199",
"@tiptap/extension-strike": "^2.0.0-beta.199",
"@tiptap/extension-table": "^2.0.0-beta.199",
"@tiptap/extension-table-cell": "^2.0.0-beta.199",
"@tiptap/extension-table-header": "^2.0.0-beta.199",
"@tiptap/extension-table-row": "^2.0.0-beta.199",
"@tiptap/extension-task-item": "^2.0.0-beta.199",
"@tiptap/extension-task-list": "^2.0.0-beta.199",
"@tiptap/extension-text": "^2.0.0-beta.199",
"@tiptap/extension-underline": "^2.0.0-beta.199",
"@tiptap/suggestion": "^2.0.0-beta.199",
"@tiptap/vue-2": "^2.0.0-beta.199",
"debounce": "^1.2.1",
"escape-html": "^1.0.3",
"highlight.js": "^10.7.3",
Expand All @@ -91,14 +91,14 @@
"mitt": "^3.0.0",
"prosemirror-collab": "^1.3.0",
"prosemirror-inputrules": "^1.2.0",
"prosemirror-markdown": "^1.9.4",
"prosemirror-markdown": "^1.10.0",
"prosemirror-model": "^1.18.1",
"prosemirror-schema-list": "^1.2.2",
"prosemirror-state": "^1.4.1",
"prosemirror-tables-contently": "^1.1.2",
"prosemirror-transform": "^1.7.0",
"prosemirror-utils": "^1.0.0-0",
"prosemirror-view": "^1.28.0",
"prosemirror-view": "^1.28.3",
"proxy-polyfill": "^0.3.2",
"slug": "^8.0.0",
"tippy.js": "^6.3.7",
Expand Down
1 change: 1 addition & 0 deletions src/extensions/Emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const Emoji = Node.create({
HTMLAttributes: {},
suggestion: {
char: ':',
allowedPrefixes: [' '],
pluginKey: EmojiPluginKey,
command: ({ editor, range, props }) => {
editor
Expand Down

0 comments on commit 8395720

Please sign in to comment.