Merge commit '8eda2a60baa14fce2f030b711164806008265100' into def_releases_2022040810384040_ali-lowcode_ali-lowcode-engine/1.0.81

This commit is contained in:
tbfed 2022-04-14 15:02:19 +08:00
commit 0cc5ea1bd2
5 changed files with 11 additions and 63 deletions

View File

@ -4,7 +4,7 @@ module.exports = {
// // '^.+\\.(ts|tsx)$': 'ts-jest',
// // '^.+\\.(js|jsx)$': 'babel-jest',
// },
// testMatch: ['**/bugs/*.test.ts'],
// testMatch: ['**/designer/designer.test.ts'],
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
transformIgnorePatterns: [
],
@ -23,6 +23,7 @@ module.exports = {
'!src/builtin-simulator/live-editing/live-editing.ts',
'!src/designer/offset-observer.ts',
'!src/designer/clipboard.ts',
'!src/builtin-simulator/host.ts',
'!**/node_modules/**',
'!**/vendor/**',
],

View File

@ -664,7 +664,7 @@ export class DocumentModel {
...node.componentMeta.npm,
componentName,
});
} else {
} else if (node.componentMeta?.getMetadata().devMode?.toLowerCase() === 'lowcode') {
componentsMap.push({
devMode: 'lowcode',
componentName,

View File

@ -87,6 +87,7 @@ describe('Designer 测试', () => {
function setMockDropLocation() {
const mockTarget = {
document: doc,
isSlot() { return true; },
children: {
get(x) {
return x;
@ -155,6 +156,7 @@ describe('Designer 测试', () => {
function setMockDropLocation() {
const mockTarget = {
document: doc,
isSlot() { return true; },
children: {
get(x) {
return x;
@ -310,6 +312,7 @@ describe('Designer 测试', () => {
it('createLocation / clearLocation', () => {
const mockTarget = {
document: doc,
isSlot() { return true; },
children: {
get(x) {
return x;
@ -334,6 +337,7 @@ describe('Designer 测试', () => {
designer.createLocation({
target: {
document: doc2,
isSlot() { return true; },
children: {
get(x) {
return x;

View File

@ -2,64 +2,7 @@
exports[`document-model 测试 各种方法测试 1`] = `
Object {
"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",
},
],
"componentsMap": Array [],
"componentsTree": Array [
Object {
"children": Array [

View File

@ -174,9 +174,9 @@ describe('document-model 测试', () => {
expect(comps.find(comp => comp.componentName === 'Other')).toEqual(
{ componentName: 'Other', package: '@ali/vc-other' }
);
expect(comps.find(comp => comp.componentName === 'Page')).toEqual(
{ componentName: 'Page', devMode: 'lowcode' }
);
// expect(comps.find(comp => comp.componentName === 'Page')).toEqual(
// { componentName: 'Page', devMode: 'lowcode' }
// );
});
it('acceptRootNodeVisitor / getRootNodeVisitor', () => {