mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-10 09:56:20 +00:00
Merge commit '8eda2a60baa14fce2f030b711164806008265100' into def_releases_2022040810384040_ali-lowcode_ali-lowcode-engine/1.0.81
This commit is contained in:
commit
0cc5ea1bd2
@ -4,7 +4,7 @@ module.exports = {
|
|||||||
// // '^.+\\.(ts|tsx)$': 'ts-jest',
|
// // '^.+\\.(ts|tsx)$': 'ts-jest',
|
||||||
// // '^.+\\.(js|jsx)$': 'babel-jest',
|
// // '^.+\\.(js|jsx)$': 'babel-jest',
|
||||||
// },
|
// },
|
||||||
// testMatch: ['**/bugs/*.test.ts'],
|
// testMatch: ['**/designer/designer.test.ts'],
|
||||||
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
|
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
|
||||||
transformIgnorePatterns: [
|
transformIgnorePatterns: [
|
||||||
],
|
],
|
||||||
@ -23,6 +23,7 @@ module.exports = {
|
|||||||
'!src/builtin-simulator/live-editing/live-editing.ts',
|
'!src/builtin-simulator/live-editing/live-editing.ts',
|
||||||
'!src/designer/offset-observer.ts',
|
'!src/designer/offset-observer.ts',
|
||||||
'!src/designer/clipboard.ts',
|
'!src/designer/clipboard.ts',
|
||||||
|
'!src/builtin-simulator/host.ts',
|
||||||
'!**/node_modules/**',
|
'!**/node_modules/**',
|
||||||
'!**/vendor/**',
|
'!**/vendor/**',
|
||||||
],
|
],
|
||||||
|
|||||||
@ -664,7 +664,7 @@ export class DocumentModel {
|
|||||||
...node.componentMeta.npm,
|
...node.componentMeta.npm,
|
||||||
componentName,
|
componentName,
|
||||||
});
|
});
|
||||||
} else {
|
} else if (node.componentMeta?.getMetadata().devMode?.toLowerCase() === 'lowcode') {
|
||||||
componentsMap.push({
|
componentsMap.push({
|
||||||
devMode: 'lowcode',
|
devMode: 'lowcode',
|
||||||
componentName,
|
componentName,
|
||||||
|
|||||||
@ -87,6 +87,7 @@ describe('Designer 测试', () => {
|
|||||||
function setMockDropLocation() {
|
function setMockDropLocation() {
|
||||||
const mockTarget = {
|
const mockTarget = {
|
||||||
document: doc,
|
document: doc,
|
||||||
|
isSlot() { return true; },
|
||||||
children: {
|
children: {
|
||||||
get(x) {
|
get(x) {
|
||||||
return x;
|
return x;
|
||||||
@ -155,6 +156,7 @@ describe('Designer 测试', () => {
|
|||||||
function setMockDropLocation() {
|
function setMockDropLocation() {
|
||||||
const mockTarget = {
|
const mockTarget = {
|
||||||
document: doc,
|
document: doc,
|
||||||
|
isSlot() { return true; },
|
||||||
children: {
|
children: {
|
||||||
get(x) {
|
get(x) {
|
||||||
return x;
|
return x;
|
||||||
@ -310,6 +312,7 @@ describe('Designer 测试', () => {
|
|||||||
it('createLocation / clearLocation', () => {
|
it('createLocation / clearLocation', () => {
|
||||||
const mockTarget = {
|
const mockTarget = {
|
||||||
document: doc,
|
document: doc,
|
||||||
|
isSlot() { return true; },
|
||||||
children: {
|
children: {
|
||||||
get(x) {
|
get(x) {
|
||||||
return x;
|
return x;
|
||||||
@ -334,6 +337,7 @@ describe('Designer 测试', () => {
|
|||||||
designer.createLocation({
|
designer.createLocation({
|
||||||
target: {
|
target: {
|
||||||
document: doc2,
|
document: doc2,
|
||||||
|
isSlot() { return true; },
|
||||||
children: {
|
children: {
|
||||||
get(x) {
|
get(x) {
|
||||||
return x;
|
return x;
|
||||||
|
|||||||
@ -2,64 +2,7 @@
|
|||||||
|
|
||||||
exports[`document-model 测试 各种方法测试 1`] = `
|
exports[`document-model 测试 各种方法测试 1`] = `
|
||||||
Object {
|
Object {
|
||||||
"componentsMap": Array [
|
"componentsMap": Array [],
|
||||||
Object {
|
|
||||||
"componentName": "PageHeader",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "RootHeader",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "TextField",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "Column",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "SelectField",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "ColumnsLayout",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "CardContent",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "Card",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "Button",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "Div",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "Form",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "RootContent",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "RootFooter",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
Object {
|
|
||||||
"componentName": "Page",
|
|
||||||
"devMode": "lowcode",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"componentsTree": Array [
|
"componentsTree": Array [
|
||||||
Object {
|
Object {
|
||||||
"children": Array [
|
"children": Array [
|
||||||
|
|||||||
@ -174,9 +174,9 @@ describe('document-model 测试', () => {
|
|||||||
expect(comps.find(comp => comp.componentName === 'Other')).toEqual(
|
expect(comps.find(comp => comp.componentName === 'Other')).toEqual(
|
||||||
{ componentName: 'Other', package: '@ali/vc-other' }
|
{ componentName: 'Other', package: '@ali/vc-other' }
|
||||||
);
|
);
|
||||||
expect(comps.find(comp => comp.componentName === 'Page')).toEqual(
|
// expect(comps.find(comp => comp.componentName === 'Page')).toEqual(
|
||||||
{ componentName: 'Page', devMode: 'lowcode' }
|
// { componentName: 'Page', devMode: 'lowcode' }
|
||||||
);
|
// );
|
||||||
});
|
});
|
||||||
|
|
||||||
it('acceptRootNodeVisitor / getRootNodeVisitor', () => {
|
it('acceptRootNodeVisitor / getRootNodeVisitor', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user