Skip to content

Commit

Permalink
Revert "Revert "refactor(volto-slate): use @plone/volto-slate, latest…
Browse files Browse the repository at this point in the history
… volto compatibility refs #153447 (#6)""

This reverts commit 88d2ee6.
  • Loading branch information
avoinea committed Oct 24, 2022
1 parent f0c444a commit a446ff4
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 54 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ pipeline {

"ES lint": {
node(label: 'docker') {
sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci eslint'''
sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e VOLTO=$VOLTO -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci eslint'''
}
},

"Style lint": {
node(label: 'docker') {
sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci stylelint'''
sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e VOLTO=$VOLTO -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci stylelint'''
}
},

"Prettier": {
node(label: 'docker') {
sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci prettier'''
sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e VOLTO=$VOLTO -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" plone/volto-addon-ci prettier'''
}
}
)
Expand Down
24 changes: 24 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { defineConfig } = require('cypress');

module.exports = defineConfig({
viewportWidth: 1280,
defaultCommandTimeout: 8888,
chromeWebSecurity: false,
reporter: 'junit',
video: true,
retries: {
runMode: 8,
openMode: 0,
},
reporterOptions: {
mochaFile: 'cypress/reports/cypress-[hash].xml',
jenkinsMode: true,
toConsole: true,
},
e2e: {
setupNodeEvents(on, config) {
// e2e testing node events setup code
},
baseUrl: 'http://localhost:3000',
},
});
17 changes: 0 additions & 17 deletions cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setupBeforeEach, tearDownAfterEach } from '../support';
import { setupBeforeEach, tearDownAfterEach } from '../support/e2e';

describe('Blocks Tests', () => {
beforeEach(setupBeforeEach);
Expand Down
26 changes: 0 additions & 26 deletions cypress/plugins/index.js

This file was deleted.

File renamed without changes.
3 changes: 2 additions & 1 deletion jest-addon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = {
'@package/(.*)$': '<rootDir>/src/$1',
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
'@plone/volto-slate':
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
'~/(.*)$': '<rootDir>/src/$1',
'load-volto-addons':
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
"url": "git@github.com:eea/volto-slate-label.git"
},
"addons": [
"volto-slate"
],
"dependencies": {
"@plone/scripts": "*",
"volto-slate": "*"
"@plone/scripts": "*"
},
"devDependencies": {
"@cypress/code-coverage": "^3.9.5",
Expand Down
2 changes: 1 addition & 1 deletion src/editor/LabelWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import cx from 'classnames';
import {
serializeNodes,
serializeNodesToText,
} from 'volto-slate/editor/render';
} from '@plone/volto-slate/editor/render';

const LabelWrapper = (props) => {
const { attributes, children, element } = props;
Expand Down
2 changes: 1 addition & 1 deletion src/editor/extensions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LABEL } from '../constants';
import { nanoid } from 'volto-slate/utils';
import { nanoid } from '@plone/volto-slate/utils';
import { Transforms } from 'slate';

export const withLabel = (editor) => {
Expand Down
2 changes: 1 addition & 1 deletion src/editor/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import commentSVG from '@plone/volto/icons/comment.svg';
import { defineMessages } from 'react-intl'; // , defineMessages

import { makeInlineElementPlugin } from 'volto-slate/components/ElementEditor';
import { makeInlineElementPlugin } from '@plone/volto-slate/elementEditor';

import { LabelEditorSchema } from './schema';
import { withLabel, withBeforeInsertFragment } from './extensions';
Expand Down

0 comments on commit a446ff4

Please sign in to comment.